Renamed to playlistnum
This commit is contained in:
@@ -368,7 +368,7 @@ class EASY_DW:
|
||||
playlist_name = getattr(playlist_data, 'title', 'unknown')
|
||||
self.__song_metadata_dict['playlist'] = playlist_name
|
||||
# 1-based index already stored in preferences during iteration
|
||||
self.__song_metadata_dict['playlist_num'] = getattr(self.__preferences, 'track_number', None) or 0
|
||||
self.__song_metadata_dict['playlistnum'] = getattr(self.__preferences, 'track_number', None) or 0
|
||||
except Exception:
|
||||
# Non-fatal if playlist metadata is not available
|
||||
pass
|
||||
|
||||
@@ -194,7 +194,7 @@ def apply_custom_format(format_str, metadata: dict, pad_tracks=True) -> str:
|
||||
# Fallback for string-based dates like "YYYY-MM-DD" or just "YYYY"
|
||||
return str(value).split('-')[0]
|
||||
|
||||
if pad_tracks and full_key in ['tracknum', 'discnum', 'playlist_num']:
|
||||
if pad_tracks and full_key in ['tracknum', 'discnum', 'playlistnum']:
|
||||
str_value = str(value)
|
||||
# Pad with leading zero if it's a single digit
|
||||
if str_value.isdigit() and len(str_value) == 1:
|
||||
|
||||
@@ -154,7 +154,7 @@ class EASY_DW:
|
||||
if not playlist_name and hasattr(playlist_data, 'title'):
|
||||
playlist_name = getattr(playlist_data, 'title')
|
||||
self.__song_metadata_dict['playlist'] = playlist_name or 'unknown'
|
||||
self.__song_metadata_dict['playlist_num'] = getattr(self.__preferences, 'track_number', None) or 0
|
||||
self.__song_metadata_dict['playlistnum'] = getattr(self.__preferences, 'track_number', None) or 0
|
||||
except Exception:
|
||||
# If playlist info missing, skip silently
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user