[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,568
Joined: Jul 2011
Reputation: 166
Location: Dawn of time
Post: #16
Hitcher Wrote:PS. A readme is always handy in the addon.

there's a readme in the .zip file Wink

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]
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,788
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #17
README.txt(english) and LISEZMOI.txt (french) are provided in the ZIP file.

EDIT : Martijn is the faster Wink

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

find quote
Hitcher Offline
Skilled Skinner
Posts: 10,861
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #18
Sorry, should have downloaded it and checked first.

Thanks anyway.
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,788
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #19
Little problem when running script with Last parameter.

Request does not return movie in date ordre but in alphabetical ordrer, even if I put a sort order on date in JSONRPC request.

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

find quote
BigNoid Offline
Team-Kodi Member
Posts: 3,151
Joined: Jul 2010
Reputation: 102
Location: Below sea level
Post: #20
great initiative, testing it as we speak. just a heads up if this goes to official repo; you should rename the addon to all lowercase, don't think it's allowed to have uppercase in the addon foldername.
find quote
BigNoid Offline
Team-Kodi Member
Posts: 3,151
Joined: Jul 2010
Reputation: 102
Location: Below sea level
Post: #21
I'm not getting any trailer info with this script, is it just me or is it the script?
find quote
Martijn Offline
Team Kodi
Posts: 11,568
Joined: Jul 2011
Reputation: 166
Location: Dawn of time
Post: #22
Getting some error key error. Probably when it is returning nothing as a result

http://paste.ubuntu.com/839679/

http://paste.ubuntu.com/839681/

It's best to catch these. If you want a full log let me know

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]
find quote
fmronan Offline
Fan
Posts: 600
Joined: Dec 2010
Reputation: 4
Post: #23
No info trailer (not sure about that)
(This post was last modified: 2012-02-13 00:38 by fmronan.)
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,788
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #24
Properties raised by the script are :

Playlist<method>Movie<menu>.Count
Playlist<method>Movie<menu>.<# of movie>.Title
Playlist<method>Movie<menu>.<# of movie>.Rating
Playlist<method>Movie<menu>.<# of movie>.Year
Playlist<method>Movie<menu>.<# of movie>.Plot
Playlist<method>Movie<menu>.<# of movie>.RunningTime
Playlist<method>Movie<menu>.<# of movie>.Path
Playlist<method>Movie<menu>.<# of movie>.Trailer
Playlist<method>Movie<menu>.<# of movie>.Fanart
Playlist<method>Movie<menu>.<# of movie>.Thumb

See README.txt in the ZIP file.

But I can add this info if needed.

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

find quote
mikebzh44 Offline
Posting Freak
Posts: 1,788
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #25
The actual version did not handle properly "Recently added movies".
List is return in alphabetical ordre.

But Montellese give me a tip.

I will add to 2 options :
* "Watched" to display only unwatched movies (Random or Last)
* "Resume" to display movies started to watch and not finished

Stay tuned Wink

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

find quote
mikebzh44 Offline
Posting Freak
Posts: 1,788
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #26
Martijn Wrote:Getting some error key error. Probably when it is returning nothing as a result

http://paste.ubuntu.com/839679/

http://paste.ubuntu.com/839681/

It's best to catch these. If you want a full log let me know
Thanks for your logs.

Errors are due to movie sets returned in movie list.

New version will handle this case.

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

find quote
mikebzh44 Offline
Posting Freak
Posts: 1,788
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #27
Version 1.0.2 is available for test :
http://passion-xbmc.org/addons/Download....-1.0.2.zip

I will put the script in the repository if you don't found any bugs on this version.

Last added movies is now OK and sorted by alphabetical order.

2 new options :

UNWATCHED =
True : Return only unwatched movies (playcount = 0)
False : Return all movies (watched and unwatched)

RESUME =
True : Return only movies partially watched
False : Return all movies

For partilly watch movies, test is based on resume.position propertie :
'resume': {'position': 0, 'total': 0},

Si if position = 0 then movie is not partially unwatch.

I think that I should take the ratio between position of the resume and the total length of the movie. If ratio between 5% (to avoid movies played for few seconds and stopped) and 95% (when you stop the movie before credits) then movie is partially unwatch.

Do you think is a good idea ?

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

find quote
BigNoid Offline
Team-Kodi Member
Posts: 3,151
Joined: Jul 2010
Reputation: 102
Location: Below sea level
Post: #28
mikebzh44 Wrote:Properties raised by the script are :

Playlist<method>Movie<menu>.Count
Playlist<method>Movie<menu>.<# of movie>.Title
Playlist<method>Movie<menu>.<# of movie>.Rating
Playlist<method>Movie<menu>.<# of movie>.Year
Playlist<method>Movie<menu>.<# of movie>.Plot
Playlist<method>Movie<menu>.<# of movie>.RunningTime
Playlist<method>Movie<menu>.<# of movie>.Path
Playlist<method>Movie<menu>.<# of movie>.Trailer
Playlist<method>Movie<menu>.<# of movie>.Fanart
Playlist<method>Movie<menu>.<# of movie>.Thumb

See README.txt in the ZIP file.

But I can add this info if needed.

I meant that Playlist<method>Movie<menu>.<# of movie>.Trailer is always returning empty for me.
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,788
Joined: Nov 2011
Reputation: 48
Location: Nantes - France
Post: #29
New version 1.0.3 :
http://passion-xbmc.org/addons/Download....-1.0.3.zip

Propertie Trailer is now OK.

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

find quote
buges Offline
Fan
Posts: 333
Joined: Apr 2007
Reputation: 0
Location: UK
Post: #30
Im having problems with the script loading my playlist. The playlist is there in xbmc & working perfectly.

Im using a hidden button to run:
"<onfocus>XBMC.RunScript(script.RandomAndLastItems,limit=10,method='Last',playlist='spe​cial://profile/playlists/video/1234.xsp','menu=Menu1')</onfocus>"

But I just get an error

Debug gives me:
"WARNING: CUtil::GetMatchingSource... no matching source found for ['special://profile/playlists/video/1234.xsp']"
"WARNING: XFILE::CFactoryDirectory::Create - Unsupported protocol('special) in 'special://profile/playlists/video/1234.xsp'"

Am i doing something stupidly wrong?
find quote
Post Reply