Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove zero padding from playlist_index #20582

Closed
blueray453 opened this issue Apr 6, 2019 · 1 comment
Closed

How to remove zero padding from playlist_index #20582

blueray453 opened this issue Apr 6, 2019 · 1 comment

Comments

@blueray453
Copy link

@blueray453 blueray453 commented Apr 6, 2019

The documentation says -

playlist_index (numeric): Index of the video in the playlist padded with leading zeros according to the total length of the playlist

I do not want the leading zeros.

The template I am currently using is

youtube-dl -o '%(playlist_title)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s-%(title)s.%(ext)s'

The file names currently look like the following -

001-First-File.mp4
002-Second-File.mp4
.....
105-HundredFifth-File.mp4

I want it to look like the following -

1-First-File.mp4
2-Second-File.mp4
....
105-HundredFifth-File.mp4

How can I do that?

@blueray453 blueray453 changed the title How to remove leading zero padding from playlist_index How to remove zero padding from playlist_index Apr 6, 2019
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 6, 2019

Use d formatter not s.

@dstftw dstftw closed this Apr 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.