mirror of
https://github.com/zhaarey/apple-music-downloader.git
synced 2025-10-23 15:11:05 +00:00
fix quality tag
This commit is contained in:
7
main.go
7
main.go
@@ -857,7 +857,7 @@ func rip(albumId string, token string, storefront string, mediaUserToken string,
|
|||||||
if dl_cover {
|
if dl_cover {
|
||||||
fmt.Println("Cover only mode - downloading artwork")
|
fmt.Println("Cover only mode - downloading artwork")
|
||||||
counter.Total++
|
counter.Total++
|
||||||
|
|
||||||
// Download album cover
|
// Download album cover
|
||||||
err = writeCover(sanAlbumFolder, "cover", meta.Data[0].Attributes.Artwork.URL)
|
err = writeCover(sanAlbumFolder, "cover", meta.Data[0].Attributes.Artwork.URL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -937,7 +937,7 @@ func rip(albumId string, token string, storefront string, mediaUserToken string,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1752,6 +1752,9 @@ func extractMediaQuality(b string) (string, error) {
|
|||||||
return "", errors.New("m3u8 not of master type")
|
return "", errors.New("m3u8 not of master type")
|
||||||
}
|
}
|
||||||
master := from.(*m3u8.MasterPlaylist)
|
master := from.(*m3u8.MasterPlaylist)
|
||||||
|
sort.Slice(master.Variants, func(i, j int) bool {
|
||||||
|
return master.Variants[i].AverageBandwidth > master.Variants[j].AverageBandwidth
|
||||||
|
})
|
||||||
if debug_mode {
|
if debug_mode {
|
||||||
fmt.Println("\nDebug: All Available Variants:")
|
fmt.Println("\nDebug: All Available Variants:")
|
||||||
fmt.Println("-----------------------------")
|
fmt.Println("-----------------------------")
|
||||||
|
|||||||
Reference in New Issue
Block a user