•   
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 22
  •   
HEADS UP: Filling a list from a directory/plugin
#31
(2013-12-09, 10:13)`Black Wrote: But what if I just want to use library path without an extra add-on? Is it not possible to add art stuff to those lists?

+1
Image Image
Did I Help? Add to my reputation
Reply
#32
I agree that if it is at all possible, it's just a missed opportunity to not implement. This currently already works beautifully with folders in plugins. Okay it can't randomize. But what is the alternative?

Everyone adds an addon as dependency that can take a path (pref in skin string) as arg. Then if we are going to let a user make widgets out of any folder(s) with a custom context button or so, then i don't see how you can know if the user wants skin.string (n) random or not anyway. That is, without completely letting an addon handle the settings on them. So this would all end up as expansion of skin widgets perhaps?

And even though this is just awesome already, seriously. It would be even more powerful if the content could take this + normal items.
Or dare i dream, adding to lists filled by xbmc. Showing missing episodes as grayed out ect.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#33
Sample is missing now. It was really helpful so would be good to get back.

I am rewriting my addon and hope to be able to provide a list to skins if they want it. I plan to release the new version for Gotham only. Will this function be there do you reckon?
Reply
#34
It's not possible as I don't have time to work on it. Simple as that Smile

If others want to jump in, be my guest - I'm happy to provide pointers as per usual. See listproviders/DirectoryProvider.cpp and combine with video/VideoThumbLoader.cpp et. al. There's probably some other stuff that you'd ideally want on top of this, but that would give you most stuff.

If you want to adapt the plugin stuff to take art, then see how the fanart is handled - you'd need to add a setArt() wrapper to the python stuff - this is quite simple with the codegen in place now.

IMO the easiest win here though is to adapt the existing widget scripts (that fill all those crazy properties) to be plugins. This is what the plugin.test.me was that I included in the original PR.

(If you want to do the entire menu using a plugin you could do so pretty easy as well).

EDIT: added attachment with the sample plugin.

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
#35
Thanks Jonathan, I managed to get the thumb loader working... will do a pull request eventually but have to do more tests and maybe I can get some other stuff working (e.g. updating the lists after db update).
Image
Reply
#36
I will make a plugin out of skin widgets.
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
#37
Thanks for the example again!

On the other stuff... Jeez, im lost Smile

So I should set up my addon to provide a plugin directory?

I am guessing yes if the widgets will have it.
Reply
#38
Yes, you want to be able to run it as a plugin if you want to use it to fill a container in the skin using this stuff.
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
#39
Is it possible to temporarily cache the content somehow? With en extra service addon maybe? Otherwise core needs an update because doing several json rpc requests on window open will take way too much time. At least I wouldn't want to wait 20s or more on (every!) window open until everything is loaded with skin widgets. It needs to be there instantly after it is loaded once.
Image
Reply
#40
(2013-12-11, 09:49)`Black Wrote: Is it possible to temporarily cache the content somehow? With en extra service addon maybe? Otherwise core needs an update because doing several json rpc requests on window open will take way too much time. At least I wouldn't want to wait 20s or more on (every!) window open until everything is loaded with skin widgets. It needs to be there instantly after it is loaded once.

Better way would probably be for XBMC to generate XML or some such after library update. Script would then parse it instead or doing DB query every time. XML should then be updated after library scan, playback or watched status change. Kind of a core watchdog with XML dump.

Based on my tests setting window properties seems to be noticeably faster than dynamically populating items from plugin for some reason.
My skins:

Amber
Quartz

Reply
#41
(2013-12-11, 11:16)pecinko Wrote:
(2013-12-11, 09:49)`Black Wrote: Is it possible to temporarily cache the content somehow? With en extra service addon maybe? Otherwise core needs an update because doing several json rpc requests on window open will take way too much time. At least I wouldn't want to wait 20s or more on (every!) window open until everything is loaded with skin widgets. It needs to be there instantly after it is loaded once.

Better way would probably be for XBMC to generate XML or some such after library update. Script would then parse it instead or doing DB query every time. XML should then be updated after library scan, playback or watched status change. Kind of a core watchdog with XML dump.

imo that's just hacking around. there are better ways to do this
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
#42
Till the artwork stuff is handled internal, this plugin maybe useful:
https://github.com/BigNoid/plugin.library.data.provider
Reply
#43
(2013-12-13, 01:58)BigNoid Wrote: Till the artwork stuff is handled internal, this plugin maybe useful:
https://github.com/BigNoid/plugin.library.data.provider

New widgets script?

Have you done by any chance speed comparison test between this dynamic approach vs window.properties?
My skins:

Amber
Quartz

Reply
#44
Yeah, it was much much faster coding a widget then with all the window properties Tongue
Seriously though, its faster then service.skin.widgets, but since it re-loads every time on window load it does need that time everytime, whereas window properties stay in memory and dont necessarily change on window load.
Reply
#45
(2013-12-13, 10:20)BigNoid Wrote: Yeah, it was much much faster coding a widget then with all the window properties Tongue
Seriously though, its faster then service.skin.widgets, but since it re-loads every time on window load it does need that time everytime, whereas window properties stay in memory and dont necessarily change on window load.

will help with that as i have an idea how to solve it
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
  • 2
  • 3(current)
  • 4
  • 5
  • 22
  •   
 
Thread Rating:
  • 1 Vote(s) - 5 Average



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