Open basdp opened 8 months ago
My thought: When it crashes/on startup grep all lines containing artist in logs. Save to ouput.txt In output.txt find full library, add All other lines that end in ] using some count function i guess.
grep -r 'Artist' /sptnr/logs | awk '{print}' > /sptnr/output.txt Then just count every line. Subtract 1 for 0. use that number to continue where you left off.
output to .env file probably. Or update a key in .env file.
Maybe when it first starts set the index to 0.
Could go further grep 'artists' find the int at the end should be your full library size of artists. set it as your LIMIT
As far as i got for tonight, been working on beets all day not working hopefully get this working Edit: it does work, just keeps timing out I'm assuming from spotify rate limit. Just need something to add a little time between each run. Was thinking just have the container restart over and over till finished lol, but think it might need a PR Edit2: ah or just use -s 1 -l 1 in a bash script to loop around the whole library. Whether crashes on the artist or succeeds atleast will mostly get done? We'll see
When a call fails, it throws an exception to the user. For instance:
I would expect the call to be retried on exception, and ultimately, if an exception occurs more than once for a track/album, skip it and continue.
An exponential backoff for retrying would also be cool. Especially when you get rate-limited or the Spotify servers/Navidrome is overloaded.