Trying to work with images and the Image cache...
#1
With the cdART Manager script there are times that images need to be updated, the Image cache in XBMC makes this difficult. I don't think there is a clear way to visually update the image.

Except for the following ways....
  1. Wait for 24hrs(or there abouts I think)
  2. Over write the thumbnail and force a Reload of the skin.

The second option is what I think the Logo Downloader does(not 100% sure) But this works fine for the skin but does nasty things to my script. Using the builtin command XBMC.ReloadSkin() (xbmc.executebuiltin( 'XBMC.ReloadSkin()' )) causes the addon's skin to deinitialize(and also the main skin) then try to re-initialize. This does not work.. XBMC seems to build the path to the addon's skin incorrectly and does not load the addons skin but kicks back to the MyPrograms.xml file, with the addon still running(but no way to shut it down(besides the obvious restart XBMC) )

The Line:
Code:
ERROR: LoadXML: Unable to load skin file /usr/share/xbmc/addons/skin.confluence/720p/home/xbmc/.xbmc/addons/script.cdartmanager/resources/skins/Default/720p/script-cdartmanager.xml

is the error due to the incorrect path(or the addon's skin path added to the skin path)

clip from debug log:
Code:
19:06:45 T:3017578304 M:2639175680    INFO: Unloading old skin ...
19:06:45 T:3017578304 M:2639175680   DEBUG: ------ Window Deinit (MyPrograms.xml) ------
19:06:45 T:3017578304 M:2637742080   DEBUG: ------ Window Deinit (/home/xbmc/.xbmc/addons/script.cdartmanager/resources/skins/Default/720p/script-cdartmanager.xml) ------
19:06:45 T:3017578304 M:2637742080   ERROR: ClearBlock: Trying to clear non existent block /home/xbmc/.xbmc/addons/script.cdartmanager
19:06:45 T:3017578304 M:2637742080   ERROR: Previous line repeats 1 times.
19:06:45 T:3017578304 M:2637742080 WARNING: Cleanup: Having to cleanup texture cdman-button-focus.png
19:06:45 T:3017578304 M:2637742080 WARNING: Cleanup: Having to cleanup texture /media/tower_music/FLAC/Bon Jovi/7800 Fahrenheit (Special Edition)/cdart.png
19:06:45 T:3017578304 M:2641551360 WARNING: Cleanup: Having to cleanup texture /media/freenas/MP3 Music/Full Albums/Bon Jovi/Bon Jovi/cdart.png
19:06:45 T:3017578304 M:2645487616 WARNING: Cleanup: Having to cleanup texture /media/freenas/MP3 Music/Full Albums/Bon Jovi/Bounce/cdart.png
19:06:45 T:3017578304 M:2649550848 WARNING: Cleanup: Having to cleanup texture /media/freenas/MP3 Music/Full Albums/Bon Jovi/Cross Road/cdart.png
19:06:45 T:3017578304 M:2653487104 WARNING: Cleanup: Having to cleanup texture /media/freenas/MP3 Music/Full Albums/Bon Jovi/Crush/cdart.png
19:06:45 T:3017578304 M:2657550336 WARNING: Cleanup: Having to cleanup texture /media/freenas/MP3 Music/Full Albums/Bon Jovi/Have A Nice Day/cdart.png
19:06:45 T:3017578304 M:2661613568 WARNING: Cleanup: Having to cleanup texture /media/freenas/MP3 Music/Full Albums/Bon Jovi/Keep The Faith/cdart.png
19:06:45 T:3017578304 M:2665549824 WARNING: Cleanup: Having to cleanup texture /home/xbmc/.xbmc/addons/script.cdartmanager/resources/skins/Default/media/missing_cdart.png
19:06:45 T:3017578304 M:2669613056 WARNING: Cleanup: Having to cleanup texture /media/freenas/MP3 Music/Full Albums/Bon Jovi/7800 Fahrenheit/cdart.png
19:06:45 T:3017578304 M:2673549312   DEBUG: Cleanup - Closed bundle
19:06:45 T:3017578304 M:2704531456    INFO:   load skin from:/usr/share/xbmc/addons/skin.confluence
19:06:45 T:3017578304 M:2704531456    INFO: Loading skin includes from /usr/share/xbmc/addons/skin.confluence/720p/includes.xml
19:06:45 T:2975640432 M:2704531456   DEBUG: UDPCLIENT TX: 54185        -> '<b>OnAction:7;2</b>'
19:06:45 T:3017578304 M:2704531456    INFO:   load fonts for skin...
19:06:45 T:3017578304 M:2704531456    INFO: Loading fonts from /usr/share/xbmc/addons/skin.confluence/720p/Font.xml
19:06:45 T:3017578304 M:2704404480    INFO:   load new skin...
19:06:45 T:3017578304 M:2704404480    INFO: Loading skin file: Home.xml
19:06:45 T:3017578304 M:2704404480   DEBUG: Load Home.xml: 47.83ms
19:06:45 T:3017578304 M:2704404480    INFO: Loading user windows, path /usr/share/xbmc/addons/skin.confluence/720p
19:06:45 T:3017578304 M:2704277504   DEBUG: Load Skin XML: 63.05ms
19:06:45 T:3017578304 M:2704277504    INFO:   initialize new skin...
19:06:45 T:3017578304 M:2704277504   DEBUG: guilib: No algorithm for solving rendering passes
19:06:45 T:3017578304 M:2704277504    INFO: Loading skin file: Pointer.xml
19:06:45 T:3017578304 M:2704277504   DEBUG: Load Pointer.xml: 0.64ms
19:06:45 T:3017578304 M:2704277504    INFO: Loading skin file: DialogVolumeBar.xml
19:06:45 T:3017578304 M:2704277504   DEBUG: Load DialogVolumeBar.xml: 1.16ms
19:06:45 T:3017578304 M:2704277504    INFO: Loading skin file: DialogKaiToast.xml
19:06:45 T:3017578304 M:2704277504   DEBUG: Load DialogKaiToast.xml: 1.24ms
19:06:45 T:3017578304 M:2704277504    INFO: Loading skin file: DialogMuteBug.xml
19:06:45 T:3017578304 M:2704277504   DEBUG: Load DialogMuteBug.xml: 0.55ms
19:06:45 T:3017578304 M:2704277504    INFO: Loading skin file: DialogSeekBar.xml
19:06:45 T:3017578304 M:2704277504   DEBUG: Load DialogSeekBar.xml: 5.38ms
19:06:45 T:3017578304 M:2704277504    INFO: Loading skin file: DialogBusy.xml
19:06:45 T:3017578304 M:2704277504   DEBUG: Load DialogBusy.xml: 0.79ms
19:06:45 T:3017578304 M:2704277504   ERROR: ClearBlock: Trying to clear non existent block /home/xbmc/.xbmc/addons/script.cdartmanager
19:06:45 T:3017578304 M:2704277504    INFO: Loading skin file: /home/xbmc/.xbmc/addons/script.cdartmanager/resources/skins/Default/720p/script-cdartmanager.xml
19:06:45 T:3017578304 M:2704277504   ERROR: LoadXML: Unable to load skin file /usr/share/xbmc/addons/skin.confluence/720p/home/xbmc/.xbmc/addons/script.cdartmanager/resources/skins/Default/720p/script-cdartmanager.xml
19:06:45 T:3017578304 M:2704277504   DEBUG: Load /home/xbmc/.xbmc/addons/script.cdartmanager/resources/skins/Default/720p/script-cdartmanager.xml: 0.82ms
19:06:45 T:3017578304 M:2704277504    INFO:   skin loaded...
19:06:45 T:3017578304 M:2704277504   DEBUG: Activating window ID: 10001
19:06:45 T:3017578304 M:2704277504   DEBUG: ------ Window Deinit (MyPrograms.xml) ------
19:06:45 T:3017578304 M:2704277504   DEBUG: ------ Window Init (MyPrograms.xml) ------
19:06:45 T:3017578304 M:2704277504    INFO: Loading skin file: MyPrograms.xml
19:06:45 T:3017578304 M:2704277504   DEBUG: OpenBundle - Opened bundle /usr/share/xbmc/addons/skin.confluence/media/Textures.xbt
19:06:45 T:3017578304 M:2704277504   DEBUG: Load MyPrograms.xml: 46.73ms
19:06:45 T:3017578304 M:2704277504   DEBUG: Alloc resources: 49.43ms (47.78 ms skin load)

It would be nice to have a way to trigger a refresh of the image cache as well with out having to refresh the skin(if that is possible)
Reply
#2
The xml loading issue looks like a bug, yeah. Please post on trac with a solid way to reproduce.

For refreshing images in the imagecache, the problem is that current nothing exposes the imagecache at all - i.e. it's entirely automatic.

What sort of image updating are you doing (and why), so I can get a handle on what we need to expose.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
For my script, cdART Manager, the user can download different types of artwork(cdART, cover Art, Artist Fanart, clearLOGOs) from the website fanart.tv. The script displays the local artwork(whenever possible). Sometimes there is local artwork that has an updated artwork on the site, if the user downloads this new image, the script saves it to the exact same file name as the old artwork. I know this image will eventually be refreshed into the imagecache, it would be nice to request an update so the image is proper. I don't know how difficult it would be to, the script to pass a command something like 'xbmc.updateimageCache( path to image)'
Reply
#4
I had this problem too... Anyone found out if this is a bug or if there is any workaround?

Thanks
Reply
#5
We are now using the same method as logo-downloader:
1. remove the cached file and replace it with new one
2. XBMC.ReloadSkin()

I was thinking of maybe directly removing the entry from the cache6.db so when the image is loaded it will be refresh or doesn't this work that way?
The solution Giftie offers would be much better if possible.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
Trying to work with images and the Image cache...0