Open chreeg11 opened 6 days ago
Please post output with -v debug
so we have more logging to understand what is going on.
Thanks so much for the response, here you go. "Minutes" might be dramatic here, it was about ~2 minutes? Here are command line args I used, I deleted the sqlite cache before repro'ing:
Command Line: "The Local Honeys" "The Local Honeys" 600 c:\foo\bar\album.jpg -v debug
Spew:
2024-07-05 12:54:05,345 WARNING [Main] jpegoptim could not be found, JPEG crunching will be disabled
2024-07-05 12:54:05,345 WARNING [Main] optipng or oxipng could not be found, PNG crunching will be disabled
2024-07-05 12:54:05,349 DEBUG [Cache] Total size of file 'C:\Users\
Seems like the itunes query returns way too many bogus results for the search query. Propose perhaps filtering with artist name and album name in the itunes implementation of parseResults to avoid calling probeUrl for all 45 results (~44 of which are incorrect)?
artist_name = result["artistName"] album_name = result["collectionName"] if search_artist.lower() != artist_name.lower(): continue if search_album.lower() != album_name.lower(): continue
Yes it makes total sense, I have added filtering similar to what you suggest in 4767deb038ecc6d048dce312ecbeaec0ae25b4f6.
Can you test this commit to confirm it's better?
What is actually slowing everything down is the rate limit. Amazon is such a pain, they don't have transparent rules about acceptable rate, have different behavior depending on location, etc. I have considered several times dropping the Amazon sources for this reason, but they still return high quality results.
Works great, thank you for quick turnaround!! This is a great project/tool FWIW.
I'm on windows and use the sacad.exe version when I'm not using vscode (so not calling python directly). If I want to consume this new commit with the sacad.exe, what do I need to do? Is that documented somewhere?
Great tool, I use it during live streams to present album art so having quick responses is key. sometimes sacad will hang for multiple minutes after it fails to find an album cover but then eventually finds it and succeeds in writing out the album art. So it's great that it eventually finds it, not so great that it takes minutes after failing to find it initially. I'm not sure if this is specific to failing to find album art via AmazonCdCoverSource or if this is a general "can't find" issue? Below is example spew from sacad when it hits this random hang. Can anything be done about this?
Main: jpegoptim could not be found, JPEG crunching will be disabled Main: optipng or oxipng could not be found, PNG crunching will be disabled DeezerCoverSource: Got 2 relevant (3 excluded) results from source 'DeezerCoverSource' DiscogsCoverSource: Got 2 relevant (0 excluded) results from source 'DiscogsCoverSource' LastFmCoverSource: Got 0 relevant (5 excluded) results from source 'LastFmCoverSource' AmazonCdCoverSource: Search with source 'AmazonCdCoverSource' failed: ClientResponseError 503, message='Service Unavailable', url=URL('https://www.amazon.com/s?i=popular&rh=p_32:the+local+honeys,p_28:the+local+honeys&s=relevancerank') AmazonDigitalCoverSource: Search with source 'AmazonDigitalCoverSource' failed: ClientResponseError 503, message='Service Unavailable', url=URL('https://www.amazon.com/s?k=the+local+honeys+the+local+honeys&i=digital-music&s=relevancerank')
<---- This is where it ends up hanging before eventually finding it with ItunesCoverSoruce ---->
ItunesCoverSource: Got 45 relevant (0 excluded) results from source 'ItunesCoverSource' Cover: Reference is: DiscogsCoverSourceResult 'https://i.discogs.com/Eq4dWsAh_K4DGviBUf9Ff2upcblDCK5M9fDznd_mHiY/rs:fit/g:sm/q:90/h:600/w:600/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTI0NzUx/NTcxLTE2NjUxNjg0/MTgtNzMzOS5qcGVn.jpeg' Cover: Downloading cover 'https://i.discogs.com/Eq4dWsAh_K4DGviBUf9Ff2upcblDCK5M9fDznd_mHiY/rs:fit/g:sm/q:90/h:600/w:600/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTI0NzUx/NTcxLTE2NjUxNjg0/MTgtNzMzOS5qcGVn.jpeg' (part 1/1)... Wrote The Local Honeys cover to foo.jpg