• 1
  • 20
  • 21
  • 22(current)
  • 23
  • 24
  • 53
[RELEASE] Random and last items smartplaylist script for Skins
(2012-12-27, 14:42)mikebzh44 Wrote:
(2012-12-27, 14:00)Martijn Wrote: hmm i see "property" somehow got uppercase in the code. Will fix that.
Did change to correct spelling though Wink
propertie=H​omePlayListSeven -> property=H​omePlayListSeven
Yes, sorry for my english

One property, two properties

Nice job Martijn.

I think I can migrate from Eden / Aeon Nox 3.6.1 to Frodo / Aeon Nox 4.0 now Big Grin

Non native languages can be be difficult sometimes Wink

@Mudislander
Change (for testing)
PHP Code:
PROPERTY param.replace('PROPERTY='''
to
PHP Code:
PROPERTY param.replace('property='''
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
@Martijn

Okay changed the code in the script & and the label "propertie" in the skin. According to the debug log the script runs, takes upto 3 secs for a big playlist, with no erros. However I'm not able to display the results.

Would it be possible to get a script that spams the log with what it's found in the playlist (even if only for Movies) - or could you tell me how to change the script to spam the log?.

I did see you've enabled the .Art( * ) labels.

Cheers
Noli illegitimi carborundum


Reply
Exampl
PHP Code:
for _movie in _result:
            if 
xbmc.abortRequested or _count == LIMIT:
                break
            
log(_movie
            
_count += 

This will print all data for each movie that would be added to the list.

PHP Code:
print _movie 
also works. Same principle counts for all others.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
@Martijn - I'll have time to check the script thoroughly tomorrow but ATM it looks like the script option "property=SomeMenuItemName" (used to be - "propertie=*****") Is not functioning as it used to.

if I use the option "menu=******" I can get results to show up in the skin, however forcing the name with "property=*****" returns no results under the correct menu item name.

Two things I personally need from the script is the ability to force the menu name eg:property=H​omePlayListOne and also the script being able to report back that the playlist used was for Movies,Episodes or Albums.

Cheers hey.

Edit By running

PHP Code:
XBMC.RunScript(script.randomandlastitems,limit=10,method=Random,playlist=special://profile/playlists/video/Unwatched Movies.xsp,property=Menu1) 

I need to enter

PHP Code:
$INFO[Window(home).Property(PlaylistRandomMovieMenu1.8.Title)] 

To get results but I need $INFO[Window(home).Property(Menu1.8.Title)]

Noli illegitimi carborundum


Reply
Just tested now version 2.0.0

- movies method=Last working perfectly

to call the script for episodes i use method=Last too, is this still avaiable ? because i get a script error when calling episodes.
Reply
I was playing with the script in Aeon Nox 4.0 and I wasn't able to display widgets for smart playlists.

Don't know if it's normal but AE set UNWATCHED parameter to blank and not to false by default.

I have add a test (line 594) :

elif 'unwatched=' in param:
UNWATCHED = param.replace('unwatched=', '')
if UNWATCHED == '':
UNWATCHED = 'False'
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
(2012-12-28, 22:54)Mudislander Wrote: @Martijn - I'll have time to check the script thoroughly tomorrow but ATM it looks like the script option "property=SomeMenuItemName" (used to be - "propertie=*****") Is not functioning as it used to.

if I use the option "menu=******" I can get results to show up in the skin, however forcing the name with "property=*****" returns no results under the correct menu item name.

Two things I personally need from the script is the ability to force the menu name eg:property=H​omePlayListOne and also the script being able to report back that the playlist used was for Movies,Episodes or Albums.

Cheers hey.

Edit By running

PHP Code:
XBMC.RunScript(script.randomandlastitems,limit=10,method=Random,playlist=special://profile/playlists/video/Unwatched Movies.xsp,property=Menu1) 

I need to enter

PHP Code:
$INFO[Window(home).Property(PlaylistRandomMovieMenu1.8.Title)] 

To get results but I need $INFO[Window(home).Property(Menu1.8.Title)]
I have do the same with Aeon Nox 4.0 :

In skin :

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

In script, I have change line 590/591 :

Code:
elif 'property=' in param:
                PROPERTY = param.replace('property=', '')

Just to be sure, I have put some debug in log file :

Code:
if PROPERTY == "":
            PROPERTY = "Playlist%s%s%s" % ( METHOD, TYPE, MENU )
            print("##### PROPERTY SET TO DEFAULT", PROPERTY)
        else:
            print("##### PROPERTY SET TO ", PROPERTY)

And property is OK :

Code:
16:52:51 T:4416  NOTICE: ('##### PROPERTY SET TO ', 'SmartPlaylist7')
16:52:51 T:4916  NOTICE: ('##### PROPERTY SET TO ', 'SmartPlaylist1')
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
@mikebzh44 Thanks - That gets movie playlists working.

Now I need to redo TVShow & music librararies on test machine to check them
Noli illegitimi carborundum


Reply
@mike
Could you pastebin.com your changes so I could see where I screwed up?
I'll add it to github too
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
Martijn, here my changes :

http://xbmclogs.com/show.php?id=24925

github will be great 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
Real welcoming message on github - "Nothing to see here yet. Move along." Big Grin
Noli illegitimi carborundum


Reply
Martijn.

Aeon Nox 4.0 will be available soon on official repository and Phil call script this way :

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

But if script now require property= parameter, widgets skin will be broken :S

Is there a smart way to handle this case in python ( uppercase ? lowercase ? double test ?) ?
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-02, 10:49)mikebzh44 Wrote: Martijn.

Aeon Nox 4.0 will be available soon on official repository and Phil call script this way :

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

But if script now require property= parameter, widgets skin will be broken :S

Is there a smart way to handle this case in python ( uppercase ? lowercase ? double test ?) ?

fixed that, ronie will pull with fix included.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
Good news 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
Updated in repo and put code on github.
@ mikebzh44
You have full rights so you can maintain it too Wink
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
  • 1
  • 20
  • 21
  • 22(current)
  • 23
  • 24
  • 53

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