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

Add retry method for iTunes API requests #103

Closed
wants to merge 0 commits into from
Closed

Conversation

shiibe
Copy link
Contributor

@shiibe shiibe commented Aug 30, 2024

Hi! It's me again 😅

This PR just adds an enhancement to my last one. This will attempt to hit the iTunes API up to 3 times if it fails before falling back to MusicBrainz for artwork.

I'm still trying to get to the bottom of why the iTunes API will sometimes return "Service Unavailable", but after some tests it does seem to go through on the second attempt each time it happens.

Apologies for all of the commits, I had a hard time getting my fork up to date. 😓

@NextFire
Copy link
Owner

Is it something that happens often, or is the iTunes API just struggling from time to time?

@shiibe
Copy link
Contributor Author

shiibe commented Aug 30, 2024

Is it something that happens often, or is the iTunes API just struggling from time to time?

I use this at work (listening 6-8 hours a day) and it happens ~5-10 times. The immediate fallback to MB works fine, but it's always nice to have the actual data from iTunes. I've been testing this for a few days now, and every time it's successfully grabbed the data from the API on the second attempt.

I'm still trying to get to the bottom of what's causing the error on the API side of things when I have time.

@NextFire
Copy link
Owner

NextFire commented Aug 30, 2024

Oops, sorry I messed up my push, I wanted to rebase your branch

Can you apply this patch on your fork to reopen this pr? Thanks
0001-Add-retry-method-to-iTunes-API-request.patch

curl -L https://github.com/user-attachments/files/16820569/0001-Add-retry-method-to-iTunes-API-request.patch | git am

@NextFire
Copy link
Owner

Oh well, don't bother, I will just commit the change directly on this repo

@NextFire
Copy link
Owner

609179f

@shiibe
Copy link
Contributor Author

shiibe commented Aug 30, 2024

Thank you! 😄

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.

2 participants