xbmc / Official-Kodi-Remote-iOS

Full-featured remote control for XBMC Media Center. It features library browsing, now playing informations and a direct remote control.
Other
217 stars 104 forks source link

Potential issue with non-loading thumbnails #940

Closed wutschel closed 10 months ago

wutschel commented 11 months ago

Via TestFlight an issue with non-loading posters / banners was reported.

Examples:

Bildschirmfoto 2023-10-05 um 18 15 19

When I looked at the usual images which are loaded, it became obvious that usually these images are the "poster" of additional "art". A while back remote apps were required to update their code to not use "thumbnail", but "poster" (if available). If this is not done, there are wrong images shown -- see https://github.com/xbmc/Official-Kodi-Remote-iOS/pull/107 for the change and the related bug reports.

Problem is, Kodi API provides URLs to image providers like fanart.tv as "poster". These are not locally cached images on the Kodi server. So, in case you need to re-load such images, they might have been removed from the image provider's server. I guess only re-scraping can resolve this problem.

@howie-f, you think this sounds like the underlying root cause? Could you e.g. use another remote (e.g. WebUI) to double check?

howie-f commented 11 months ago

I guess only re-scraping can resolve this problem.

hm, i don't think so. did some quick testing with the following results:

  1. Start Nexus => Clear cache of IOS Remote and restart it => All posters shown
  2. Start Omega = Clear cache Remote and restart => missing posters, album covers, tvshow banners etc.

so honestly i doubt it is an issue of IOS Remote... there were some pullrequests by @rmrector recently merged regarding [guilib][vfs][imagecache] Load video thumbnail images into texture cache example https://github.com/xbmc/xbmc/pull/23134 ff.

could be they changed behaviour but i'm not sure yet

wutschel commented 11 months ago

Thanks for looking into this. So, we have an unexpected change of behavior between Nexus and Omega which results in the issue you are experiencing.

Independent of this, the problem of potentially outdated URLs to poster images will be a problem as well. I am sure it would be conceptually desired to show the same thumbnails on Kodi and the remotes. This would only be guaranteed, if Kodi caches such images and then provides a link to this cached image, instead of pointing to an URL.

rmrector commented 11 months ago

See the Kodi wiki on how to fetch images "through" Kodi in a way that shares the image cache. Probably that's already done, or the remote would fail to show some or all artwork stored locally.

https://kodi.wiki/view/Artwork/Accessing_with_skins_and_JSON-RPC#Kodi-encoded_URL

wutschel commented 11 months ago

Yes, the App does it like described in the Wiki.

@howie-f, just to narrow down further.

  1. Can you try to use the WebUI?
    • I would expect the issue to show up here as well.
  2. And if this should not show the problem can you use the official Remote App release 1.12.1 (from AppStore)?
    • This would fall back to the former version of SDWebImage
howie-f commented 11 months ago

@wutschel exactly

  1. WebUi (Chorus2) works fine with Nexus — but does not with Omega (missing art)
  2. iOS Remote v1.12.1 (3752) works correctly with Nexus — has the same issues with Omega
wutschel commented 11 months ago

Thanks, @howie-f. So this is clearly a problem of Omega and not of any of the remotes. Which leads us to either

  1. problem with image cache, or
  2. problem with Kodi providing access to image cache, or
  3. mismatch between image cache and what is provided via API

Are you able to pull WebUI traces which show working and non-working loading attempts?

howie-f commented 11 months ago

Are you able to pull WebUI traces which show working and non-working loading attempts?

no idea, sorry. i think the json calls from remotes haven‘t changed so this is likely not what we want

howie-f commented 11 months ago

going to bisect the commit that introduced this „regression“

wutschel commented 11 months ago

no idea, sorry. i think the json calls from remotes haven‘t changed so this is likely not what we want

No, not the JSON calls sent, but the responses could show mal-formatted image paths. Recently someone also shared a webUI log which showed non-loading image URLs for TV programs (see https://github.com/xbmc/xbmc/issues/23529). I am not sure how to pull these logs though.

But bisecting will of course also directly point to the change which introduced this regression. Looking forward to see which change caused this.

rmrector commented 11 months ago

I think I found a fix. Tough to find a clear reproduction for the issue, it seemed to happen slowly over time.

xbmc/xbmc#23956

howie-f commented 11 months ago

Tough to find a clear reproduction for the issue

yes

with your pr it is fixed now, but Textures13.db and Thumbnails folder needed to be cleared o see the effect

wutschel commented 10 months ago

Pull Request got merged to Kodi.

howie-f commented 10 months ago

thanks @wutschel