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

Use maximum available resolution for thumbnail #835

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ritiek
Copy link
Member

@ritiek ritiek commented May 31, 2018

This PR improves thumbnail quality in metadata when using mpris API (instead of always falling back to default.jpg). One drawback is that this makes things a little slower (checking if URLs responds with 200 or not). Not sure if it is worth it though, let's decide! See #835 (comment).

Cross reference: mps-youtube/pafy#211

@ids1024
Copy link
Contributor

ids1024 commented Jun 10, 2018

Perhaps change this to call the method from pafy? That means it pulls in pafy's develop branch as a dependency (and we'll need to release a new pafy before/when releasing a new mps-youtube), but I think this is generally a reasonable thing to do.

@ritiek
Copy link
Member Author

ritiek commented Jun 23, 2018

Ok, I've changed it to use Pafy.getbestthumb(). Since most people have youtube-dl installed when using mps-youtube, so there isn't going be any additional delay to fetch the best thumbnail mps-youtube/pafy#211 (comment).

Also, I think we should release a new version of pafy before merging this otherwise we'll get half the issues complaining about Pafy.getbestthumb method not found :D

@vn-ki
Copy link
Member

vn-ki commented Jun 23, 2018

Let's just remove the pafy internal backend. I don't think anyone uses it anymore.

@ritiek
Copy link
Member Author

ritiek commented Jun 23, 2018

Actually, it still lags (about 3s) probably because of util.get_pafy. I'll have to see more into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants