Play using... rule behaviour
#1
Hi,

I would like a rule in playercorefactory that simply overrides any other
rule when i choose "Play using..."
"Play using..." should make the choosen player default, and therefore play anything
i throw at it.
Only when i start playback the normal way, as by clicking without a contextual menu,
should this rule be disregarded.

Below is an example how a rule looks if you wanted VLC to play everything today.
(It becomes default player)
That's the only way that i know of to make an external player play everything, but it's
not the behaviour i want.
Is this doable somehow?

Code:
<rules action="prepend">
<rule video="true" player="VLC"/>
</rules>
Reply
#2
Check the wiki External players (wiki) specifically 2.2.1 VLC then look at this thread https://forum.kodi.tv/showthread.php?tid...pid2882134 and modify the player, path and rules to reflect VLC. The key part is <rule video="true" player="paplayer"> to allow Kodi as default.
Reply
#3
(2019-09-11, 16:23)PatK Wrote: Check the wiki External players (wiki) specifically 2.2.1 VLC then look at this thread https://forum.kodi.tv/showthread.php?tid...pid2882134 and modify the player, path and rules to reflect VLC. The key part is <rule video="true" player="paplayer"> to allow Kodi as default.
Hi PatK and thanks for your answer.

My issue with the external player configuration is that it is fundamentally flawed.
Kodi's rule based player behaviour have a global scope, hence once you have made a rule
for a particular player, only that player will abide those rules.

My suggestion would be to scrap the whole rule system, and make whatever player you are
choosing by the contextual menu "Play using..." be the default for everything when chosen.
If another player is chosen from the contextual menu, then that player will play everything,
and so on..
When i start playback the normal way, as by clicking without a contextual menu,
the internal player should be the default.

If it worked like this, then i could play the same media with different players,
without having to restart kodi with a different playercorefactory.
Should be an option in the player settings, like "External player rules off",
or in playercorefactory like <forcedefault>true</forcedefault>

This rule system is just a headache, and looking through all the support threads really confirms it.
Reply
#4
(2019-09-11, 20:52)dobbelina Wrote: When i start playback the normal way, as by clicking without a contextual menu,
the internal player should be the default.
That is how the example works, the Kodi internal player is default, if you want another player it is available from the context menu. In this example I have four video players to choose, with the internal as default.
Code:
<playercorefactory>
<players>
<player name="MPC-BE" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\MPC-BE x64\mpc-be64.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
<playcountminimumtime>1140</playcountminimumtime>
</player>
<player name="mpc-hc64" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files (x86)\MPC-HC\mpc-hc.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
<playcountminimumtime>1140</playcountminimumtime>
</player>
<player name="VLC" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\VideoLAN\VLC\vlc.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
<playcountminimumtime>1140</playcountminimumtime>
</player>
</players>
<rules action="prepend">
<rule video="true" player="paplayer">
</rule>
</rules>
</playercorefactory>

Your idea is a bit more sophisticated, and would be something for the feature suggestion forum and could be something that others might consider should there be wide interest.
Reply
#5
(2019-09-12, 00:12)PatK Wrote:
(2019-09-11, 20:52)dobbelina Wrote: When i start playback the normal way, as by clicking without a contextual menu,
the internal player should be the default.
That is how the example works, the Kodi internal player is default, if you want another player it is available from the context menu. In this example I have four video players to choose, with the internal as default.
Code:
<playercorefactory>
<players>
<player name="MPC-BE" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\MPC-BE x64\mpc-be64.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
<playcountminimumtime>1140</playcountminimumtime>
</player>
<player name="mpc-hc64" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files (x86)\MPC-HC\mpc-hc.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
<playcountminimumtime>1140</playcountminimumtime>
</player>
<player name="VLC" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\VideoLAN\VLC\vlc.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
<playcountminimumtime>1140</playcountminimumtime>
</player>
</players>
<rules action="prepend">
<rule video="true" player="paplayer">
</rule>
</rules>
</playercorefactory>

Your idea is a bit more sophisticated, and would be something for the feature suggestion forum and could be something that others might consider should there be wide interest.
Thanks for your reply,
Using your playercorefactory, or my own, which is in the right format doesn't work.
Sure, the players are there in the context menu, but when you choose one of them kodi still
reverts to the default player disregarding my choice.
Only on a few media items/addons will it abide by my choice and actually play with the external player.
Setting a player as default, (As in my first post example) is the only way for it to work,
and then only by that player.
I guess this perhaps is an addon issue, but that is not something i can provide an answer for.
Reply
#6
(2019-09-12, 05:04)dobbelina Wrote: Using your playercorefactory, or my own, which is in the right format doesn't work.
Works for me, the code was taken directly from my working system set-up. The failure to function on your end might have something to do with the location and name of your players, the script must be adjusted to reflect your path, system and players. Echo your present full playercorefactory.xml perhaps there's a small code slip-up.
Reply
#7
Hi again,
No code slip-up
If there were, it shouldn't work at all.
In some addons using "Play using..." it respects my choice of another player and works fine,
and in others it don't, and reverts back to the default player even when another player has been chosen.
Have tried several playercorefactory.xml including the example one below which is correct.
Have even tried with a fresh install by deleting/renaming the kodi folder in Roaming,
still a no-go.i'm on Leia 18.3
Warning message in the log when using the playercorefactory.xml below:
(Still works, but with the same behaviour as described above)
Code:
Loading player core factory settings from special://profile/playercorefactory.xml.
2019-09-12 20:35:19.971 T:7160 WARNING: CPlayerCoreFactory::GetPlayer(VLC): no such player: VLC
playercorefactory.xml
Code:
<playercorefactory>
<players>
<player name="VLC" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\VideoLAN\VLC\vlc.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
<playcountminimumtime>1140</playcountminimumtime>
</player>
</players>
<rules action="prepend">
<rule video="true" player="paplayer">
</rule>
</rules>
</playercorefactory>
Reply
#8
(2019-09-12, 20:47)dobbelina Wrote: In some addons
What add-ons are those? My assumption was the local library. Add-ons are an entirely different kettle of fish, and as such the playing of a stream is likely internally called up within the add-on and becomes the issue with the specific add-on.
Reply
#9
(2019-09-12, 21:32)PatK Wrote:
(2019-09-12, 20:47)dobbelina Wrote: In some addons
What add-ons are those? My assumption was the local library. Add-ons are an entirely different kettle of fish, and as such the playing of a stream is likely internally called up within the add-on and becomes the issue with the specific add-on.
Yep, that's what i suspect as well.
And in those, changing default player is the only remedy for it to use the external player.
As in the example in the first post.
Reply
#10
I doubt there would be much core developer interest in changing this behaviour, when there is little control over 3rd party add-ons, given it's possible to enable this functionality within the add-on.
Reply

Logout Mark Read Team Forum Stats Members Help
Play using... rule behaviour0