• 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 22
HEADS UP: Filling a list from a directory/plugin
(2014-08-09, 15:15)Hitcher Wrote: category Wink

Thanks!!. Name plugin is example. Smile
I already edit post.
Reply
(2014-05-03, 16:44)`Black Wrote: 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.

Hi Black
Sometime get error
PHP Code:
ERRORXFILE::CDirectory::GetDirectory Error getting 

my content static is folder. I get error when I re-click item content staics (xbmc created cache window).
How to fix it?
Thanks.
Reply
Target should be 'video' not 'videos'.
Reply
'video' and 'videos' are both working.
Image
Reply
Then I assume it's something wrong with the path.
Reply
(2014-08-10, 10:21)Hitcher Wrote: Target should be 'video' not 'videos'.

(2014-08-10, 12:44)`Black Wrote: 'video' and 'videos' are both working.

Thank Hitcher, Black.
Solved! Black's guide is help me. I dont set cache xbmc for plugin (plugin get content Episode, Movie... not content statics)
PHP Code:
xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=False
It works and I dont get above error.

my workflow (I use content statics for change window):
window A (cache) -> window B (cache) -> window A (get error but window still load item and ok because of MyVideoNav.xml refreshList)

Dont set cachetoDics:
window A (delay time) -> window B(delay time) -> window A(delay time and not get error)

So, I wanna use cache for my plugin. Is it possible? Huh
Reply
Cache is used automatically for plugins. What you need to handle is the refreshing.
Image
Reply
(2014-08-10, 14:31)`Black Wrote: Cache is used automatically for plugins. What you need to handle is the refreshing.

I wanna if folder path window is change, content will reload static content. At the moment, I get a small error as below
PHP Code:
ERRORXFILE::CDirectory::GetDirectory Error getting 
I think the error dont affect system.
Thank Black for answer.
Reply
It's already possible to limit number of tems in content ?
Reply
Yes, it was merged yesterday.

PHP Code:
<content limit="10">videodb://movies/titles</content> 
Image
Reply
perhaps eventually put all the info in this thread in a nice wiki page in the skin section?
@ned Smile
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
Already did that.. Will update accordingly if new features arrive or changes were made.
Image
Reply
nice.
perhaps other could shim in with adding some code examples mentioned in this thread. so other can get started easier with 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
(2014-08-12, 08:41)`Black Wrote: Yes, it was merged yesterday.

PHP Code:
<content limit="10">videodb://movies/titles</content> 

Nice, so this feature will be avaiable for gotham builds or helix ?
Reply
Helix only.
Image
Reply
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 22

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