How do I refresh a plugin? Also how do I set a default viewpoint?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
paddycarey Offline
Senior Member
Posts: 246
Joined: Sep 2009
Reputation: 8
Post: #11
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
find quote
Vrok Offline
Senior Member
Posts: 109
Joined: Feb 2011
Reputation: 0
Location: Greece
Post: #12
but the command exists in the favourites.xml file and i can change it. i just need the correct one.


Code:
<favourite name="New Subscription Videos">
ActivateWindow(10025,&quot;plugin://plugin.video.youtube/&quot;)
</favourite>
(This post was last modified: 2012-04-02 20:58 by Vrok.)
find quote
Bstrdsmkr Offline
Fan
Posts: 648
Joined: Oct 2010
Reputation: 12
Post: #13
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
find quote
Vrok Offline
Senior Member
Posts: 109
Joined: Feb 2011
Reputation: 0
Location: Greece
Post: #14
This is incorrect. I'm not trying to play the video. Just trying to focus the plugin and refresh all the directory items. If you try it you'll see it doesn't work


<favourite name="New Subscription Videos" thumb="C:\Users\vrokolos\AppData\Roaming\XBMC\addons\plugin.video.youtube\thumbnails\ne​wsubscriptions.png">ActivateWindow(10025,&quot;plugin://plugin.video.youtube/?path=/root/subscriptions/new&amp;user_feed=newsubscriptions&amp;login=true&amp;&quotWink</favourite>


There were parameters there in the first place I just didn't put it on the post to be more clear.

ActivateWindow only refreshes the directory the first time it's called otherwise It just brings it from the cache.

That is my problem! Need a solution! This is not a skinning issue or a problem with the youtube plugin.
This is the main behaviour of XBMC and it applies to all skins and video plugins I've tried.
(This post was last modified: 2012-04-03 00:55 by Vrok.)
find quote
Bstrdsmkr Offline
Fan
Posts: 648
Joined: Oct 2010
Reputation: 12
Post: #15
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.
find quote
Vrok Offline
Senior Member
Posts: 109
Joined: Feb 2011
Reputation: 0
Location: Greece
Post: #16
Tried using RunPlugin() and RunScript() but they don't pass the window handle to the args that is needed in order for a video plugin to list the items.

Anyway I changed my plugin and I use a workaround to do what I wanted. I just added a fake front page with only one virtual item that when you click it it then continues to main folder of the plugin. Added that fake virtual page as a favourite and now I just have to also select the folder item whenever I go there.

This is silly but I can't find any other way to do it Sad Weird

BTW thanks for whoever directed me to the youtube plugin I found out how to set the default viewtype for my plugin Smile
Code:
Container.SetViewMode(id)     Set the current view mode (list, icons etc.) to the given container id.
(This post was last modified: 2012-04-04 13:42 by Vrok.)
find quote
Bstrdsmkr Offline
Fan
Posts: 648
Joined: Oct 2010
Reputation: 12
Post: #17
In a similar vein, the guys that developed Icefilms came up with a chunk of code that lets the user select a view id and automatically sets it on each window. I'm using it too and it works well.

Still not a solution, but maybe a nicer looking hack. ActivateWindow() to your fake page. In the execution of your fake page, use RunPlugin() to execute the list item. That should at least skip the step of having to click on the fake item
find quote
Post Reply