• 1
  • 23
  • 24
  • 25(current)
  • 26
  • 27
  • 53
[RELEASE] Random and last items smartplaylist script for Skins
(2013-01-10, 17:51)mikebzh44 Wrote: Fixed for TVShows playlist.

ΟΚ, it works. Thanks Big Grin
Panasonic 42G10 ♦ Onkyo TX SR507 ♦ Teufel Concept R2 ♦ TV Box (COOLEME MB1/Libreelec)
Reply
@mikebzh44 Thanks hey!!, Off to work now but will test tomorrow. I'll make a plan to limit the skin widget to Albums not Music.
Noli illegitimi carborundum


Reply
I'm getting the same error from the _getEpisodes() method.
mikebzh44, I think the fix from your post the #357 also applies here.

The _item variable doesn't have the "id" set, and later json query in the _setEpisodeProperties() method throws an exception.
Reply
New commit pushed on GITHUB :

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

Martijn, did you make to request to push it to official repo or did I ?
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
Hi Mikebzh44, first I would like to thank you and congratulate for the script.

I would like to know if is possible to include Concerts and Music Videos Playlists on the Script features.

Thank you so much.
Reply
Yes, I have to work on it for a long time Wink
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
(2013-01-23, 09:42)mikebzh44 Wrote: Yes, I have to work on it for a long time Wink

Are them on your plans?


Reply
Yes. I have to include some concerts in my library and look how it could be manage by the script.
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
Get the crystal balls ready, why is this not returning anything?

PHP Code:
XBMC.RunScript(script.randomandlastitems,limit=10,method=Last,playl​ist=$INFO[Skin.String(CustomMenu.1.Path)],unwatched=True,property=CustomWidget1Recent

PHP Code:
20:42:42 T:140735131361664   DEBUGExecuteXBMCAction Translating XBMC.RunScript(script.randomandlastitems,limit=10,method=Last,playl​ist=$INFO[Skin.String(CustomMenu.1.Path)],unwatched=True,property=CustomWidget1Recent)
20:42:42 T:140735131361664   DEBUGExecuteXBMCAction To XBMC.RunScript(script.randomandlastitems,limit=10,method=Last,playl​ist=special://profile/playlists/video/Animation.xsp,unwatched=True,property=CustomWidget1Recent) 

PHP Code:
<setting type="string" name="skin.confluence.modified.CustomMenu.1.Path">special://profile/playlists/video/Animation.xsp</setting> 

PHP Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Animation</name>
    <match>all</match>
    <rule field="genre" operator="is">
        <value>Animation</value>
    </rule>
    <order direction="ascending">year</order>
</smartplaylist> 

I'm trying to use it in a list container like this

PHP Code:
<label>$INFO[Window(home).Property(CustomWidget1Recent.1.Title)]</label>
<
label2></label2>
<
onclick>PlayMedia($ESCINFO[Window(home).Property(CustomWidget1Recent.1.File)])</onclick>
<
icon>$INFO[Window(home).Property(CustomWidget1Recent.1.Art(poster))]</icon>
<
thumb>-</thumb>
<
visible>!IsEmpty(Window(home).Property(CustomWidget1Recent.1.Title))</visible
Reply
And your smart playlist is OK, you can browse movies in library ?

As I'm not a skinner, I will have to look in other skin how other skinners use the script.
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
Yes it's ok, i've tried other smart playlists too.

I also tried

Code:
XBMC.RunScript(script.randomandlastitems,type=Movie,limit=10,method=Last,playl​ist=$INFO[Skin.String(CustomMenu.1.Path)],unwatched=True,menu=Menu1)

but this seems to list all my movies in my library starting from the newest unwatched. It seems that specifying "type" overrides the playlist and it uses database directly?

If i remove menu=Menu1 and run the script like this

Code:
XBMC.RunScript(script.randomandlastitems,limit=10,method=Last,playl​ist=$INFO[Skin.String(CustomMenu.1.Path)],unwatched=True,menu=Menu1)

I get nothing at all.. I think i need a good nights sleep.
Reply
This is how the script is called in Aeon Nox 4.0.9 :

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

And how properties are used in skin :

Code:
<label>$INFO[Window(Home).Property(SmartPlaylist1.1.Title)]</label>

So everything look good compare to your first example : http://forum.xbmc.org/showthread.php?tid...pid1325042

You can easily add some debug log by editing XBMC\addons\script.randomandlastitems\randomandlastitems.py file and add this line :

Code:
print ("##### Property ", _property, _value )

to _setProperty function :

before :

Code:
def _setProperty ( _property, _value ):
    global WINDOW
    # Set window Properties
    WINDOW.setProperty ( _property, _value )

Code:
def _setProperty ( _property, _value ):
    global WINDOW
    # Set window Properties
    WINDOW.setProperty ( _property, _value )
    print ("##### Property ", _property, _value )

So you will see in xbmc.log which properties are set :

09:07:53 T:556 NOTICE: ('##### Property ', 'SmartPlaylist1.1.Title', u'The Hit Girls')

Hope it will be helpful Confused
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
I'm at work right now, different OS (Windows), different library (sqlite instead mysql), same problem.

Unfortunately pastebin is blocked, i will take a look at debugging later today at home but this is the only reference i'm seeing

Code:
10:30:16 T:3984   DEBUG: CApplication::ExecuteXBMCAction : Translating XBMC.RunScript(script.randomandlastitems,limit=10,method=Last,playl​ist=$INFO[Skin.String(CustomMenu.1.Path)],unwatched=True,property=CustomWidget1Recent)
10:30:16 T:3984   DEBUG: CApplication::ExecuteXBMCAction : To XBMC.RunScript(script.randomandlastitems,limit=10,method=Last,playl​ist=special://profile/playlists/video/testi.xsp,unwatched=True,property=CustomWidget1Recent)

10:32:52 T:6408   DEBUG: Random and Last items script: Loading PlaylistLast started at 2013-02-06 10:32:52 and take 0.003s

Reply
Now it gets weird, i copied the runscript action from Nox, changed the infolabel and the property and it worked. I copied the original script line back and now it works too. Huh
Reply
It seems to work fine for movies and tv shows (both tv show and episode type playlists).

Working on music right now and couple of questions:

- I can ran the script with unwatched=True,resume=False even though the music does not support these and i won't run into any problems? It seems to populate the properties just fine and i haven't seen any problems.

- What kind of music playlists are supported? Artist type playlists are not returning anything, this i believe is by design, correct? Album type smart playlists work, no problems there with the properties except that..

- It is not returning the type for an album type smart playlist. I use the type as a visibility condition for a group. When i remove the visibility condition it shows up just fine.

debug log

Contents of the playlist

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="albums">
    <name>Metallica Albums</name>
    <match>all</match>
    <rule field="albumartist" operator="is">
        <value>Metallica</value>
    </rule>
</smartplaylist>
Reply
  • 1
  • 23
  • 24
  • 25(current)
  • 26
  • 27
  • 53

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Random and last items smartplaylist script for Skins1