• 1
  • 9
  • 10
  • 11(current)
  • 12
  • 13
  • 22
HEADS UP: Filling a list from a directory/plugin
Yes that's true, but i think i can live with those little incovenients and having 1 line of code for the contents Smile
Reply
(2014-04-10, 09:47)denywinarto Wrote:
(2014-04-10, 09:26)Jeroen Wrote: Yes

Thanks i'm gonna try implement this on Ace Gotham..
because the creator doesn't seem to be interested to do it...

What i'm trying to do is to have a populate home screen with 20+ genres playlist,
combined with recent / random..
e.g random action movies, recently added sci-fi movies
I tried it before with randomandlastitem and it's just too slow

I hope it's possible to get faster result with this

Edit : the sample on page 1 is down, any other samples?
thanks

Anyone kind enough re-up the sample? thanks
Reply
(2014-04-19, 07:05)denywinarto Wrote: Anyone kind enough re-up the sample? thanks

Just make a smart playlist with your requirements. Save it (playlists save by default in xbmc's userdata folder) and copy it to a folder in your skin directory (e.g. skin.name/extras/playlists/recent_action_movies.xsp) and then use that as the content for your list like so:

Code:
<content>special://skin/extras/playlists/recent_action_movies.xsp</content>

Unless I'm misunderstanding what you are trying to do, then you should be able to do what you want like that.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
(2014-04-19, 07:39)jurialmunkey Wrote:
(2014-04-19, 07:05)denywinarto Wrote: Anyone kind enough re-up the sample? thanks

Just make a smart playlist with your requirements. Save it (playlists save by default in xbmc's userdata folder) and copy it to a folder in your skin directory (e.g. skin.name/extras/playlists/recent_action_movies.xsp) and then use that as the content for your list like so:

Code:
<content>special://skin/extras/playlists/recent_action_movies.xsp</content>

Unless I'm misunderstanding what you are trying to do, then you should be able to do what you want like that.

Thanks for the hint, but i'm still not sure how to translate this into Ace...

Ace uses onload randomandlastitem on Home screen :

Code:
    <onload condition="System.HasAddon(script.randomandlastitems) + !IsEmpty(skin.string(vpl1.path)) + SubString(skin.string(mfvpl1_list),latest)">RunScript(script.randomandlastitems,limit=12,method=Last,playlist=$INFO[Skin.String(vpl1.path)],menu=Menu31)</onload>
    <onload condition="System.HasAddon(script.randomandlastitems) + !IsEmpty(skin.string(vpl1.path)) + SubString(skin.string(mfvpl1_list),random)">RunScript(script.randomandlastitems,limit=12,method=Random,playlist=$INFO[Skin.String(vpl1.path)],menu=Menu31)</onload>
    <onload condition="System.HasAddon(script.randomandlastitems) + !IsEmpty(skin.string(vpl2.path)) + SubString(skin.string(mfvpl2_list),latest)">RunScript(script.randomandlastitems,limit=12,method=Last,playlist=$INFO[Skin.String(vpl2.path)],menu=Menu32)</onload>
    <onload condition="System.HasAddon(script.randomandlastitems) + !IsEmpty(skin.string(vpl2.path)) + SubString(skin.string(mfvpl2_list),random)">RunScript(script.randomandlastitems,limit=12,method=Random,playlist=$INFO[Skin.String(vpl2.path)],menu=Menu32)</onload>

Menu31, menu32 and so on are called from property from another control

Code:
    <item>
    <label>$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.Title)]</label>
    <label2>$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.Tagline)]</label2>
    <icon>$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.Art(poster))]</icon>
    <property name="Fanart">$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.Art(fanart))]</property>
    <property name="Genre">$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.Genre)]</property>
    <property name="Runtime">$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.Runtime)]</property>
    <property name="Rating">$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.Rating)]</property>
    <property name="Plot">$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.Plot)]</property>
    <property name="Year">$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.Year)]</property>
    <property name="Mpaa">$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.MPAA)]</property>
    <onclick>Skin.SetString(custom_id,$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.DBID)])</onclick>
    <onclick condition="!IsEmpty(Window(0).Property(PlaylistLastMovieMenu31.1.Trailer))">Skin.SetString(custom_trailer,$INFO[Window(0).Property(PlaylistLastMovieMenu31.1.Trailer)])</onclick>
    <onclick>ActivateWindow(623)</onclick>
    <visible>!IsEmpty(Window(0).Property(PlaylistLastMovieMenu31.1.Title))</visible>
    </item>

So i'm supposed to replace the property with the content you said above?
Then how do i call it on home screen?


Edit : I think i understand it, so the random and recent field is specified with the smart playlist..
Ok, but what about the artwork and other properties such as plot, year, genre, etc, how do i include those?

(2013-11-12, 01:44)jmarshall Wrote: This is now in mainline.

@pecinko: You can set a node:visible property that will be evaluated at display-time for switching items on and off dynamically after initial list fill (i.e. after window load). The list itself is only refreshed on window load.

