Kodi Community Forum

Full Version: Is this advanced Home Screen View Mod function idea possible in XBMC Skinning-Engine?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
Hi there.
I was wondering wether it would be possible to add a new bit of functionality to the MediaStream home page?

Image

It would be cool if it displayed your latest unwatched Movie & TV files. It would be even cooler if you could navigate over to them and play them directly.

Does anyone know if this is possible?
If it is, I might give it a shot!

Smile

Dan
Its a nice idea indeed but I'm 99.9999% sure it is currently impossible to retreive that sort of information on the homescreen
Love the idea, but in my case I'd prefer having the movies/videos that I'm in the middle of watching... Wink
it may be possible. running a script from startup.xml, that uses
PHP Code:
Window(Home).setProperty(propertyname
calls.

then in home.xml use those properties.

the script would run set the properties and exit. so no script is continuosly running. similar to the weather plugin.
pilluli Wrote:Love the idea, but in my case I'd prefer having the movies/videos that I'm in the middle of watching... Wink

Me too!
Boxee has a list of recent additions/watched items, so perhaps some code could be used from there?

I'm no programmer, so I'll be of no use.
use with a static list
PHP Code:
<content>
    <
item>
        <
label>$INFO[Window.Property(LatestMovie.1.Label)]</label>
        <
label2>$INFO[Window.Property(LatestMovie.1.Label2)]</label2>
        <
onclick>$INFO[Window.Property(LatestMovie.1.OnClick),PlayMedia(,)]</onclick>
        <
thumb>$INFO[Window.Property(LatestMovie.1.Thumb)]</thumb>
        <
visible>!IsEmpty(Window.Property(LatestMovie.1.Label))</visible>
    </
item>
<
content

save as latest_added.py and find a way to run it
PHP Code:
import xbmc
from xbmcgui import Window
from urllib import quote_plus
import re
# limit number to
RECENT_NUMBER 4
# grab the home window
WINDOW Window10000 )
# sql statements
sql_movies "select * from movieview order by idMovie desc limit %d" % ( RECENT_NUMBER, )
sql_episodes "select * from episodeview order by idepisode desc limit %d" % ( RECENT_NUMBER, )
# format our records start and end
xbmc.executehttpapi"SetResponseFormat(OpenRecord,%s)" % ( "<record>", ) )
xbmc.executehttpapi"SetResponseFormat(CloseRecord,%s)" % ( "</record>", ) )
# query the database
movies_xml xbmc.executehttpapi"QueryVideoDatabase(%s)" quote_plussql_movies ), )
episodes_xml xbmc.executehttpapi"QueryVideoDatabase(%s)" quote_plussql_episodes ), )
# separate the records
movies re.findall"<record>(.+?)</record>"movies_xmlre.DOTALL )
episodes re.findall"<record>(.+?)</record>"episodes_xmlre.DOTALL )
# enumerate thru our records and set our properties
for countmovie in enumeratemovies ):
    
# separate individual fields
    
fields re.findall"<field>(.*?)</field>"moviere.DOTALL )
    
# set title
    
WINDOW.setProperty"LatestMovie.%d.Label" % ( count 1, ), fields] )
    
# set year
    
WINDOW.setProperty"LatestMovie.%d.Label2" % ( count 1, ), fields] )
    
# set running time (uncomment below if you want running time for label2)
    #WINDOW.setProperty( "LatestMovie.%d.Label2" % ( count + 1, ), fields[ 12 ] )
    # set path
    
WINDOW.setProperty"LatestMovie.%d.OnClick" % ( count 1, ), fields24 ] + fields23 ] )
    
# set thumbnail
    
thumbnail xbmc.getCacheThumbNamefields24 ] + fields23 ] )
    
WINDOW.setProperty"LatestMovie.%d.Thumb" % ( count 1, ), "special://profile/Thumbnails/Video/%s/%s" % ( thumbnail], thumbnail, ) )
# enumerate thru our records and set our properties
for countepisode in enumerateepisodes ):
    
# separate individual fields
    
fields re.findall"<field>(.*?)</field>"episodere.DOTALL )
    
# set title
    
WINDOW.setProperty"LatestEpisode.%d.Label" % ( count 1, ), fields] )
    
# set season/episode
    
WINDOW.setProperty"LatestEpisode.%d.Label2" % ( count 1, ), "s%02de%02d" % ( intfields13 ] ), intfields14 ] ), ) )
    
# set path
    
WINDOW.setProperty"LatestEpisode.%d.OnClick" % ( count 1, ), fields24 ] + fields23 ] )
    
# set thumbnail
    
thumbnail xbmc.getCacheThumbNamefields24 ] + fields23 ] )
    
WINDOW.setProperty"LatestEpisode.%d.Thumb" % ( count 1, ), "special://profile/Thumbnails/Video/%s/%s" % ( thumbnail], thumbnail, ) ) 
I think he wants the fanart field too nuka Smile
This works really well nuka I had a quick play and its easy to get this sort of thing
http://img261.imageshack.us/img261/129/s...ot050c.jpg
Great idea, might see how this looks in MiniMeedia later too Nod
nice, I guess nuka is the 0,0001%. :p
Very nice addition
Jezz_X Wrote:This works really well nuka I had a quick play and its easy to get this sort of thing
http://img261.imageshack.us/img261/129/s...ot050c.jpg

Holly crap.. thats awesome! loving it, svn that shit Cool lol
Like it, but there should be an option to show / hide the addition.
Waffa Wrote:Like it, but there should be an option to show / hide the addition.

couldn't agree more
Pages: 1 2 3 4 5 6 7 8