Flag info from 'Recently Added / Random'
#1
Hi,

What media flag info can you use from a home 'recently added / random' list (id="301" in this case)? I'm trying to pull the video resolution. The ratings have been pulled sucessfully using...

<texture fallback=".../.../blahblah.png">.../.../0.0.png</texture>
<visible>SubString(Container(301).ListItem.Property(ItemRating),0,left)</visible>

However the same method doesn't work for the vid resolution. For example...

<texture fallback=".../.../blahblah.png">.../.../1080p.png</texture>
<visible>SubString(Container(301).ListItem.Property(VideoResolution),1080p,left)</visible>

Cheers
Reply
#2
Check the RecentlyAdded and RandomItems threads for the available properties of each.
Reply
#3
Cheers Hitcher... check your pm!
Reply
#4
If you look in the scripts you'll find that the following properties are given values:
  • Title
  • Rating
  • Year
  • Plot
  • RunningTime
  • Path
  • Trailer
  • Fanart
  • Thumb

It's not hard to add more. In order to get video resolution, you'd have to change the sql string (sql_movies in RandomItems) from (line 69):

Code:
"select * from movieview %sorder by RANDOM() limit %d" % ( unplayed, self.LIMIT, )

to:

Code:
"select movieview.*, streamdetails.iVideoWidth, streamdetails.iVideoHeight from movieview join streamdetails on (movieview.idFile = streamdetails.idFile) %sorder by RANDOM() limit %d" % ( unplayed, self.LIMIT, )

in order to fetch video width and video height.

Then you'd have to add some properties for those. In this example this would be these two lines (could be added at line 83):

Code:
self.WINDOW.setProperty( "RandomMovie.%d.VideoWidth" % ( count + 1, ), fields[ 28 ] )
self.WINDOW.setProperty( "RandomMovie.%d.VideoHeight" % ( count + 1, ), fields[ 29 ] )

EDIT: AH.. too slow :p
Reply

Logout Mark Read Team Forum Stats Members Help
Flag info from 'Recently Added / Random'0