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

title and artist from --metadata-from-title is parsed by the last occurance of the separator string not the first occurance. #13065

Closed
yjs990427 opened this issue May 12, 2017 · 1 comment

Comments

@yjs990427
Copy link

@yjs990427 yjs990427 commented May 12, 2017

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 that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.05.09. 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 2017.05.09

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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl https://www.youtube.com/watch?v=xRHsEWIC8PI -x --metadata-from-title "%(artist)s - %(title)s" --add-metadata
[youtube] xRHsEWIC8PI: Downloading webpage
[youtube] xRHsEWIC8PI: Downloading video info webpage
[youtube] xRHsEWIC8PI: Extracting video information
[youtube] xRHsEWIC8PI: Downloading MPD manifest
[download] Destination: NieR - Automata OST - Wretched Weaponry (Quiet - Vocals)-xRHsEWIC8PI.webm
[download] 100% of 5.59MiB in 00:00
[fromtitle] parsed title: Vocals)
[fromtitle] parsed artist: NieR: Automata OST - Wretched Weaponry (Quiet
[ffmpeg] Destination: NieR - Automata OST - Wretched Weaponry (Quiet - Vocals)-xRHsEWIC8PI.opus
Deleting original file NieR - Automata OST - Wretched Weaponry (Quiet - Vocals)-xRHsEWIC8PI.webm (pass -k to keep)
[ffmpeg] Adding metadata to 'NieR - Automata OST - Wretched Weaponry (Quiet - Vocals)-xRHsEWIC8PI.opus'
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

So the title of the video is NieR - Automata OST - Wretched Weaponry (Quiet - Vocals) and I used "%(artist)s - %(title)s" to parse video as title of "Wretched Weaponry (Quiet - Vocals)" not "Vocals)" which is what youtube-dl is doing right now (parsing from the end).
Is there a way I can make youtube-dl parse the title as I want to?

@yjs990427 yjs990427 changed the title title and artist from --metadata-from-title is parsed by the last occurance not the first occurance. title and artist from --metadata-from-title is parsed by the last occurance of the separator string not the first occurance. May 12, 2017
@dstftw dstftw closed this in fa26734 May 13, 2017
@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 13, 2017

Since next version this will be possible with regex syntax --metadata-from-title "(?P<artist>.+?) - (?P<title>.+)".

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.