pull/17/head
zhaarey 7 months ago
parent ac4b50790d
commit 0236f804da
  1. 4
      main.go
  2. 4
      main_atmos.go
  3. 4
      main_select.go

@ -1080,17 +1080,13 @@ func rip(albumId string, token string, storefront string, userToken string) erro
if strings.HasSuffix(singerFoldername, ".") { if strings.HasSuffix(singerFoldername, ".") {
singerFoldername = strings.ReplaceAll(singerFoldername, ".", "") singerFoldername = strings.ReplaceAll(singerFoldername, ".", "")
} }
if strings.HasSuffix(singerFoldername, " ") {
singerFoldername = strings.TrimSpace(singerFoldername) singerFoldername = strings.TrimSpace(singerFoldername)
}
singerFolder := filepath.Join("AM-DL downloads", forbiddenNames.ReplaceAllString(singerFoldername, "_")) singerFolder := filepath.Join("AM-DL downloads", forbiddenNames.ReplaceAllString(singerFoldername, "_"))
albumFolder := fmt.Sprintf("%s", meta.Data[0].Attributes.Name) albumFolder := fmt.Sprintf("%s", meta.Data[0].Attributes.Name)
if strings.HasSuffix(albumFolder, ".") { if strings.HasSuffix(albumFolder, ".") {
albumFolder = strings.ReplaceAll(albumFolder, ".", "") albumFolder = strings.ReplaceAll(albumFolder, ".", "")
} }
if strings.HasSuffix(albumFolder, " ") {
albumFolder = strings.TrimSpace(albumFolder) albumFolder = strings.TrimSpace(albumFolder)
}
sanAlbumFolder := filepath.Join(singerFolder, forbiddenNames.ReplaceAllString(albumFolder, "_")) sanAlbumFolder := filepath.Join(singerFolder, forbiddenNames.ReplaceAllString(albumFolder, "_"))
os.MkdirAll(sanAlbumFolder, os.ModePerm) os.MkdirAll(sanAlbumFolder, os.ModePerm)
fmt.Println(singerFoldername) fmt.Println(singerFoldername)

@ -1086,17 +1086,13 @@ func rip(albumId string, token string, storefront string, userToken string) erro
if strings.HasSuffix(singerFoldername, ".") { if strings.HasSuffix(singerFoldername, ".") {
singerFoldername = strings.ReplaceAll(singerFoldername, ".", "") singerFoldername = strings.ReplaceAll(singerFoldername, ".", "")
} }
if strings.HasSuffix(singerFoldername, " ") {
singerFoldername = strings.TrimSpace(singerFoldername) singerFoldername = strings.TrimSpace(singerFoldername)
}
singerFolder := filepath.Join("AM-DL-Atmos downloads", forbiddenNames.ReplaceAllString(singerFoldername, "_")) singerFolder := filepath.Join("AM-DL-Atmos downloads", forbiddenNames.ReplaceAllString(singerFoldername, "_"))
albumFolder := fmt.Sprintf("%s [Atmos]", meta.Data[0].Attributes.Name) albumFolder := fmt.Sprintf("%s [Atmos]", meta.Data[0].Attributes.Name)
if strings.HasSuffix(albumFolder, ".") { if strings.HasSuffix(albumFolder, ".") {
albumFolder = strings.ReplaceAll(albumFolder, ".", "") albumFolder = strings.ReplaceAll(albumFolder, ".", "")
} }
if strings.HasSuffix(albumFolder, " ") {
albumFolder = strings.TrimSpace(albumFolder) albumFolder = strings.TrimSpace(albumFolder)
}
sanAlbumFolder := filepath.Join(singerFolder, forbiddenNames.ReplaceAllString(albumFolder, "_")) sanAlbumFolder := filepath.Join(singerFolder, forbiddenNames.ReplaceAllString(albumFolder, "_"))
os.MkdirAll(sanAlbumFolder, os.ModePerm) os.MkdirAll(sanAlbumFolder, os.ModePerm)
fmt.Println(singerFoldername) fmt.Println(singerFoldername)

@ -1089,17 +1089,13 @@ func rip(albumId string, token string, storefront string, userToken string) erro
if strings.HasSuffix(singerFoldername, ".") { if strings.HasSuffix(singerFoldername, ".") {
singerFoldername = strings.ReplaceAll(singerFoldername, ".", "") singerFoldername = strings.ReplaceAll(singerFoldername, ".", "")
} }
if strings.HasSuffix(singerFoldername, " ") {
singerFoldername = strings.TrimSpace(singerFoldername) singerFoldername = strings.TrimSpace(singerFoldername)
}
singerFolder := filepath.Join("AM-DL downloads", forbiddenNames.ReplaceAllString(singerFoldername, "_")) singerFolder := filepath.Join("AM-DL downloads", forbiddenNames.ReplaceAllString(singerFoldername, "_"))
albumFolder := fmt.Sprintf("%s", meta.Data[0].Attributes.Name) albumFolder := fmt.Sprintf("%s", meta.Data[0].Attributes.Name)
if strings.HasSuffix(albumFolder, ".") { if strings.HasSuffix(albumFolder, ".") {
albumFolder = strings.ReplaceAll(albumFolder, ".", "") albumFolder = strings.ReplaceAll(albumFolder, ".", "")
} }
if strings.HasSuffix(albumFolder, " ") {
albumFolder = strings.TrimSpace(albumFolder) albumFolder = strings.TrimSpace(albumFolder)
}
sanAlbumFolder := filepath.Join(singerFolder, forbiddenNames.ReplaceAllString(albumFolder, "_")) sanAlbumFolder := filepath.Join(singerFolder, forbiddenNames.ReplaceAllString(albumFolder, "_"))
os.MkdirAll(sanAlbumFolder, os.ModePerm) os.MkdirAll(sanAlbumFolder, os.ModePerm)
fmt.Println(singerFoldername) fmt.Println(singerFoldername)

Loading…
Cancel
Save