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

Please add possibility to use leading zero in season_number and episode_number parameters #17841

Closed
sulark opened this issue Oct 8, 2018 · 1 comment

Comments

@sulark
Copy link

@sulark sulark commented Oct 8, 2018

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.10.05. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • [X ] I've verified and I assure that I'm running youtube-dl 2018.10.05

Before submitting an issue make sure you have:

  • [ X] At least skimmed through the README, most notably the FAQ and BUGS sections
  • [X ] Searched the bugtracker for similar issues including closed ones
  • [X ] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • [X ] Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

When using youtube-dl to download tv-shows, and using output templates (-o), it's problematic for sorting purposes that it's not possible to have a leading zero in the numeric numbering of in particular season_number and episode_number parameters.
This leads to none standard naming of tv shows for indexing purposes and listing in popular media center applications/backends as plex and kodi.

I have a temp solution to this, as to manually specify a 0 in the output template, but that is just odd, as it saves files with 3 digit numbering in season and episode format if epidoe equals 10 or above, se below for my naming:

/%(series)s/%(series)s.S0%(season_number)sE0%(episode_number)s.720p.WEB-DL.H264-YTDL.%(ext)s"

As of now the parameters starts counting at 1, but I would really like to have the possibility to start naming at 01

Please add the possibility to use leading zero in season_number and episode_number parameters.

If anybody has a solution with existing options/parameters/strings, please let me know

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 8, 2018

Have you even read FAQ?

The special sequences may be formatted according to python string formatting operations. For example, %(NAME)s or %(NAME)05d.

For numeric sequences you can use numeric related formatting, for example, %(view_count)05d will result in a string with view count padded with zeros up to 5 characters, like in 00042.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.