Skip to content

Commit

Permalink
add ReleaseYear
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaarey committed Jun 4, 2024
1 parent 06a78c9 commit 5a0bce5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ force-api: false
get-m3u8-from-device: false
alac-max: 192000 #192000 96000 48000 44100
atmos-max: 2768 #2768 2448
#{AlbumId} {AlbumName} {ArtistName} {ReleaseDate} {UPC} {Copyright}
#example: {ReleaseDate} - {ArtistName} - {AlbumName}({AlbumId})
#{AlbumId} {AlbumName} {ArtistName} {ReleaseDate} {ReleaseYear} {UPC} {Copyright}
#example: {ReleaseYear} - {ArtistName} - {AlbumName}({AlbumId})({UPC})({Copyright})
album-folder-format: "{AlbumName}"
#{SongNumer} {SongName} {DiscNumber} {TrackNumber}
#example: Disk {DiscNumber} - Track {TrackNumber} {SongName}"
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@ func rip(albumId string, token string, storefront string, userToken string) erro
singerFolder := filepath.Join(config.AlacSaveFolder, forbiddenNames.ReplaceAllString(singerFoldername, "_"))
albumFolder := strings.NewReplacer(
"{ReleaseDate}", meta.Data[0].Attributes.ReleaseDate,
"{ReleaseYear}", meta.Data[0].Attributes.ReleaseDate[:4],
"{ArtistName}", meta.Data[0].Attributes.ArtistName,
"{AlbumName}", meta.Data[0].Attributes.Name,
"{UPC}", meta.Data[0].Attributes.Upc,
Expand Down
1 change: 1 addition & 0 deletions main_atmos.go
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,7 @@ func rip(albumId string, token string, storefront string, userToken string) erro
singerFolder := filepath.Join(config.AtmosSaveFolder, forbiddenNames.ReplaceAllString(singerFoldername, "_"))
albumFolder := strings.NewReplacer(
"{ReleaseDate}", meta.Data[0].Attributes.ReleaseDate,
"{ReleaseYear}", meta.Data[0].Attributes.ReleaseDate[:4],
"{ArtistName}", meta.Data[0].Attributes.ArtistName,
"{AlbumName}", meta.Data[0].Attributes.Name,
"{UPC}", meta.Data[0].Attributes.Upc,
Expand Down
1 change: 1 addition & 0 deletions main_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,7 @@ func rip(albumId string, token string, storefront string, userToken string) erro
singerFolder := filepath.Join("AM-DL downloads", forbiddenNames.ReplaceAllString(singerFoldername, "_"))
albumFolder := strings.NewReplacer(
"{ReleaseDate}", meta.Data[0].Attributes.ReleaseDate,
"{ReleaseYear}", meta.Data[0].Attributes.ReleaseDate[:4],
"{ArtistName}", meta.Data[0].Attributes.ArtistName,
"{AlbumName}", meta.Data[0].Attributes.Name,
"{UPC}", meta.Data[0].Attributes.Upc,
Expand Down

0 comments on commit 5a0bce5

Please sign in to comment.