[RELEASE] getdbinfo - retreive data from the database like movie-year, -genre etc.
#1
Hi all

Note that this script is primary for skinners!

Well i don't know if im the only one that was little bit tired, off always having to go to library mode and then got into year list and then choose the list from year i wanted to be displayed.

what i have made is a script that can retreive that data so it is possible to add a list in any movie view without going to the year list or genre list etc. first.

The code is in an early state, because i wanted to see if there was a need for the script, before i develop on the code!

but anyways have a look at these videos to see what i meen!
(don't mind the empty instances in movie year list example, I got that fixed with help from ronie)
http://www.youtube.com/watch?v=ZgT6sddf4Es
http://www.youtube.com/watch?v=VGlFtsfdBfU

the script can be found here:
http://code.google.com/p/getdbinfo/downloads/list

example of usage:
Quote:call of script example:
RunScript(script.getdbinfo,limit=300&getall=True)
RunScript(script.getdbinfo,limit=320&movieyear=True&tvshowgenre=True)

call attributes:
limit - set the limit of instance retrived (default is 30)
musicartists - retrieve music artists
musicyear - retrieve music year
movieyear - retrieve movie year
moviegenre - retrieve movie genre
movieactors - retrieve movie actors
moviecountries - retrieve movie contries
moviedirectors - retrieve movie directors
moviestudios - retrieve movie studios
tvshowyears - retrieve tvshow year
tvshowgenre - retrieve tvshow genre
tvshowstudios - retrieve tvshow studios
getall - retrieve all

skin example:
skin properties:
MovieInfo.%d.year
MovieInfo.%d.genre
MovieInfo.%d.actor
MovieInfo.%d.country
MovieInfo.%d.director
MovieInfo.%d.studio
MusicInfo.%d.year
MusicInfo.%d.artist
TvshowInfo.%d.year
TvshowInfo.%d.genre
TvshowInfo.%d.studio

example of adding a movie genre list:
<control type="list" id="90025">
<posx>300</posx>
<posy>-10</posy>
<width>300</width>
<height>164</height>
<ondown>51</ondown>
<pagecontrol>-</pagecontrol>
<orientation>horizontal</orientation>
<visible>Container.Content(movies)</visible>
<viewtype>list</viewtype>
<scrolltime>200</scrolltime>
<itemlayout height="160" width="160">
<control type="label">
<posx>0</posx>
<posy>2</posy>
<height>32</height>
<align>left</align>
<font>font23</font>
<label>$INFO[ListItem.Label]</label>
<textcolor>green</textcolor>
</control>
</itemlayout>
<focusedlayout height="160" width="500">
<control type="label">
<posx>0</posx>
<posy>2</posy>
<width>500</width>
<height>32</height>
<align>left</align>
<font>light34</font>
<label>$INFO[ListItem.Label]</label>
<textcolor>green</textcolor>
</control>
</focusedlayout>
<content>
<item id="1">
<label>ALL</label>
<onclick>ReplaceWindow(VideoLibrary,return)</onclick>
</item>
<item id="2">
<label>$INFO[Window.Property(MovieInfo.1.genre)]</label>
<onclick>ReplaceWindow(VideoLibrary,special://userdata/addon_data/script.getdbinfo/playlist/moviegenres/$INFO[Container(90025).ListItem.Label].xsp,return)</onclick>
<visible>!IsEmpty(Window.Property(MovieInfo.1.genre))</visible>
</item>
<item id="3">
<label>$INFO[Window.Property(MovieInfo.2.genre)]</label>
<onclick>ReplaceWindow(VideoLibrary,special://userdata/addon_data/script.getdbinfo/playlist/moviegenres/$INFO[Container(90025).ListItem.Label].xsp,return)</onclick>
<visible>!IsEmpty(Window.Property(MovieInfo.2.genre))</visible>
</item>

...

</content>
</control>


example of adding a movie year list:
<control type="list" id="90025">
<posx>300</posx>
<posy>-10</posy>
<width>120</width>
<height>164</height>
<ondown>51</ondown>
<pagecontrol>-</pagecontrol>
<orientation>horizontal</orientation>
<visible>Container.Content(movies)</visible>
<viewtype>list</viewtype>
<scrolltime>200</scrolltime>
<itemlayout height="160" width="160">
<control type="label">
<posx>0</posx>
<posy>2</posy>
<height>32</height>
<align>left</align>
<font>font23</font>
<label>$INFO[ListItem.Label]</label>
<textcolor>green</textcolor>
</control>
</itemlayout>
<focusedlayout height="160" width="160">
<control type="label">
<posx>0</posx>
<posy>2</posy>
<width>160</width>
<height>32</height>
<align>left</align>
<font>light34</font>
<label>$INFO[ListItem.Label]</label>
<textcolor>green</textcolor>
</control>
</focusedlayout>
<content>
<item id="1">
<label>ALL</label>
<onclick>ReplaceWindow(VideoLibrary,videodb://1/3/,return)</onclick>
</item>
<item id="2">
<label>$INFO[Window.Property(MovieInfo.1.year)]</label>
<onclick>ReplaceWindow(VideoLibrary,videodb://1/3/$INFO[Container(90025).ListItem.Label]/,return)</onclick>
<visible>!IsEmpty(Window.Property(MovieInfo.1.year))</visible>
</item>
<item id="3">
<label>$INFO[Window.Property(MovieInfo.2.year)]</label>
<onclick>ReplaceWindow(VideoLibrary,videodb://1/3/$INFO[Container(90025).ListItem.Label]/,return)</onclick>
<visible>!IsEmpty(Window.Property(MovieInfo.2.year))</visible>
</item>
<item id="4">
<label>$INFO[Window.Property(MovieInfo.3.year)]</label>
<onclick>ReplaceWindow(VideoLibrary,videodb://1/3/$INFO[Container(90025).ListItem.Label]/,return)</onclick>
<visible>!IsEmpty(Window.Property(MovieInfo.3.year))</visible>
</item>

...

</content>
</control>

Let me know what you think?

cheers
c_bb
Reply
#2
v1.0.1
- Added Window.Property(getdbinfo.finished) when script has finished retreiving all requested data
Reply
#3
-
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] getdbinfo - retreive data from the database like movie-year, -genre etc.0