2012-05-29, 13:54
hi
following problem: i need the absolute path for the thumbnail of the currently played video.
i am using xbmc.getCacheThumbName() but this only returns a filename which cannot be used directly, eg: 8765432.tbn'.
the 'real' file would be (on linux): /home/someuser/.xbmc/userdata/Thumbnails/Video/8/auto-8765432.tbn
i couln't find a 'clean' / 'beautiful' way for this and i am now using this code:
thumbnail_rel = xbmc.getCacheThumbName( xbmc.getInfoLabel("Player.Filenameandpath") )
thumbnail_abs = xbmc.translatePath( "special://profile/Thumbnails/Video/" ) + thumbnail_rel[0] + "/auto-" + thumbnail_rel
it works. but is there a better way for this?
following problem: i need the absolute path for the thumbnail of the currently played video.
i am using xbmc.getCacheThumbName() but this only returns a filename which cannot be used directly, eg: 8765432.tbn'.
the 'real' file would be (on linux): /home/someuser/.xbmc/userdata/Thumbnails/Video/8/auto-8765432.tbn
i couln't find a 'clean' / 'beautiful' way for this and i am now using this code:
thumbnail_rel = xbmc.getCacheThumbName( xbmc.getInfoLabel("Player.Filenameandpath") )
thumbnail_abs = xbmc.translatePath( "special://profile/Thumbnails/Video/" ) + thumbnail_rel[0] + "/auto-" + thumbnail_rel
it works. but is there a better way for this?