[REQUEST] background="true" for videoplayer.cover
#1
i'm creating a script that can play random local trailers. i do not know the movie name that the thumb was cached on. it may not have even been cached. so there is no way for me to set the thumb to the proper cached name.

if these are on smb:// shares they do not display when you bring up the video info while watching.

will skinners add background="true" to videoplayer.cover. this solves the issue. maybe the music one also?

here is the code it first checks for a thumb based on trailer name, then it checks for a thumb stripping -trailer. in case you store your trailers with your movies, but trailer ext can be different than movie ext. so i need the above.

thanks
PHP Code:
def _get_thumbnailselfpath ):
        
# check for a thumb based on trailername.tbn
        
thumbnail os.path.splitextpath )[ ] + ".tbn" 
        
# if thumb does not exist try stripping -trailer
        
if ( not xbmc.executehttpapi"FileExists(%s)" % ( thumbnail, ) ) == "<li>True" ):
            
thumbnail "%s.tbn" % ( os.path.splitextpath )[ ].replace"-trailer""" ), )
            
# if thumb does not exist return empty
            
if ( not xbmc.executehttpapi"FileExists(%s)" % ( thumbnail, ) ) == "<li>True" ):
                
# set empty string
                
thumbnail None
        
# return result
        
return thumbnail 
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#2
Not sure I understand the problem here. You're playing a local video file (the trailer) so you're wanting to display the thumb of that trailer. Either the trailer is with the movie, whereby I presume you want the movie thumb, or the trailer is elsewhere whereby your only option is the trailer thumb.

The latter I presume may not have been cached - is this the problem?
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
yes i want the movie thumb, but as i said i don't know the movie filename. i only search for vids with -trailer in them and don't want the extra code to check for a movie.

the trailers ext is in many cases different so the cache name can not be calculated.

plus if i'm using the amt current scraper, the thumb is a http:// url and i don't want to handle downloading the thumb myself.

but i did notice with background="true" xbmc does not seem cache the thumb, so everytime you press "I" it re downloads them.

see for the script http://forum.xbmc.org/showthread.php?tid=55628
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#4
Correct - XBMC cannot and will not cache a thumb unless you tell it to (which means doing it code-side, of which there quite probably isn't any support to python). All you're doing with background="true" is making it pass through the largetexturemanager which reads from the VFS rather than the normal texturemanager which (for speed reasons) only allows local files.

What we really need is a thumb manager that actually manages thumbs :p

That way all you do is specify where you think the thumb might be grabbed from, and ListItem.Thumb would query the thumbmanager, automatically use the cached one if it's there, or automatically cache the thumb if it's not there but we have a hint as to where it could be found.

Cheers,
Jonathan
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

Logout Mark Read Team Forum Stats Members Help
[REQUEST] background="true" for videoplayer.cover0