fix artist-folder

pull/22/head
zhaarey 5 months ago
parent 8628931fa6
commit 8251a7cce1
  1. 5
      main.go
  2. 5
      main_atmos.go
  3. 5
      main_select.go

@ -1163,9 +1163,8 @@ func rip(albumId string, token string, storefront string, userToken string) erro
fmt.Println("Failed to get album metadata.\n")
return err
}
singerFolder:=""
var singerFoldername string
if config.ArtistFolderFormat != ""{
var singerFoldername string
if strings.Contains(albumId, "pl.") {
singerFoldername = strings.NewReplacer(
"{ArtistName}", "Apple Music",
@ -1182,8 +1181,8 @@ func rip(albumId string, token string, storefront string, userToken string) erro
}
singerFoldername = strings.TrimSpace(singerFoldername)
fmt.Println(singerFoldername)
singerFolder = filepath.Join(config.AlacSaveFolder, forbiddenNames.ReplaceAllString(singerFoldername, "_"))
}
singerFolder := filepath.Join(config.AlacSaveFolder, forbiddenNames.ReplaceAllString(singerFoldername, "_"))
manifest1, err := getInfoFromAdam(meta.Data[0].Relationships.Tracks.Data[0].ID, token, storefront)
if err != nil {
fmt.Println("Failed to get manifest.\n", err)

@ -1123,9 +1123,8 @@ func rip(albumId string, token string, storefront string, userToken string) erro
fmt.Println("Failed to get album metadata.\n")
return err
}
singerFolder:=""
var singerFoldername string
if config.ArtistFolderFormat != ""{
var singerFoldername string
if strings.Contains(albumId, "pl.") {
singerFoldername = strings.NewReplacer(
"{ArtistName}", "Apple Music",
@ -1142,8 +1141,8 @@ func rip(albumId string, token string, storefront string, userToken string) erro
}
singerFoldername = strings.TrimSpace(singerFoldername)
fmt.Println(singerFoldername)
singerFolder = filepath.Join(config.AlacSaveFolder, forbiddenNames.ReplaceAllString(singerFoldername, "_"))
}
singerFolder := filepath.Join(config.AtmosSaveFolder, forbiddenNames.ReplaceAllString(singerFoldername, "_"))
var albumFolder string
Quality:=fmt.Sprintf("%dkbps", config.AtmosMax-2000)
if config.AddCodec{

@ -1125,9 +1125,8 @@ func rip(albumId string, token string, storefront string, userToken string) erro
fmt.Println("Failed to get album metadata.\n")
return err
}
singerFolder:=""
var singerFoldername string
if config.ArtistFolderFormat != ""{
var singerFoldername string
if strings.Contains(albumId, "pl.") {
singerFoldername = strings.NewReplacer(
"{ArtistName}", "Apple Music",
@ -1144,8 +1143,8 @@ func rip(albumId string, token string, storefront string, userToken string) erro
}
singerFoldername = strings.TrimSpace(singerFoldername)
fmt.Println(singerFoldername)
singerFolder = filepath.Join(config.AlacSaveFolder, forbiddenNames.ReplaceAllString(singerFoldername, "_"))
}
singerFolder := filepath.Join(config.AlacSaveFolder, forbiddenNames.ReplaceAllString(singerFoldername, "_"))
var albumFolder string
if strings.Contains(albumId, "pl.") {
albumFolder = strings.NewReplacer(

Loading…
Cancel
Save