casualsnek / onthespot

qt based music downloader written in python
GNU General Public License v2.0
745 stars 54 forks source link

feature: adding file naming formatting for songs #25

Closed calvin-li-developer closed 1 year ago

calvin-li-developer commented 1 year ago

currently in the advance settings you can add {track_number} {name}. Is it possible to make it 0{track_number} {name} ?

example:

this should also be changed for the lrc files.

casualsnek commented 1 year ago

You should be able to do that with no issue, but if you use 0{track_number} it will use 010 if you go over 9th track.

calvin-li-developer commented 1 year ago

is there any to format it so that it always have 2 digit placement for songs? I understand you're method works for single digit track number but it would be great if there's option for this.

casualsnek commented 1 year ago

is there any to format it so that it always have 2 digit placement for songs? I understand you're method works for single digit track number but it would be great if there's option for this.

can you try {track_number:0>2d} and see if it works ? This should work as you expect! You can refer to python fstring formats for more !

You may close the issue if this does what you want !