Kodi Community Forum

Full Version: External Player / Path Substitution / Shared Machine Issue.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This question/post was originally part of another thread I had started, but being buried underneath SOLVED thread, I wasn't getting replies & therefore am posting this issue separately/independently.

The original Thread/Post can be found [here].

I use an external player, PowerDVD, to play all my ISO's (Only the ISO's). I'm using a wonderful & efficient script written by brazen1 to do so, and the whole system works really well on my primary/server machine.

I ran into a problem with the "Client" machine. I setup everything just the same as the "Server" machine, including the external player/PowerDVD script - I've got a PATH problem which essentially stems from PATH SUBSTITUTION written in "advancesettings.xml" not being used by "playercorefactory,xml" which mounts & plays ISO's in an external player.

The path substitutions I have in "advancesettings.xml" work perfectly fine for any media that's played by the Internal Player, however, since "advancesettings.xml" affects KODI, not "playercorefactory.xml", it's not working for ISO's.

When I play an ISO, the script basically MOUNTS the ISO on the VirtualCloneDrive virtual drive (In this case, D drive), then launches PowerDVD and PowerDVD begins playback.

However, on the "Client", while all of the above still happens -- the only thing that doesn't happen is that the ISO doesn't mount because the Script doesn't have any Path Substitution capabilities - so when it sees "H:\Movies\Beetlejuice.ISO", it literally attempts to mount "H:\Movies\Beetlejuice.ISO", even though there is no "H:\Movies" on the "Client" machine.

All my ISO's are in "H:\Movies" on the "Server" machine.
In my advancesettings.xml, I have the Path Substitution setup as:

Code:
<substitute>
<from>H:\Movies</from>
<to>smb://l3viathan@MEDIASTRASSE/BD5/Movies</to>
</substitute>

This works perfectly fine within KODI.

However, I use the following 2 scripts (by brazen1) to MOUNT the ISO & launch PowerDVD:

Playercorefactory.XML
Code:
<playercorefactory>
  <players>
     <player name="PowerDVD" type="ExternalPlayer" audio="false" video="true">
       <filename>C:\Users\b3lial\AppData\Roaming\Kodi\userdata\PlayISO.bat</filename>
       <args>"{1}"</args>
       <hidekodi>true</hidekodi>
       <hideconsole>true</hideconsole>
       <forceontop>false</forceontop>
     </player>
    </players>
     <rules action="prepend">
       <rule filetypes="iso|bdmv|mpls" player="PowerDVD"/>
     </rules>
</playercorefactory>

PlayISO.bat
Code:
Set file=%1
Set dummy=%file:iso=%
IF NOT %dummy% == %file% (GOTO playiso) ELSE (goto next)

:next
Set file=%1
Set dummy=%file:mpls=%
IF NOT %dummy% == %file% (GOTO plaympls) ELSE (goto playbdmv)

:playiso
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" D:
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u
GOTO end

:plaympls
set pth=%1
set pth=%pth:~1,-25%
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" "%pth%" exit
GOTO end

:playbdmv
set pth=%1
set pth=%pth:BDMV\MovieObject.bdmv=%
set pth=%pth:BDMV\index.bdmv=%
"C:\Program Files (x86)\CyberLink\PowerDVD16\PowerDVD.exe" %pth% exit
GOTO end

:end
exit

While KODI knows that
H:\Movies\Beetlejuice.ISO
is really supposed to be
smb://l3viathan@MEDIASTRASSE/BD5/Movies/Beetlejuice.ISO
because of the Path Substitution in "advancesettings.xml", the "playcorefactory.xml" and subsequently the "PlayISO.bat" does not!
It is literally looking to mount
H:\Movies\Beetlejuice.ISO
instead of trying to mount smb://l3viathan@MEDIASTRASSE/BD5/Movies/Beetlejuice.ISO
and so I get an error
Could not mount H:\Movies\Beetlejuice.ISO.

The real issue stems from the fact that "advancesettings.xml" and "playercorefactory.xml" are independent of each other and are basically not talking to each other, therefore path substitutions written in "advancesettings.xml" are not read by "playercorefactory.xml".

Not sure how to resolve this issue. Looking for advice.

Thanks!