• 1
  • 11
  • 12
  • 13(current)
  • 14
  • 15
  • 53
[RELEASE] Random and last items smartplaylist script for Skins
Version 1.1.6 released

As Big_Noid asked, script can get playlist type by reading playlist file.

So you can call the script this way :

Code:
XBMC.RunScript(script.RandomAndLastItems,limit=10,method=Random,playl​ist=special://masterprofile/playlists/video/children.xsp,menu=Menu1)

As my playlist children.xsp is a movie playlist, script will set properties PlaylistRandomMovieMenu1

With a tvshows or episodes playlist, properties are PlaylistRandomEpisodeMenu1.

Caution : If you don't set up playlist= parameter to work on library, you HAVE TO set up type= parameter
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
Great, thx mikebzh44 Smile
Reply
Removing type= from the script variable does not work for me. If i adjust the script with this and fill type=Auto in the script parameters all works fine:
Code:
if TYPE == 'Auto' and PLAYLIST != '':
   _getPlaylistType ();
Reply
It"s very strange as in Glass, I can call the script this way :

Quote:XBMC.RunScript(script.randomandlastitems, playlist=$INFO[Skin.String(Menu_Men1_Recently_play)], method=$INFO[Skin.String(Widget1_Men1)], limit=10, unwatched=False, resume=False, propertie=PlaylistLastMovieMen1)
So with providing playlist= and omitting type= everything work fine :S
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-03-23, 12:38)mikebzh44 Wrote: It"s very strange as in Glass, I can call the script this way :

Quote:XBMC.RunScript(script.randomandlastitems, playlist=$INFO[Skin.String(Menu_Men1_Recently_play)], method=$INFO[Skin.String(Widget1_Men1)], limit=10, unwatched=False, resume=False, propertie=PlaylistLastMovieMen1)
So with providing playlist= and omitting type= everything work fine :S

Find for me that it still works better including the variable "type" also easier to find the list for display in widget. Below is TV Episodes working in Convergence with "Ali Later" playlist totals.

Image
Noli illegitimi carborundum


Reply
(2012-03-23, 12:38)mikebzh44 Wrote: It"s very strange as in Glass, I can call the script this way :

Quote:XBMC.RunScript(script.randomandlastitems, playlist=$INFO[Skin.String(Menu_Men1_Recently_play)], method=$INFO[Skin.String(Widget1_Men1)], limit=10, unwatched=False, resume=False, propertie=PlaylistLastMovieMen1)
So with providing playlist= and omitting type= everything work fine :S

Adding propertie= makes it work. Didn't see that was mandatory.
Reply
me I use
Code:
<onload condition ="Skin.HasSetting(homepageHideRecentlyMen1Added)">XBMC.RunScript(script.randomandlastitems,playlist=$INFO[Skin.String(Menu_Men1_Recently_play)],method=$INFO[Skin.String(Widget1_Men1)],limit=10,unwatched=False,resume=False,type=$INFO[Skin.String(Widget1_Type_Men1)],propertie=PlaylistLastMovieMen1)</onload>

with property you can call your list like you want
Code:
<onload condition ="Skin.HasSetting(homepageHideRecentlyMen1Added)">XBMC.RunScript(script.randomandlastitems,playlist=$INFO[Skin.String(Menu_Men1_Recently_play)],method=$INFO[Skin.String(Widget1_Men1)],limit=10,unwatched=False,resume=False,type=$INFO[Skin.String(Widget1_Type_Men1)],propertie=MyFirstPlaylist)</onload>
and you have

Code:
<item id="1">
                <label>$INFO[Window(Home).Property(MyFirstPlaylist.1.Title)]</label>
                <label2>-</label2>
                <onclick>PlayMedia($INFO[Window(Home).Property(MyFirstPlaylist.1.Path)])</onclick>
                <icon>$INFO[Window(Home).Property(MyFirstPlaylist.1.Thumb)]</icon>
                <thumb>$INFO[Window(Home).Property(MyFirstPlaylist.1.Fanart)]</thumb>
                <property name="MoviePlot">$INFO[Window(Home).Property(MyFirstPlaylist.1.Plot)]</property>
                <property name="MovieYear">$INFO[Window(Home).Property(MyFirstPlaylist.1.Year)]</property>
                <property name="MovieRating">$INFO[Window(Home).Property(MyFirstPlaylist.1.Rating)]</property>
                <property name="RunningTime">$INFO[Window(Home).Property(MyFirstPlaylist.1.RunningTime)]</property>
                <property name="Path">$INFO[Window(Home).Property(MyFirstPlaylist.1.RootPath)]</property>
                <property name="Case">$VAR[VideoMovieMovieCase1,ClearCase/,.png]</property>
            </item>
Reply
Yeah it should save some code Smile
Reply
Properties name was the problem.

In the script, if propertie= is not set (awfull mistake : 1 property, 2 properties Blush) properties name is make off PlaylistMethodTypeMenu but Type is unknown at this moment.

Glass have no problem because propertie is set to get always the same name even if Method or Type change.

I will fix it on next version.
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
That propertie= is real nice. And with the automatic playlist detection there only are a few lines to run the script. Very nice Smile
Now when can we expect a push to official repo Big Grin I want to add it as a dependency in my skin before I submit it to the repo.
Reply
Did you use Count, Watched and Unwatched properties ?

fmronan have lost those properties in Glass and I wonder if it's due to my last version.

As soon as fmronan get back those properties, I will push the script to official repo.
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
They work fine with version 1.1.6.
I use this to run the script:
Code:
XBMC.RunScript(script.randomandlastitems, playlist=$INFO[Skin.String(HomeMenuVideoPlaylist1_Path)], method=$INFO[Skin.String(MethodVPL1)], limit=10, unwatched=$INFO[Skin.String(IncludeWatchedCVPL)], resume=False, propertie=PlaylistLastMovieVPL1)
Reply
Yes, fmronan have found the problem in Glass (some code lost when including Artwork Downloader addon).

I will post version 1.1.7 on Ciné-passion repo to fix properties name and if no bugs found I will push it to official repo monday morning.
Version 1.1.7 released

v1.1.7
- [Fix] When type= was not set with playlist, properties name was unwellformed
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
Version 1.1.8 released

v1.1.8
- [Add] New property Resolution for Movies. Values are blank, 480, 540, 576, 720, 1080

[Off Topic]
I was thinking about skinners who want to put this script as a require in their skin. I thought that you could put a require on passion-xbmc repository and then a require on my script. But passion-xbmc repository can't be added to official repository Sad
Someone from the XBMC team (Martijn ?) can explain why ?
It could be a great promotion for passion-XBMC repository and users can discover some new addons.
[/Off Topic]
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
because it's a third party repository and we want to make it absolute 110% clear by you having to add it manually.

if you want your add-ons officially "embraced", they need to be under our control (in terms of what is distributed from xbmc.org).
Reply
  • 1
  • 11
  • 12
  • 13(current)
  • 14
  • 15
  • 53

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