exislow / tidal-dl-ng

TIDAL Media Downloader Next Generation! Up to HiRes Lossless / TIDAL MAX 24-bit, 192 kHz.
GNU Affero General Public License v3.0
332 stars 29 forks source link

[Help] Any way to set 2 digits for track number? #142

Open Exspecto322 opened 3 months ago

Exspecto322 commented 3 months ago

I need Help.

How to force 2 digits format for track numbers?

What operating system are you seeing the problem on?

Windows

Your settings

{"skip_existing": "False", "lyrics_embed": true, "lyrics_file": false, "video_download": true, "download_delay": true, "download_base_path": "H:\\Music\\TidalDLTemp", "quality_audio": "HI_RES_LOSSLESS", "quality_video": "1080", "format_album": "{album_artist}/{album_title}/{album_track_num}. {artist_name} - {track_title}{track_explicit}", "format_playlist": "Playlists/{playlist_name}/{artist_name} - {track_title}", "format_mix": "Mix/{mix_name}/{artist_name} - {track_title}", "format_track": "{album_artist}/{album_title}/{album_track_num}. {artist_name} - {track_title}{track_explicit}", "format_video": "Videos/{artist_name} - {track_title}{track_explicit}", "video_convert_mp4": false, "path_binary_ffmpeg": "C:\\Users\\Administrator\\Documents\\ffmpeg-7.0.1-full_build\\bin\\ffmpeg.exe", "metadata_cover_dimension": "1280", "extract_flac": true, "downgrade_on_hi_res": true}
exislow commented 2 months ago

This function already sets the necessary leading digits / zeroes for album_track_num: https://github.com/exislow/tidal-dl-ng/blob/17390cba7c8276bef5b91f93eca0957ba7e9cbee/tidal_dl_ng/helper/path.py#L91-L95

What exactly is your idea? What do you need this for?

Exspecto322 commented 2 months ago

I am using the exe for Windows, for me albums with less than 10 songs, will always be missing a 0, this happens with singles too image only if the album has more than 10 songs they will all get double digits image this makes it inconsistent, just wondering if there was a way to always have albums and singles named with two digits, from 01 to 09 instead of 1 to 9

romner-set commented 2 months ago

+1, I'd also prefer forcing 2-digit track numbers everywhere for consistency.

ahuber86 commented 20 hours ago

I am also having this same issue, using the Linux CLI version. I would also like a way to force the leading zero, or two-digit track number.

loddar66 commented 6 hours ago

This function already sets the necessary leading digits / zeroes for album_track_num:

https://github.com/exislow/tidal-dl-ng/blob/17390cba7c8276bef5b91f93eca0957ba7e9cbee/tidal_dl_ng/helper/path.py#L91-L95

What exactly is your idea? What do you need this for?

maybe using something like "max(2, int(math.log10(num_tracks)) + 1)" would yield the desired result (minimum 2 digits, even if the number of tracks is below 10)