2009-04-29, 09:18
moby-uk Wrote:5) Added a mechanism to make some (regexp-driven) changes to the filename. This is
for those of you that wanted support for your externalplayers playing DVD folders, rars
and whatever else, however, you will have to do some legwork for this.
...
Got MPC HC to play rars. Made sure to install RARFileSource (from http://www.v12pwr.com/RARFileSource/).
And then used the replacer to edit the filename sent to the external player.
Doesn't look very pretty, but at least its functional :p
Code:
<advancedsettings>
<video>
<defaultplayer>externalplayer</defaultplayer>
</video>
<externalplayer>
<filename>C:\Program Files (x86)\MPC HC\x86\mplayerc.exe</filename>
<args>/fullscreen /close</args>
<forceontop>true</forceontop>
<hidexbmc>false</hidexbmc>
<replacers action="prepend">
<replacer global="true">
<match>rar://.*</match>
<pat>%3a</pat>
<rep>:</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%20</pat>
<rep>\1 \1</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%5c</pat>
<rep>\</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%5f</pat>
<rep>_</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%28</pat>
<rep>(</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%29</pat>
<rep>)</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%7b</pat>
<rep>{</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%7d</pat>
<rep>}</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%5b</pat>
<rep>[</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%5d</pat>
<rep>]</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%2e</pat>
<rep>.</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%2d</pat>
<rep>\1-</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>.rar/.*</pat>
<rep>.rar</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>%2f</pat>
<rep>\</rep>
</replacer>
<replacer global="true">
<match>rar://.*</match>
<pat>smb:\\</pat>
<rep>\\</rep>
</replacer>
<replacer stop="true">
<match>rar://.*</match>
<pat>rar://</pat>
<rep>\1</rep>
</replacer>
</replacers>
</externalplayer>
</advancedsettings>
It works quite well and I think I covered most of the "strange" characters :p
Only negative thing I have found is that RARFileSource isn't as efficient in reading from rar as the one found in XBMC...