#17983 closed Bugs (Fixed)

External / Alternative player will always be launched also when no rule matched

Reported by: popy Owned by: FernetMenta
Priority: 4 - Normal
Component: Video playback (inc. audio in video and codecs) Version: 18.0 "Leia" Alpha3
Severity: Normal Keywords: PCF playercorefactory
Cc: Blocked By:
Blocking: Platform: All

Description

When you define an playercorefactory.xml file with an rule like this:

<playercorefactory>
    <players>
        <player name="MPC-HC" type="ExternalPlayer" audio="false" video="true">
            <filename>C:\temp\test.bat</filename>
            <args>"{1}"</args>
            <hidexbmc>false</hidexbmc>
            <hideconsole>false</hideconsole>
            <warpcursor>none</warpcursor>
            <playcountminimumtime>1140</playcountminimumtime>
        </player>
    </players>
    <rules action="prepend">
        <rule filename=".*4K.*" player="MPC-HC"/>        
    </rules>
</playercorefactory>

The behaviour should be:

  • if the filename has "4K" in it, kodi should launch the external player
  • if the filename has NOT "4K" in it, kodi should play it with the default player

But the behaviour is:

  • After Kodi start: if the filename has NOT "4K" in it, kodi playes it with internal video player. When you play more files with no 4K in filename, no issue. Default internal videoplayer is used.
  • If play a single file with "4K" in the filename, kodi launches the external player.
  • After you played one file with the external player, KODI IS PLAYING ALL FILES WITH THE EXTERNAL PLAYER. It doesnt care about the filename.

The log seems good. Here's one when first played an file without $K in its name after kodi start:

19:52:06.512 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers(smb://MYSERVER/MYVIDEO.mkv)
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: un-named
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: mms/udp
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtmp
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
19:52:06.512 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: radio
19:52:06.512 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
19:52:06.513 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (VideoPlayer)
19:52:06.513 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
19:52:06.513 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: MPC-HC
19:52:06.513 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
19:52:06.513 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: added 2 players
19:52:06.515 T:4988   DEBUG: Radio UECP (RDS) Processor - new CDVDRadioRDSData::CDVDRadioRDSData
19:52:06.515 T:4988  NOTICE: VideoPlayer::OpenFile: smb://MYSERVER/MYVIDEO.mkv

Here's the log when a file with 4K in its filename is played:

19:52:15.352 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers(smb://MYSERVER/MYVIDEO.4K.mkv)
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: un-named
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: un-named
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: adding player: MPC-HC for rule: un-named
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: mms/udp
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtmp
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
19:52:15.352 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: radio
19:52:15.352 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: matched 1 rules with players
19:52:15.352 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (VideoPlayer)
19:52:15.352 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
19:52:15.352 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
19:52:15.352 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: added 2 players
19:52:15.352 T:4988  NOTICE: ExternalPlayer Filename: C:\temp\test.bat

And finally the same file again as above, without 4K, but kodi is playing it in the external player:

19:52:18.957 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers(smb://MYSERVER/MYVIDEO.mkv)
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: un-named
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: mms/udp
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtmp
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
19:52:18.957 T:4988   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: radio
19:52:18.957 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
19:52:18.957 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (VideoPlayer)
19:52:18.957 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
19:52:18.957 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: MPC-HC
19:52:18.957 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
19:52:18.957 T:4988   DEBUG: CPlayerCoreFactory::GetPlayers: added 2 players
19:52:18.957 T:4988  NOTICE: CExternalPlayer::OpenFile: smb://MYSERVER/MYVIDEO.mkv

To reproduce the issue, just setup the playercorefactory.xml like above and play some videos.

Change History (2)

comment:1 Changed at 2018-08-11T16:34:21+01:00 by popy

Heres is a pull request which fixes the issue: https://github.com/xbmc/xbmc/pull/14291

comment:2 Changed at 2018-08-14T10:17:37+01:00 by Rechi

  • Milestone changed from Pending / Future to 18.0 "Leia"
  • Resolution set to Fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.