HTML error page being download as thumbnails
Before submitting your issue:
Enable debug logging from settings in SiCKRAGE then try and reproduce the error
Sorry, no debug log - I've only just noticed this as thumbnail artwork is not being loaded by Kodi.
If an HTML error page is encountered, SickRage downloads it as a JPG
(Branch and commit currently being used)
Branch: master Commit: 83f04db5
Steps to reproduce
Snatch episodes with thumbnails from thetvdb.com.
If the remote site (or perhaps some site or server inbetween SickRage and the remote artwork site) generates an error page when SickRage is requesting an artwork file, SickRage will download the HTML error page as the artwork file.
What is the current bug behavior?
When an HTML error page is encountered, this is what SickRage is downloading as the JPG:
<html> <head><title>404 Not Found</title><script src="/cdn-cgi/apps/head/fmFm3KANnnfPtP1n_EgxUXUm2cE.js"></script></head> <body bgcolor="white"> <center><h1>404 Not Found</h1></center> <hr><center>nginx</center> </body> </html>
What is the expected correct behavior?
(What you should see instead)
Only valid JPG artwork should be downloaded. If the downloaded file is not valid, the artwork JPG file should not be created.
Relevant logs and/or screenshots
The thumbnails for S07E06, S07E07 and S07E08 JPG files are not valid JPGs, but HTML error text. The dates might suggest this problem has been present at least a few weeks, although it could be longer and the remote server errors have only started being seen in the last few weeks.
SickRage should validate/verify that any downloaded JPG file is a valid JPG before writing the content to the destination, and SickRage should dispose of any downloaded file if not a valid JPG. This would avoid saving a JPG due to a transient network or remote server issue, and the thumbnail would then be re-downloaded 24 hours later etc.