- Code: Tout sélectionner
@echo off
rem dunefeeder for feeding videos to your dune from a Windows Seven PC with XBMC - by djoole - v0.1
set wget="C:\Program Files (x86)\GnuWin32\bin\wget.exe"
echo raw url : %1>c:\debug.log
rem Moving antislashes to slashes
set url=%1
set url=%url:\=/%
rem Removing stuff to make DVD/BD playback work
set url=%url:/VIDEO_TS/VIDEO_TS.IFO=%
set url=%url:/BDMV/PLAYLIST/00000.mpls=%
set url=%url:/BDMV/MovieObject.bdmv=%
set url=%url:/BDMV/index.bdmv=%
rem Enconding ampersands
setlocal EnableDelayedExpansion EnableExtensions
set "url=!url:&=%%26!"
rem Removing double quotes
set url=%url:"=%
rem Waiting a little for the TV to sync
TIMEOUT /T 1 /NOBREAK
rem Telling the Dune to start playback
echo command : %wget% -O c:\result.txt "http://dune/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=smb:!url!">>c:\debug.log
%wget% -O c:\result.txt "http://dune/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=smb:!url!"
rem If it's a mkv, delay the audio for 0,22sec
echo.!url! | findstr /C:".mkv">nul && (
TIMEOUT /T 5 /NOBREAK
%wget% -O nul "http://dune/cgi-bin/do?cmd=ir_code&ir_code=BF40BF00"
%wget% -O nul "http://dune/cgi-bin/do?cmd=ir_code&ir_code=E817BF00"
%wget% -O nul "http://dune/cgi-bin/do?cmd=ir_code&ir_code=E817BF00"
%wget% -O nul "http://dune/cgi-bin/do?cmd=ir_code&ir_code=E817BF00"
%wget% -O nul "http://dune/cgi-bin/do?cmd=ir_code&ir_code=E817BF00"
%wget% -O nul "http://dune/cgi-bin/do?cmd=ir_code&ir_code=EB14BF00"
)
rem Now waiting for the playback to finish
TIMEOUT /T 19 /NOBREAK
:test
TIMEOUT /T 1 /NOBREAK
%wget% -O c:\result.txt "http://dune/cgi-bin/do?cmd=status"
findstr /M /C:"name=\"player_state\" value=\"file_playback\"" c:\result.txt
if not ERRORLEVEL 1 (
findstr /M /C:"name=\"playback_state\" value=\"stopped\"" c:\result.txt
if not ERRORLEVEL 1 (
goto :end
)
)
findstr /M /C:"name=\"player_state\" value=\"navigator\"" c:\result.txt
if not ERRORLEVEL 1 (
goto :end
) else (
goto :test
)
findstr /M /C:"name=\"player_state\" value=\"standby\"" c:\result.txt
if not ERRORLEVEL 1 (
goto :end
) else (
goto :test
)
:end
-j'ai juste supprimer la ligne concernant l'ampli car j'effectue les switch Hdmi etc... avec une commande macro depuis ma pronto.
-

-j'ai fais une recherche sur mon c: et le seul fichier result.txt est dans c:\utilisateurs\MOI\AppData\Local\VirtualStore c'est surement pas ca...