[Bug] Cover & poster fail to load if add new movie to radarr through LunaSea
flymin opened this issue · comments
Describe the Bug
Add a new movie to radarr through LunaSea. The cover and poster cannot load.
To Reproduce
In the LunaSea radarr panel, click "+" on upper-right and add a movie. The cover and poster cannot load even after restarting app / clearing the cache / disabling the profile and enabling again.
Expected Behaviour
The cover and poster should display.
Versions
LunaSea v10.2.2 on IOS
Radarr v4.3.2.6857
Additional context
I checked the MediaCover folder of radarr. The fanart and poster exist normally. I tried to add the same item from radarr website and then refresh LunaSea. The cover and poster can display normally.
Bug still present in LunaSea v10.2.3 build 1000000996 and Radarr v4.4.2.6956. I am attaching the log file:
"timestamp": "2023-03-02T13:12:11.466", "type": "Critical", "message": "HttpException: Invalid statusCode: 404, uri = https://radarr.XXX.XXX/api/v3/MediaCover/214/poster-500.jpg?apikey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "error": "HttpException: Invalid statusCode: 404, uri = https://radarr.XXX.XXX/api/v3/MediaCover/214/poster-500.jpg?apikey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Edit: bug only present in iOS version, macOS v10.2.3 build 1000000996 works fine
The issue here is that Radarr adds the movie then internally fetches metadata including images. Sometimes LunaSea has already attempted to fetch the image which was not found because it hasn't been fetched by Radarr yet, which is the reason for the media covers not being present sometimes on newly added content.
I will however look into why the HTTP request is being cached and not attempting a reload, especially after an image cache clear.
I have polished the current implementation to also clear in-memory images and not just persisted images when clearing via the settings. This should hopefully resolve the issue on newly fetched images which may not have loaded correctly. Please test in the next stable release and re-open the issue if the problem still occurs.