user234683 / youtube-local

browser-based client for watching Youtube anonymously and with greater page performance
GNU Affero General Public License v3.0
486 stars 62 forks source link

How to make it respect the "prefer integrated sources" option in all situations? #164

Closed khlsvr closed 6 months ago

khlsvr commented 1 year ago

This video https://www.youtube.com/watch?v=RhHkUg-QCwk has integrated 144p and integrated 360p available. In my settings I have toggled on to prefer integrated, and also have set default resolution to be 720p. However in this video it picks 420p25 as the source, as it doesn't have 720p available. It doesn't respect the "prefer integrated sources" settings over choosing a quality that is closer to the default resolution I suppose. If I change the default resolution to 360p, then it picks up the integrated 360p video by default, but I would rather have it pick 720p integrated when available.

In my system I have not been able to make other than integrated sources to work. Other sources just give me a black screen in the player. I'm on Arch linux. So whenever I encounter a scenario like this where it picks other than integrated source, I need to manually switch the source. Any tips?

user234683 commented 1 year ago

As a workaround, you can change line 700 in ./youtube/watch.py from         bool(pair_sources) and (not uni_sources or closer_to_target == 'pair') to         bool(pair_sources) and (not uni_sources)