Kodi Community Forum
Is this advanced Home Screen View Mod function idea possible in XBMC Skinning-Engine? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Is this advanced Home Screen View Mod function idea possible in XBMC Skinning-Engine? (/showthread.php?tid=53396)

Pages: 1 2 3 4 5 6 7 8


Is this advanced Home Screen View Mod function idea possible in XBMC Skinning-Engine? - dt1000 - 2009-06-23

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


- Jezz_X - 2009-06-24

Its a nice idea indeed but I'm 99.9999% sure it is currently impossible to retreive that sort of information on the homescreen


- pilluli - 2009-06-24

Love the idea, but in my case I'd prefer having the movies/videos that I'm in the middle of watching... Wink


- Nuka1195 - 2009-06-24

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.


- KidKiwi - 2009-06-24

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!


- mach170 - 2009-06-25

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.


- Nuka1195 - 2009-06-25

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, ) ) 



- Jezz_X - 2009-06-25

I think he wants the fanart field too nuka Smile


- Jezz_X - 2009-06-25

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/screenshot050c.jpg


- skunkm0nkee - 2009-06-25

Great idea, might see how this looks in MiniMeedia later too Nod


- watzen - 2009-06-25

nice, I guess nuka is the 0,0001%. :p


- zag - 2009-06-25

Very nice addition


- garvani - 2009-06-25

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/screenshot050c.jpg

Holly crap.. thats awesome! loving it, svn that shit Cool lol


- Waffa - 2009-06-25

Like it, but there should be an option to show / hide the addition.


- Jezz_X - 2009-06-25

Waffa Wrote:Like it, but there should be an option to show / hide the addition.

couldn't agree more