Fix relative library paths and candidate preview crash#312
Conversation
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
|
Hey hey, thanks for the PR 😃 Could you help us understand the issue a bit better, please? Beets flask (stable) is currently still based on beets 2.5.1 and we are still updating to later versions (e.g. PR #310) Afaik, relative paths in the beets library were only introduced in beets 2.10 so I am a bit confused, what you based your PR on. Did beets already store cover paths in relative format before then? Best, |
|
To be honest I’m pretty new to beets and all. I just checked and you are correct! root@fed699cfff70:/config# beet --version Sounds like I’ve fixed something prior to it being a problem for the masses and already being worked on. At any rate it all works great now (even if it’s just a me thing!) The iPad error handling is still legit and fixed but I will close this PR as self-inflicted. thanks for the app BTW. It’s very cool! |
|
Closing as this is already being worked on in #310 |
Summary
This PR contains two related fixes discovered while deploying and testing beets-flask in a real-world Docker/Unraid environment.
Fix handling of relative Beets library paths so the frontend/API correctly resolves library and asset references when Beets is configured with non-absolute paths.
This resolves issues encountered in containerized deployments where relative paths caused inconsistent behavior during inbox/import operations.
Fix frontend crash during candidate/cover-art preview when artwork retrieval fails.
While testing candidate selection on iPad Safari/WebKit, we discovered the issue was not the import backend itself but frontend error handling in coverArt.tsx.
The app assumed artwork fetch failures would always surface as HTTPError. In reality, browsers can also throw generic fetch/runtime exceptions such as:
TypeError: Load failed
These non-HTTP errors were re-thrown into the React route error boundary, causing the entire candidate/details UI to crash instead of displaying the intended missing-cover placeholder.
Result
Before:
After:
Tested