reintroduce split_album_discs config

This commit is contained in:
Mike Schwörer 2021-11-19 00:37:13 +01:00
parent 543567079b
commit c836240b30
No known key found for this signature in database
GPG Key ID: D3C7172E0A70F8CF

View File

@ -179,13 +179,28 @@ class Config:
if v: if v:
return v return v
if mode == 'playlist': if mode == 'playlist':
if cls.get_split_album_discs():
split = os.path.split(OUTPUT_DEFAULT_PLAYLIST)
return os.path.join(split[0], 'Disc {disc_number}', split[0])
return OUTPUT_DEFAULT_PLAYLIST return OUTPUT_DEFAULT_PLAYLIST
if mode == 'extplaylist': if mode == 'extplaylist':
if cls.get_split_album_discs():
split = os.path.split(OUTPUT_DEFAULT_PLAYLIST_EXT)
return os.path.join(split[0], 'Disc {disc_number}', split[0])
return OUTPUT_DEFAULT_PLAYLIST_EXT return OUTPUT_DEFAULT_PLAYLIST_EXT
if mode == 'liked': if mode == 'liked':
if cls.get_split_album_discs():
split = os.path.split(OUTPUT_DEFAULT_LIKED_SONGS)
return os.path.join(split[0], 'Disc {disc_number}', split[0])
return OUTPUT_DEFAULT_LIKED_SONGS return OUTPUT_DEFAULT_LIKED_SONGS
if mode == 'single': if mode == 'single':
if cls.get_split_album_discs():
split = os.path.split(OUTPUT_DEFAULT_SINGLE)
return os.path.join(split[0], 'Disc {disc_number}', split[0])
return OUTPUT_DEFAULT_SINGLE return OUTPUT_DEFAULT_SINGLE
if mode == 'album': if mode == 'album':
if cls.get_split_album_discs():
split = os.path.split(OUTPUT_DEFAULT_ALBUM)
return os.path.join(split[0], 'Disc {disc_number}', split[0])
return OUTPUT_DEFAULT_ALBUM return OUTPUT_DEFAULT_ALBUM
raise ValueError() raise ValueError()