[RELEASE] Random and last items smartplaylist script for Skins

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Martijn Offline
Team Kodi
Posts: 11,586
Joined: Jul 2011
Reputation: 167
Location: Dawn of time
Post: #406
albumidid -> albumid
I think
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,789
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #407
Sure Blush

Sorry for my english, but, you know, I'm French so ...

find quote
MarcosQui Offline
Skilled Skinner
Posts: 1,576
Joined: Nov 2009
Reputation: 93
Post: #408
mikebzh44, all ok now, no more errors in the log.

Thank you.

------------------------------------------------------

Want to know more about the skin? Liked my work and want contribute?
Visit my website
XBMC Brazilian Community Forum
By making a donation, please do not post in the forum, send me an email or PM, thank you.
(This post was last modified: 2013-03-27 18:33 by MarcosQui.)
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,789
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #409
Ok so I will push a new release on github tomorrow.
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,789
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #410
V2.1.1 in on GITHUB :

https://github.com/XBMC-Addons/script.ra...dlastitems

- Fix runtime property to use duration from streamdetails

Because I use Files.GetDirectory JSON function to get movie informations, runtime returned field is not overwrite with streamdetails(video(duration)) returned field, instead of VideoLibrary.GetMovies used by service.skin.widgets.
So now, runtime property is based on duration field and if duration is not set, runtime field is used.

- Fix play property for albums

Thanks to MarcosQui, play property for albums was broken in the last release.

- Add art(thumb) for movies (same value as art(poster) but easiest for skinner to deal with albums and movies smart playlists)

As Martijn have ported this script to Frodo, he also use the same property names. So Art(poster) cas set for movies and Art(thumb) was set for albums. But for custom menus, widgets and backgrounds, skinners have to know if smart playlist is based on albums or movies to use the right property. Now, skinners can use Art(thumb) in any case.

Sorry for my english, but, you know, I'm French so ...

find quote
MarcosQui Offline
Skilled Skinner
Posts: 1,576
Joined: Nov 2009
Reputation: 93
Post: #411
mikebzh44, in this version I get a new error:

Code:
10:35:14 T:5480   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.KeyError'>
Error Contents: ('duration',)
Traceback (most recent call last):
File "C:\Users\Marcos\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandl​astitems.py", line 701, in <module>
_getMovies()
File "C:\Users\Marcos\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandl​astitems.py", line 162, in _getMovies
if streaminfo['duration'] != 0:
KeyError: ('duration',)
-->End of Python script error report<--

------------------------------------------------------

Want to know more about the skin? Liked my work and want contribute?
Visit my website
XBMC Brazilian Community Forum
By making a donation, please do not post in the forum, send me an email or PM, thank you.
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,789
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #412
Oops, sorry I have forgot to push the duration calculation is media_streamdetails function.

Can you give a try now ?

Thanks.

Sorry for my english, but, you know, I'm French so ...

find quote
MarcosQui Offline
Skilled Skinner
Posts: 1,576
Joined: Nov 2009
Reputation: 93
Post: #413
Everything's fine now. Thank you.

------------------------------------------------------

Want to know more about the skin? Liked my work and want contribute?
Visit my website
XBMC Brazilian Community Forum
By making a donation, please do not post in the forum, send me an email or PM, thank you.
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,789
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #414
Quote:To all skinners :

Property Art(poster) for movies is deprecated, use Art(thumb) instead. Will be remove soon Wink

Sorry missunderstund : http://forum.xbmc.org/showthread.php?tid...pid1381406

So Art(poster) and Art(thumb) available for movies.

Sorry for my english, but, you know, I'm French so ...

(This post was last modified: 2013-03-29 13:04 by mikebzh44.)
find quote
Martijn Offline
Team Kodi
Posts: 11,586
Joined: Jul 2011
Reputation: 167
Location: Dawn of time
Post: #415
(2013-03-29 11:06)mikebzh44 Wrote:  To all skinners :

Property Art(poster) for movies is deprecated, use Art(thumb) instead. Will be remove soon Wink

why?
this is the default used in Frodo i would definitely keep this. iirc thumb is something we want te deprecate in some future versions of xbmc

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
(This post was last modified: 2013-03-29 11:55 by Martijn.)
find quote
phil65 Offline
Skilled Skinner
Posts: 4,694
Joined: Mar 2009
Reputation: 64
Location: Cologne, Germany
Post: #416
(2013-03-29 11:06)mikebzh44 Wrote:  To all skinners :

Property Art(poster) for movies is deprecated, use Art(thumb) instead. Will be remove soon Wink

you probably misunderstoood something^^
(This post was last modified: 2013-03-29 12:09 by phil65.)
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,789
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #417
I think so Blush

So before putting this script upside down :

Art(poster) was returned for movies

Art(thumb) was returned for albums

But Live CD Cases background was broken in Aeon Nox for custom menu based on albums smart playlists because XML use Art(poster) even for music playlist :

http://forum.xbmc.org/showthread.php?tid...pid1378513

So what are the right properties this script should return to make everybody happy ??

Art(poster) for movies and for albums ?

Remove Art(thumb) for albums ?

Sorry for my english, but, you know, I'm French so ...

(This post was last modified: 2013-03-29 12:20 by mikebzh44.)
find quote
phil65 Offline
Skilled Skinner
Posts: 4,694
Joined: Mar 2009
Reputation: 64
Location: Cologne, Germany
Post: #418
(2013-03-29 12:17)mikebzh44 Wrote:  I think so Blush

So before putting this script upside down :

Art(poster) was returned for movies

Art(thumb) was returned for albums

But Live CD Cases background was broken in Aeon Nox for custom menu based on albums smart playlists because XML use Art(poster) even for music playlist :

http://forum.xbmc.org/showthread.php?tid...pid1378513

So what are the right properties this script should return to make everybody happy ??

Art(poster) for movies and for albums ?

Remove Art(thumb) for albums ?

Only add Art(thumb) for movies because it can save skinners some code. no changes to the rest.
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,789
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #419
I hear it loud and clear Wink

Sorry for my english, but, you know, I'm French so ...

find quote
Venares Offline
Member
Posts: 76
Joined: May 2010
Reputation: 1
Post: #420
(2013-01-10 17:51)mikebzh44 Wrote:  Fixed for TVShows playlist.

I'm at my office and I can't use github to push my fix so you just have to edit randomandlastitems.py file and go to line 238 :

before
Code:
# Add TV Show fanart and thumbnail for each episode
#_episode["tvshowid"]=_file['id']
art = _episode['art']
_episode["tvshowfanart"]=art.get('tvshow.fanart')
_episode["tvshowthumb"]=art.get('thumb')

after
Code:
# Add TV Show fanart and thumbnail for each episode
#_episode["tvshowid"]=_file['id']
art = _episode['art']
# Add episode ID when playlist type is TVShow
_episode["id"]=_episode['episodeid']
_episode["tvshowfanart"]=art.get('tvshow.fanart')
_episode["tvshowthumb"]=art.get('thumb')

@martijn : could you push this fix on github and on repo ? Thanks.

mikebzh44, seems the latest commit broke this again.
Again, using the two playlists trick with one set to episode works around the issue.
(This post was last modified: 2013-03-30 14:35 by Venares.)
find quote
Post Reply