Posts: 794
Joined: Apr 2011
Reputation:
16
Mizaki
Posting Freak
Posts: 794
I've seen this for a while but thought I'd wait to see if it disappeared with all the cache updates. This might be more of a cache issue?
It looks like any image is returned before it has been cached (I'm guessing). I see this most with new episodes. The image is returned by the rpc but isn't availabl/generated so you get a 404 error. Refresh and it'll show if it's been generated ofc. So I guess it's doing:
Image is available at this address
Write it in DB
Download
Cache
I see some curl errors getting the images and I think it's those that are the problem and the reason for my supposition above.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
No, it's doing:
Write the URL into the video/music database.
...
Cache at some point in the background:
1. Cache.
2. Update the textures database.
...
If you fetch over JSON-RPC before the caching has happened, then we:
1. Remove the queued caching job.
2. Cache.
3. Update the textures database.
4. Return the image.
If you fetch over JSON-RPC as caching is occurring, then we:
1. Wait for the job to finish.
2. Return the image.
At no time, therefore, should there be a problem. Ofcourse, that doesn't mean there's NOT a problem, but we'll need some logs and some clear steps to reproduce the problem to track it down.
Cheers,
Jonathan
Posts: 26,215
Joined: Oct 2003
Reputation:
187
From a quick scan it's doing exactly as it should - the image isn't cached yet, so we check whether the original image exists - curl is failing to stat the image in this case.
One thing you could try is removing the CFile::Exists() check at the end of CImageFile::Exists() (i.e. assume the original image exists if an image:// URL is available) - this might cut down on potential curl failures, but equally, will mean invalid URLs will say they exist, but the Open()/Read() calls will fail.
Cheers,
Jonathan
Posts: 794
Joined: Apr 2011
Reputation:
16
Mizaki
Posting Freak
Posts: 794
If it's expected behaviour, I'll just deal with it. It just seems a bit confusing to offer a URL as available when it isn't.
It may be this just happens to me. If I try the same image that fails over and over, in a browser for example, it loads in as quickly as you would expect. In that top log you can see I tried reloading five or more times. If I get some time (ha!), I'll see if I can nail it down.
Posts: 328
Joined: Jul 2011
Reputation:
7
I seem to be getting the same problem over UPnP.... It would be really good to generate te thumb if its not already if requested by UPnP or RPC. Not sure how feasible that is though...