There's also:
* node:target which can be used to define the target window/context. e.g. if listitem.path is 'library://video/movies/titles' and node.target is 'video' it'll switch to the video window and list the movie titles on click.
* node:target_url which can be used to override listitem.path in determining what to do when the item is clicked on. This can be useful if you want listitem.path to point to a folder (to allow you to list it's content in another container when the item has focus) while allowing the click on that item to do something different. For example, the "Movies" button on confluence does this by other means - when you highlight Movies, the overview level of Movies is listed in the submenu underneath (Genres, Titles, Directors etc.) This is equivalent to a different container listing library://video/movies/. However, when you click on Movies, you're taken directly to library://video/movies/titles.

@LongMan: In principle, yes. You could point it to library://video/foo.xml or whatever. Note that the things that occur after directory listing (perhaps setting of content type, and art assignment) won't occur. But for just listing the overview pages from the library that won't be a problem.

Cheers,
Jonathan

Could you give some example for node:target_url ?
I think the part that i bold is what i need Smile

Thanks
Reply
Is there a way to reload a playlist when the window is reloaded?

I've got some random ones but they never refresh unless you reboot/refresh.

Thanks.
Reply
This should work:

PHP Code:
#Home window
<onload>SetProperty(RefreshList,1,Home)</onload>

#Content
<content>$VAR[PlaylistPath]</content>

#Path Variable
<variable name="PlaylistPath">
    <
value condition="!Window.IsVisible(3050)">path_to_playlist</value>
</
variable>

#Custom window
<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog" id="3050">
    <allowoverlay>no</allowoverlay>
    <onload>ClearProperty(RefreshList,Home)</onload>
    <visible>!IsEmpty(Window(Home).Property(RefreshList))</visible>
    <animation effect="fade" start="100" end="0" time="0" delay="5">WindowClose</animation>
    <controls></controls>
</window> 

That way the path gets changed on window load which triggers a refresh. Clearing the property just after setting it in onload doesn't work because it happens in the same frame so the application will not notice the change. Since AlarmClock doesn't work with ms, you need the custom window unless you can live with a 1 second delay.

I plan to add a reload function for the container which will make it much easier to manually trigger an update.
Image
Reply
(2014-03-07, 13:22)Martijn Wrote: FYI i've been modifying the script from BigNoid to make it faster and handle playlists (just like randomandlastitems now does). Will finish it after i get from a month of vacation Smile

It's integrated in skin widgets so you should be able to use both the old properties and the new plugin:// possibilities
Martijn... any news/progress on this ?. Not pushing anything. Just asking.

(2014-04-12, 19:32)`Black Wrote: 1. I just saw that you can use "target_url" for a custom onclick path so you don't need an extra button.
Black... can you give me an code example about this?. Whatever i try is not working.


Cheers
Nessus
Reply
I am trying to populate a list with dynamic data and when you select an item from the list it launches a script, is that possible?

I started another post before I found this one:
http://forum.xbmc.org/showthread.php?tid=194415
Reply
http://wiki.xbmc.org/index.php?title=Sta...st_Content
Reply
thanks, I did read that page in fact that is where I got the idea to populate the list dynamically.

The problem I am having is I want to launch a script when someone clicks on the list items, at the moment if I set the ListItem url to

actionUrl = "XBMC.RunScript(plugin.video.xbmb3c,PersonInfo,mode=15&name=Jack+Black)"
itemTupple = (actionUrl, item, False)
listItems.append(itemTupple)
xbmcplugin.addDirectoryItems(handle, listItems)
xbmcplugin.endOfDirectory(handle, cacheToDisc=False)

I get the following in the log when I click on the list item in the interface

16:21:37 T:8984 NOTICE: DVDPlayer: Opening: XBMC.RunScript(plugin.video.xbmb3c,PersonInfo,mode=15&name=Jack+Black)
16:21:37 T:8492 ERROR: CDVDPlayer::OpenInputStream - error opening [XBMC.RunScript(plugin.video.xbmb3c,PersonInfo,mode=15&name=Jack+Black)]

Is there a way to have the list item run a script?
Reply
Maybe You should change target?
seems like it's opening the link in DVDPlayer, and I guess Your plugin is not a Stream...
but I might be very wrong.
Image Image
Did I Help? Add to my reputation
Reply
Hi ,

I currently using skin widgets for the home menu in my skin. But with this functionality the code would of course be much simple. However I would like to know if anyone has experience with the performance of the feature. Concrectly would using this feature lead to a faster loading of the content compared to skin widgets?

Thanks
Reply
It depends what list you're loading. If you're avoiding the running of a plugin, then yes, faster. If you're not, then probably not much different.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
Ok great. So its either faster or the same, but not slower. I will switch to this method .
Reply
(2014-05-12, 07:50)DjCisco Wrote: Hi ,

I currently using skin widgets for the home menu in my skin. But with this functionality the code would of course be much simple. However I would like to know if anyone has experience with the performance of the feature. Concrectly would using this feature lead to a faster loading of the content compared to skin widgets?

Thanks

Has anyone compared it to randomandlastitem script?
Reply
  • 1
  • 9
  • 10
  • 11(current)
  • 12
  • 13
  • 22

Logout Mark Read Team Forum Stats Members Help
HEADS UP: Filling a list from a directory/plugin1