Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions orpheus/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def __init__(self, private_mode=False):
"track_filename_format": "{track_number}. {name}",
"single_full_path_format": "{name}",
"enable_zfill": True,
"enable_fixed_zfill": True,
"fixed_zfill": 2,
"force_album_format": False
},
"codecs": {
Expand Down
7 changes: 6 additions & 1 deletion orpheus/music_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,12 @@ def download_track(self, track_id, album_location='', main_artist='', track_inde
track_info.tags.track_number = track_index
if number_of_tracks:
track_info.tags.total_tracks = number_of_tracks
zfill_number = len(str(track_info.tags.total_tracks)) if self.download_mode is not DownloadTypeEnum.track else 1

if (self.global_settings['formatting']['enable_fixed_zfill']):
zfill_number = self.global_settings['formatting']['fixed_zfill']
else:
zfill_number = len(str(track_info.tags.total_tracks)) if self.download_mode is not DownloadTypeEnum.track else 1

zfill_lambda = lambda input : sanitise_name(str(input)).zfill(zfill_number) if input is not None else None

# Separate copy of tags for formatting purposes
Expand Down