-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bugfix: songs being dropped when adding them to the queue #56
Conversation
I don't like copying pafy source (with modifications) to fix something which should be solved upstream. We should rather pressure the upstream pafy repo to fix this and publish the update. Our bot isn't critical, nor in widespread usage, so I don't this PR is warranted, at least not like this. If we had many users and some promise of uptime, that'd be a different story. |
What's the issue? I've already done what I can to pressure this upstream by approving the PR I linked. And most importantly...it works :o |
All right. I thought the pafy repo were actively maintained. Disregard my last comment. If we copy the source from a GPL repo, we might need to set the licence for this repo to GPL as well. Currently there is no licence. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
- Some ideas for handling lack of
*like_count
. - Please add a licence to this repo. I don't know how to lawyer; can the licence be MIT? Apache? GPL? I think GPLv3 is a safe choice, since the code you're "borrowing" is GPLv3 as well.
Fixed :) thanks for reminding me about the license! |
This PR fixes a bug where songs are often dropped when trying to add them to the queue. It does this by fixing the "dislike_count" error that popped up after youtube removed dislikes on their videos.
A side effect is that it seems to speed up the time it takes to add multiple songs to the queue, so it might help with #49 (comment).
I've simply customized
pafy.new()
so that the_dislikes
variable of its youtube backend has a default value if none is found.I'll probably add a PR to the pafy repository as wellSomeone beat me to it: mps-youtube/pafy#305. In the meantime though, this dirty fix should do the trick.