Closed PeterNjeim closed 1 year ago
Currently the subtitles "overlap" and so it doesn't show all the possibilites, this is on purpose since I plan on making a separate menu just like the desktop YouTube version
Basically, what I did was make something called PageInfo, which is similar to VideoInfo, and I also made something called RegExpAndJsonPath, which is similar to both RegExp and JsonPath (because I download an HTML page, then use RegExp to extract the JSON, then use JsonPath to parse it). Then I added the boilerplate in the service folder and that's pretty much it.
Thanks, friend. I'll check the pull request.
It's in draft mode right now, since I plan on fixing up the remaining tasks, so no need to review it currently unless you want to change the direction I'm going with it right now
@PeterNjeim agreed. The code should be checked first. Maybe I'll do the rest.
I'm having lots of trouble with this. As far as I can tell, in PlayerUIManager
, I can't dynamically change the settingsPresenter
after showDialog
is called, meaning there's no way to make a category for auto-translated subtitles which dynamically updates its options to match the selected subtitle (if user selects Spanish subtitles, show subtitles translated from Spanish). If there are multiple human-translated languages, the number of auto-translated languages gets very large, on some popular videos it's over 1500, so showing all the subtitles is not an option. Is there any way you could make it so that there could be a dynamic radio category for the settingsPresenter
? If not, as a workaround users would need to click back twice to go to the player UI, and then click on the subtitles button a second time to enable the auto-translate option.
Seems that I've found an easier way for this. Thanks for your efforts.
Based on yt-dlp's implementation (yt_dlp/extractor/youtube.py#L3637-L3699)
tlang
URL parameter at the end of the baseURL's for the subtitles that already exist (since for those ones you already bypassed the age-restriction). However, you would need to keep up with YouTube whenever they change what auto-translated languages are available, and also provide the language names yourself)Resolves https://github.com/yuliskov/SmartTubeNext/issues/244 Resolves https://github.com/yuliskov/SmartTubeNext/issues/1407 Resolves https://github.com/yuliskov/SmartTubeNext/issues/1741 Resolves https://github.com/yuliskov/SmartTubeNext/issues/1745