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

Optional parse parameters #11123

Open
Spenhouet opened this issue Nov 5, 2016 · 0 comments
Open

Optional parse parameters #11123

Spenhouet opened this issue Nov 5, 2016 · 0 comments
Labels

Comments

@Spenhouet
Copy link

@Spenhouet Spenhouet commented Nov 5, 2016

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

  • I've verified and I assure that I'm running youtube-dl 2016.11.04

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

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)
  • Feature request (request for a new functionality)
  • Question
  • Other

What i want to achieve:

For example, if i want to download all Songs from this youtube channel: EMH Music

There are songs that have the following titles:

  1. Joachim Pastor - Laos
  2. Erland - Liquid (Chiaro Remix)
  3. [Electro House] Blaynoise - Devil's Dance
  4. [Dark Electro] Owl Vision - Oblique (Mathematic Remix)

As you can see there ist different metadata in the title, like the artist, track, genre, alt_title.

I would like to read all of this metadata in a single run.

How it works (doesn't work) at the moment:

If i define a parse string like
--metadata-from-title "[%(genre)s] %(artist)s - %(title)s (%(alt_title)s)"
the parsing only works on the Song 4 and fails on 1, 2 and 3.

Possible solutions:

Add a optional flag

There could be a character in the parse string that flags some part as optional.
For example: "?[%(genre)s] ?%(artist)s - %(title)s? (%(alt_title)s)?"
This string would still get the artist and title if the genre or alt_title is missing.

Allow multiple parse strings:

There could me multiple parse strings. If the first fails, the second one is parsed and so on. If it doesn't fail it doesn't parse the other strings.
For example:
--metadata-from-title "[%(genre)s] %(artist)s - %(title)s (%(alt_title)s)"
--metadata-from-title "%(artist)s - %(title)s (%(alt_title)s)"
--metadata-from-title "[%(genre)s] %(artist)s - %(title)s"
--metadata-from-title "%(artist)s - %(title)s"

@dstftw dstftw added the request label Nov 6, 2016
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.