Kodi Community Forum
[RELEASE] Random and last items smartplaylist script for Skins - 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)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
---- Thread: [RELEASE] Random and last items smartplaylist script for Skins (/showthread.php?tid=122448)



RE: [RELEASE] Random and last items smartplaylist script for Skins - Martijn - 2013-07-23

(2013-07-23, 21:42)pseitz Wrote: Can someone explain how to use this script? Is there anywhere a new option?
The readme contains just a bunch of variables

Only for skinners who know how to code.


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-07-24

Yes, this script did not provide any front end screen.

It have to be called within the skin to set up properties used by the skin to display informations.


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-08-06

New release 2.1.7

Because people were waiting for this feature for soooooooooo long :

http://forum.xbmc.org/showthread.php?tid=122448&pid=1143109#pid1143109

now this script can handle MusicVideo smartplaylists.

See GITHUB and READM.txt for new properties.

For now, the only issue is that when you want to play the music video ID #, it's the movie ID # that is actually played :S

I'm waiting for answers in JSON thread :

http://forum.xbmc.org/showthread.php?tid=68263&pid=1478311#pid1478311

But, skinners, you can start to play with and make dedicated screens or widgets.


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-08-07

Everything is OK with the script, no JSON-RPC issue.

It's only a Aeon Nox 4.1.9 issue because widgets seems to not use Play property from the script but DBID and widget did not make the difference between movies custom menu and music videos custom menu.


RE: [RELEASE] Random and last items smartplaylist script for Skins - anibeasts - 2013-08-15

I am trying to debug an error I am having with the randomandlastitems.py script. V2.1.6
I am still learning python coming from Java background.
It seems to fail at the line 127 at _playcount = _movie['playcount']
I am trying to trace back the calls but unable to understand the JSON-RPC call. because the directory is passed as PLAYLIST = "videodb://1/2/" in the Files.GetDirectory method. but is that a directory?


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-08-16

videodb://1/2 = Movies title

http://wiki.xbmc.org/?title=Opening_Windows_and_Dialogs

Try _movie.get('playcount', 0)

But it means that JSON query did not return playcount for this movie :S


RE: [RELEASE] Random and last items smartplaylist script for Skins - anibeasts - 2013-08-16

(2013-08-16, 10:01)mikebzh44 Wrote: videodb://1/2 = Movies title

http://wiki.xbmc.org/?title=Opening_Windows_and_Dialogs

Try _movie.get('playcount', 0)

But it means that JSON query did not return playcount for this movie :S

Can you explain how "videodb://1/2" is considered as a directory? I would have expected somthing like c:\...\...\ in windows or /home/.../.../ on linux
For the signature for Files.GetDirectory in the JSON-RPC API states:

5.4.2 Files.GetDirectory
Get the directories and files in the given directory
Permissions:
ReadData
Parameters:
string directory
[ Files.Media media = "files" ]
[ List.Fields.Files properties ]
[ List.Sort sort ]
Returns:
Type: object
Properties:
List.LimitsReturned limits
List.Item.File[] files
[show] JSON Schema Description


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-08-16

I don't know oh it's work but it's work Wink

This kind of path is a XBMC alias.

Ask in JSON-RPC or XBMC development thread.


RE: [RELEASE] Random and last items smartplaylist script for Skins - anibeasts - 2013-08-16

Anyway to force the script to run for testing purposes?
I have been exiting XBMC then starting it again repeatedly.


RE: [RELEASE] Random and last items smartplaylist script for Skins - anibeasts - 2013-08-16

Ok I have this smartplay list
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
<name>Series</name>
<match>all</match>
<rule field="path" operator="startswith">
<value>smb://NAS1/Videos/Series/</value>
</rule>
<order direction="ascending">sorttitle</order>
</smartplaylist>

Everytime this script fails its called with TYPE=Movie
and for some reason it looks at my episodes directory
Why is that?
Here is log from one of the threads:
http://paste.ubuntu.com/5992759/


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-08-16

I'm on holidays so I will have a look this evening or tomorrow morning.


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-08-16

I don't know.

I'm using this smart playlist :

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>Game of Thrones</name>
    <name>Series</name>
    <match>all</match>
    <rule field="path" operator="startswith">
        <value>D:\Utilisateurs\Mikael\Vidéos\Series\Game of Thrones</value>
    </rule>
    <order direction="ascending">sorttitle</order>
</smartplaylist>

In Aeon Nox, the script is called this way :

Code:
RunScript(script.randomandlastitems, playlist=special://profile/playlists/video/Game of Thrones.xsp, method=Last, limit=10, unwatched=False, resume=False, property=SmartPlaylist1)

I have remove type= parameter to let the script find it.

And smart playlist is detected as tvshows and type=Episode is returned.

Could you send me your myvideos75.db database (use rapidshare or some other file hosting server) ?

Thanks.


RE: [RELEASE] Random and last items smartplaylist script for Skins - anibeasts - 2013-08-18

(2013-08-16, 23:07)mikebzh44 Wrote: Could you send me your myvideos75.db database (use rapidshare or some other file hosting server) ?

check your inbox.


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-08-18

I don't understand your problem. I'm using your playlist and your database and everything is OK.

I have put some debug in log and type is OK :

Code:
16:36:55 T:2808  NOTICE: ('##### TYPE=', 'Episode')

And properties are OK :

Code:
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.1.Title', u'Brazil')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.1.TVshowTitle', u'Falling Skies')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.2.Title', u'Journey to Xibalba')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.2.TVshowTitle', u'Falling Skies')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.3.Title', u'Strange Brew')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.3.TVshowTitle', u'Falling Skies')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.4.Title', u'The Pickett Line')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.4.TVshowTitle', u'Falling Skies')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.5.Title', u'The Truth Hurts')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.5.TVshowTitle', u'Warehouse 13')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.6.Title', u'Be Silent And Come Out')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.6.TVshowTitle', u'Falling Skies')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.7.Title', u'All the Time in the World')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.7.TVshowTitle', u'Warehouse 13')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.8.Title', u'Search and Recover')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.8.TVshowTitle', u'Falling Skies')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.9.Title', u'Lost & Found')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.9.TVshowTitle', u'Warehouse 13')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.10.Title', u'At All Costs')
16:36:58 T:2808  NOTICE: ('##### SmartPlaylist1.10.TVshowTitle', u'Falling Skies')

Which skin are you running ?


RE: [RELEASE] Random and last items smartplaylist script for Skins - anibeasts - 2013-08-19

Aeon Nox 4.0.9


This forum uses Lukasz Tkacz MyBB addons.