-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[youtube] Use localized title & channel name #28538
base: master
Are you sure you want to change the base?
Conversation
4174607
to
16bf9a8
Compare
16bf9a8
to
c244a2d
Compare
c244a2d
to
3a9bf60
Compare
3a9bf60
to
d6a4913
Compare
- Fixes ytdl-org#28421 - Fixes ytdl-org#27738 - Fixes ytdl-org#27499 - Fixes ytdl-org#10758 - Fixes mpv-player/mpv#8676
Previously was never getting set because was expecting a string but getting a dict, as evidenced by get_text Surprisingly, can't find an issue to close with this one
d6a4913
to
7ad130c
Compare
If you don't mind, could you explain what your edit does, what the logic behind it is, and in what way does it successfully resolve the issues you are intending to close? At first glance it is hard to tell from just the code change, because the diff is tiny and just changes the order of operations. I am worried that your 'localized version' actually means 'the hardcoded en-US version'. At least two of the issues you referenced are requesting control over the selected language. One is asking for additional commandline switches for retrieving the title/desc in one, multiple or all available languages, like how it's currently done for subtitles. I don't believe this PR addresses these, and may even be working against the goals of those issue reports. |
I appreciate the feedback @theultramage!
Currently, youtube's Example:
It does, without the
I guess I missed this. This PR does not cover this request, as requesting multiple titles/desc requires multiple requests & would require a more complicated change. I believe all subtitles are shipped in a single request?
Not sure what you mean by this. The fact that it is defaulting to the hardcoded en-us?. All in all, I think you are right, and this PR needs a bit more to not just default to Does de-hardcoding the default |
Thank you for the explanation. I've seen multiple reports point out that adding the accept language header had no effect whatsoever, and there was no workaround. You managed to find the cause and patch it in a way that makes the workaround possible, and perhaps opens up a way for future improvements. I was initially worried that just flipping it to default En, closing all the tickets and declaring the problem solved would make the devs complacent and the problem would get even less attention than before. I think this PR is good enough for what it intends to do (assuming there are no other issues), but I would narrow down the list of closed issues to those that are directly addressed by the PR and do not call for any additional work. |
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
Get the localized version of title, channel name
channel
to never be set, expecting wrong typeRelated:
Fixes:
This codebase was a pleasure to work with, kudos