-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fetchart: Restore iTunes Store source #2718
Conversation
Cool! I'm very much in favor of adopting the code ourselves to help get this functionality back into shape. Let's do it! Trimming the necessary code down to its essence does make it possible to keep things simple. If we can get @ocelma's consent to relicense the code under MIT, let's provide proper attribution and start simplifying down from there. After a quick look, it seems like it shouldn't be too hard to pull out the pieces we need. On the other hand, if we don't hear back from @ocelma, then publishing a separate module to PyPI would be an acceptable fallback that would keep the GPL implications contained. |
This should be waaaaay simpler. |
Wow; this does indeed look way better. Awesome! Could you please update the docs to clarify that this plugin no longer needs a dependency? (A changeling entry would also be rad. 😎) |
Reimplement minimalistic itunes scraper from scratch
Some typos + make it more useful overall
I am currently writing the changelog and doc before merging. |
I elected to simply revert (some parts of) the fetchart doc to what it was before #2540. Ready to merge I think. |
Appveyor/branch fail is a simple timeout of the launching of the whole test run due resource unavailability if I read the message correctly. Feel free to merge whenever if this suits you, @sampsyo ! |
Looks perfect! Thanks for all your effort on this. ✨ 🤖 🐟 🌟 Your earlier question about criteria for inclusion as a default source is a good one. Fast-ish is a good idea, but it seems like this source will be pretty fast too. The exact definition of “fast enough” is open to interpretation. |
I would like to add a note about iTunes Store rate limiting. The doc says it is limited to about 20calls per minute. Trying by hand it is definitely higher, but I was still able to get rate-limited. For that reason this provider might start to error out and not provide candidate during a batch import, for which it might not be the ideal provider. Is this worth mentioning somewhere? What makes me not like this is that the failure is silent unless beets runs in verbose mode, so there could be some extreme case where no cover/a non-perfect is found although one is available on the itunes store and the user is not aware of that. A possibility would be to check if the http error can be detected for rate-limiting and then issue a warning of some kind. |
Hmm; interesting point. Another alternative would be voluntarily rate limit ourselves—that is, keep track of how much we’re requesting and gradually slow things down. But 3 seconds per call (on average) is pretty slow. It’s probably worth at least mentioning in the docs. A visible warning may be fine but could get noisy and annoying in the context of a full, interactive import. |
Correction: I actually made a typo when mashing my keyboard to test the rate limiting.
I can't seem to reach the limit even when letting it loop for 10 minutes straight. You could try it out on your side, but I think for the moment we can leave it at that. |
Aha; that’s great to know. Let’s leave it here and revisit it if problems crop up. |
This is a tentative at addressing #2551 . For the moment this is very much a work in progress, but I would like to discuss some points.
For the moment I took python-itunes from @ocelma, stripped it of some unnecessary stuff and fixed some stuff to make python3 compatible.
Open questions are:
To fix: