• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 22
HEADS UP: Filling a list from a directory/plugin
#1
This pull request (still to be reviewed, tested thoroughly etc. so no guarantees for Gotham, but I think it's got potential) PR3522 adds the ability to specify <content> as a VFS path. XBMC fetches the path (wherever it may be, plugins for example) and fills your list up with that content. It's done in the background, so shouldn't provide too many issues with lag.

This might be neat for those widgets ya'll love to use. Simplifies the coding quite some though, right? Just say to the random widgets script "gimme 10 random movies" and it fills 'em in. XBMC takes care of the rest, including what happens when you click it. (You can fine-tune the clicking behaviour in the plugin if you want).

Another idea is you want a completely custom home menu? Write a plugin that generates the list from a text file or whatever you like. I'm not completely sure how lag-free that'll be. We tested using youtube at devcon (i.e. hitting youtube.com and listing youtube videos in confluence's main menu) and it was a little bit laggy, but not too bad. Most of that will be from hitting the interwebs.

I'll work with Martijn to come up with a modified (if necessary) widgets script and some example confluence code over the next couple days.

Cheers,
Jonathan
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
#2
Awesome. If content can be loaded from an url, is it theoretically possible that sites like trakt.tv could provide content directly, e.g. "trending movies"?
Image
Reply
#3
I've updated the above PR with a (rather nastily hacked together) plugin that provides 3 random movies from library in place of confluence' Recently Added Movies.

Here's the changes: https://github.com/jmarshallnz/xbmc/comm...96926bb6d6

(Notice removal of static content, replacing with a URL plus target. Notice also how it's just calling a plugin.)

It's run on window load basically (control allocation) so each time you go to home you have another 3 random movies. Works nicely. With this you can eliminate all the window property setting stuff (there's some things missing yet, like some of the art stuff which I'll look to add in).

Also works with any other plugin (youtube no problems). Or how about if you wanted an album list with a wee list at the side for the album songs...

Cheers,
Jonathan
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
#4
Exciting idea, will have to try play with it.
Noli illegitimi carborundum


Reply
#5
Endless possibilities! I really look forward to seeing this implemented.
Image
Reply
#6
Is there a Mavericks compatible:> , OS X build available? I would like to have a play with it.
My skins:

Amber
Quartz

Reply
#7
(2013-11-06, 16:09)pecinko Wrote: Is there a Mavericks compatible:> , OS X build available? I would like to have a play with it.

kicked a build for all platforms as i needed a win32 one. will report when done
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
#8
http://mirrors.xbmc.org/test-builds/
And look for build with 682fcdb in filename
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
#9
(2013-11-06, 21:15)Martijn Wrote: http://mirrors.xbmc.org/test-builds/
And look for build with 682fcdb in filename

Thanks!
My skins:

Amber
Quartz

Reply
#10
(2013-10-31, 23:48)jmarshall Wrote: I've updated the above PR with a (rather nastily hacked together) plugin that provides 3 random movies from library in place of confluence' Recently Added Movies.

Here's the changes: https://github.com/jmarshallnz/xbmc/comm...96926bb6d6

(Notice removal of static content, replacing with a URL plus target. Notice also how it's just calling a plugin.)

It's run on window load basically (control allocation) so each time you go to home you have another 3 random movies. Works nicely. With this you can eliminate all the window property setting stuff (there's some things missing yet, like some of the art stuff which I'll look to add in).

Also works with any other plugin (youtube no problems). Or how about if you wanted an album list with a wee list at the side for the album songs...

Cheers,
Jonathan

Martijn, Jonathan

Is there a way to pass an argument to a script, like:

PHP Code:
<content target="video" argv="first,foo,third">plugin://plugin.test.me/</content> 
My skins:

Amber
Quartz

Reply
#11
Just pass it directly in the plugin:// URL:

Code:
<content target="video">plugin://plugin.test.me?arg1=foo&arg2=bar</content>

(You might need to URL-encode the & in the XML I guess?)
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
#12
(2013-11-08, 22:28)jmarshall Wrote: Just pass it directly in the plugin:// URL:

Code:
<content target="video">plugin://plugin.test.me?arg1=foo&arg2=bar</content>

(You might need to URL-encode the & in the XML I guess?)

Cool, will try.

How would one define visibility on per listItem basis? For example - lisitem in plugin content is visible when its property matches the property of main menu listitem (via StringCompare)?
My skins:

Amber
Quartz

Reply
#13
Does this mean that I could put some custom node files in a folder (in userdata>library) and have the main menu (List) on the home screen automatically filled by pointing to the folder?
Reply
#14
(2013-11-11, 11:35)pecinko Wrote: How would one define visibility on per listItem basis? For example - lisitem in plugin content is visible when its property matches the property of main menu listitem (via StringCompare)?
Couldn't you just define visibility in the script itself? Perhaps using a parameter in the plugin:// URL?
Image
Reply
#15
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
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
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 22

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