Playercorefactory not launching correct external player
#1
I've been searching through and I think I have everything right here but it just isn't working...

All I'm trying to do is play mkv files in VLC *unless* the file name starts with [HD]. Those should be played in MPC-HC.

This is my playercorefactory.xml:
Code:
<playercorefactory>
<players>
   <player name="MPC-HC" type="ExternalPlayer" audio="false" video="true">
     <filename>C:\Program Files (x86)\Media Player Classic - Home Cinema\mpc-hc.exe</filename>
     <args>"{1}" /fullscreen /close</args>
     <hidexbmc>false</hidexbmc>
     <hideconsole>false</hideconsole>
     <warpcursor>none</warpcursor>
   </player>
   <player name="VLC" type="ExternalPlayer" audio="false" video="true">
     <filename>C:\Program Files (x86)\VideoLAN\VLC\vlc.exe</filename>
     <args>"{1}" --fullscreen</args>
     <hidexbmc>false</hidexbmc>
     <hideconsole>false</hideconsole>
     <warpcursor>none</warpcursor>
   </player>
</players>
<rules action="prepend">
  <rule filetypes="mkv" player="VLC">
     <rule filename=".*[HD].*" player="MPC-HC"/>
   </rule>
</rules>
</playercorefactory>

Unfortunately, ALL files play in MPC-HC. If I replace the "MPC-HC" with "VLC" for testing purposes, VLC launches correctly which tells me the player is setup correctly, but the rule is not being applied properly.

If anyone has any ideas, I'd certainly appreciate it!!

Thanks in advance.
Reply
#2
In regular expressions [xyz] means "match any of the characters x, y or z". Try:

<rule filename=".*\[HD\].*" player="MPC-HC"/>

The backslash character is the escape character so \[ means "match the [ character".

JR
Reply
#3
That works! Darn regex. lol

TYVM
Reply

Logout Mark Read Team Forum Stats Members Help
Playercorefactory not launching correct external player0