• AnyStream is having some DRM issues currently, Netflix is not available in HD for the time being.
    Situations like this will always happen with AnyStream: streaming providers are continuously improving their countermeasures while we try to catch up, it's an ongoing cat-and-mouse game. Please be patient and don't flood our support or forum with requests, we are working on it 24/7 to get it resolved. Thank you.

XBMC External Player Batch file (Read Disc.inf)

ddjmagic

Well-Known Member
Thread Starter
Joined
Feb 9, 2012
Messages
1,560
Likes
187
I am trying to create a batch file for Blu-ray Disc playback on XBMC 11/12 that launches MPC-HC (with LAV Filters) reads the 'Disc.inf' and gets the correct playlist file without any use selection/input.

Here's what I have so far (Note I have no experience with this just been searching around)

Code:
findstr /m "playlists=" D:\disc.inf

IF ERRORLEVEL 1 GOTO playlistnotfound
IF ERRORLEVEL 0 GOTO playlistfound

:playlistfound

for /f "tokens=2 delims==," %%i in ('findstr playlists D:\disc.inf') do set playlist=%%i
"C:\Program Files (x86)\MPC-HC\mpc-hc.exe" "D:\BDMV\PLAYLIST\00%playlist%.mpls"
GOTO End

:playlistnotfound
"C:\Program Files (x86)\MPC-HC\mpc-hc.exe" "D:\BDMV\index.bdmv"
GOTO End

:end

This batch file seems to work great, but one problem is it will only work if the correct playlist listed is 3 characters eg 789
If the playlist is say 30 MPC will try and open 0030.mpls instead of 00030.mpls

I can't figure how to get the batch file to check the length of the variable and if its less than 3 characters then add a 0 to the beginning of a variable.

Just thought I'd post here to see if anyone might know how I could get this to work, or if there a better way of doing it completely ;)
 
Actually I think I might have of figured it out

Code:
findstr /m "playlists=" D:\disc.inf

IF ERRORLEVEL 1 GOTO playlistnotfound
IF ERRORLEVEL 0 GOTO playlistfound

:playlistfound

for /f "tokens=2 delims==," %%i in ('findstr playlists D:\disc.inf') do set playlist=%%i
IF %playlist% LSS  100 SET playlist=0%playlist%
IF %playlist% LSS  1000 SET playlist=0%playlist%
"C:\Program Files (x86)\MPC-HC\mpc-hc.exe" "D:\BDMV\PLAYLIST\0%playlist%.mpls"
GOTO End

:playlistnotfound
"C:\Program Files (x86)\MPC-HC\mpc-hc.exe" "D:\BDMV\index.bdmv"
GOTO End

:end

Any feedback or improvement would be appreciated.
I prefer MPC/LAV over XBMC's internal player so hopefully this will get Screenpass titles working perfectly.
 
I take that back I can't get either of them to work when used with XBMC :doh:
 
Back
Top