Action ID: SwitchPlayer (not working?)
#1
Hi,

I'm the dev. of the YouTube addon (http://forum.kodi.tv/showthread.php?tid=200735) and I'm trying to replicate the behavior of the 'Play using...' button for external players of the default context menu.

I replaced the context menu, because the context menu is full with stuff the users don't wanted, sub-menus aren't supported and because of that the 'Play using...' (logically Wink ) is missing.

I've added an external player in my playcorefactorey.xml to see if I'm doing things right so far. I see the player using the default context menu but it's not working if I add my own menu entry with:

Code:
('Play with...', 'Action(SwitchPlayer)')

The context menu just closes. Is this even possible?
Reply
#2
There's a 'playwith' builtin that is used to specify the player and fire up the playback. At least from a brief look at the code .. See https://github.com/xbmc/xbmc/blob/master....cpp#L1065
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
Ahhh Wink so I have to use?

Code:
xbmc.executebuiltin("PlayWith('plugin://plugin.video.youtube/play/video_id=[VID]')")

Update:
Ahh no...I need to know the core?....Confused this doesn't help. But thanks for the info.
Reply
#4
Nope. I think you need to create a new playlist first. then 'xbmc.executebuiltin("playwith(<extplayername>)". Python stuff is not really my department, sorry Wink
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
I think I have to provide an advanced setting so the user can decide to use the default context menu or the replaced one.

I have no interest in re-inventing the wheel for methods internally already exists Wink

I thought I can use the Action ID, because this ID seems to work for skins and JSON-RPC.
Reply
#6
Ah. Totally misread the switchplayer thingy. Will check why that action does nothing and keep you posted.

EDIT: Could you provide a dummy to make it easier for me to test?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#7
Thanks Smile

would it help if you use the last YouTube beta6 from Git? The routine is in there Smile otherwise I have to create a dummy after work Smile

https://github.com/bromix/plugin.video.y.../v5.0.4-b6
Reply
#8
Jep, that should work. Thanks.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#9
(2015-01-15, 10:59)bromix Wrote: I thought I can use the Action ID, because this ID seems to work for skins and JSON-RPC.

I couldn't find this being used in the skins I checked. Could you give an example?

My first guess would be that this Action only works on items that the players can play - for instance local media or a web url. Since your items probably have a 'plugin://...' for the playable URL, the Action fails because there is nothing it can handle. This is just a guess Smile
Reply
#10
(2015-01-15, 21:15)ruuk Wrote:
(2015-01-15, 10:59)bromix Wrote: I thought I can use the Action ID, because this ID seems to work for skins and JSON-RPC.

I couldn't find this being used in the skins I checked. Could you give an example?

My first guess would be that this Action only works on items that the players can play - for instance local media or a web url. Since your items probably have a 'plugin://...' for the playable URL, the Action fails because there is nothing it can handle. This is just a guess Smile

Maybe I'm wrong: http://forum.kodi.tv/showthread.php?tid=188339

The rule is okay...I already tested it with the default context menu and the player was displayed. So the rule is working. I thought (based on this http://kodi.wiki/view/Action_IDs) if I add a menu item (if needed) the normal behavior of the 'Play using' would be accomplished (Like Queuing the current item works). But instead the button does nothing - not even a error or warning in the debug log.
Reply
#11
From a brief look there's a problem with GetRemotePlayers and the actual item handling. Will check in detail later.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#12
(2015-01-16, 09:16)mkortstiege Wrote: From a brief look there's a problem with GetRemotePlayers and the actual item handling. Will check in detail later.

I can wait...and thanks for the effort Smile I hope this will work Wink
Reply
#13
(2015-01-16, 09:16)mkortstiege Wrote: From a brief look there's a problem with GetRemotePlayers and the actual item handling. Will check in detail later.

Not to annoy you Wink but any issue I can follow on this?
Reply
#14
FYI, PR @ https://github.com/xbmc/xbmc/pull/6212. Will have to re-do it properly but had no time to look at it again.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply

Logout Mark Read Team Forum Stats Members Help
Action ID: SwitchPlayer (not working?)0