Posts: 123
Joined: Feb 2011
Reputation:
1
Vrok
Senior Member
Posts: 123
I've got 2 video plugins I want to change in order to:
1) always set thumbnail viewpoint as the default
2) make a refresh context menu item that refreshes the whole plugin from the internet. I'd like to do that each time the user enters the main page of the plugin. Now it seems XBMC caches it and never refetches the content.
Any help?
Posts: 123
Joined: Feb 2011
Reputation:
1
Vrok
Senior Member
Posts: 123
Argh.. cacheToDisc=False doesn't work all that good. I want it to keep cache but I also want it to refresh when the user goes in the main url of the pligin from the main menu
Posts: 123
Joined: Feb 2011
Reputation:
1
Vrok
Senior Member
Posts: 123
After testing some stuff I found out that the way I call the plugin doesn't really refresh it.
I call it through favorites which has ActivateWindow for the call.
This apparently doesn't refresh the plugin like when you go directly to it through videos -> video add-ons
How can I make the call in favourites.xml so that it gets refreshed whenever I go there?
Posts: 246
Joined: Sep 2009
Reputation:
8
#1 The youtube plugin does this so you should look at that code
#2 I'm not sure what you mean by "refresh the plugin". Which plugin is this? and what data are you trying to reload and in what context?
Posts: 123
Joined: Feb 2011
Reputation:
1
Vrok
Senior Member
Posts: 123
i will post the logs laterbut till then I know that in the favourites.xml file activatewindow gets called in order to open up the plugin folder.
I don't know how the 2nd way does this and I'd like to know if i can replace activatewindow with another suitable method
I'm using aeon nox btw but i'll try this in other skins to check it out
Posts: 246
Joined: Sep 2009
Reputation:
8
yeah that's the problem, activatewindow only seems to call the plugin the first time you run it after boot, but a debug log will confirm that
Posts: 123
Joined: Feb 2011
Reputation:
1
Vrok
Senior Member
Posts: 123
yes it does exactly that. any solutions to my problem? can i call anything else from the favourites file?
Posts: 246
Joined: Sep 2009
Reputation:
8
you should probably post in the skin or favourites plugin thread, you're more likely to get some solutions there, this isn't actually an issue with a plugin but with the way it's being called by the skin
Posts: 793
Joined: Oct 2010
Reputation:
17
There are parameters that need to be passed to the youtube plugin to make it do what you want, such as:
ActivateWindow(10025,"plugin://plugin.video.youtube/?mode=play&url=http://www.youtube.com/somevideo")
I just made those up, but it should give you an idea as to what you're looking for. The only way to find out what parameters you need to pass are to look the code of the youtube addon, or ask someone familiar with it's development.
That's why paddycarey directed you to the youtube plugin thread. A lot of skinners are familiar with this process so that's a possible place to ask as well
Posts: 793
Joined: Oct 2010
Reputation:
17
I still think you need someone with knowledge of the skinning system (not my strong suit lol), the reason being that a LOT of skins integrate favorites and custom menu items, so those folks are more familiar with what you can and can't do there.
Can you use RunPlugin() instead of ActivateWindow()? It seems to me that it's logical for xbmc to cache a windows once it's created, but if you're running the plugin, it'll create it's own window and not be cached. It's also feasible that you could use any builtin there, because if you had to use ActivateWindow(), I would think you also wouldn't have to specify it.