Page 1 of 1

Launch a batch file inside album folder

Posted: Tue Apr 17, 2018 7:17 am
by grunter
Hi, I'm using a command line player (we could call it player.exe) that could only play a file at a time because is a real time player, in other terms it doesn't wait for user command.
This player is my defualt windows player, so in Muso I usually find an album, then a track in that album at launch it with "play track now command".
The only way to play an entire folder is to open a command prompt in that folder and write something like these:

player.exe track01.flac track02.flac trackxx.flac

So at the end of track01 player starts again and plays track02 and so on until the last track.
The author of that player (a friend of mine) has written a small batch file to put in every folder called play.bat that automates this process, so when I'm inside a folder and call play.bat it starts a cycle that plays every .flac or .dsf file inside that folder.

So I'd like if Muso could invoke such a play.bat when I am in Album View.
Obviously when I am in Album View I could open command prompt in album folder and manually launch play.bat, but I ask you if is it possible to invoke that batch file inside Album View.
Thanks.

Re: Launch a batch file inside album folder

Posted: Tue Apr 17, 2018 10:28 am
by musoware
Could the command line player not be changed to handle queueing, so if it has another file pushed to it while it is playing it just adds it to its playlist rather than replacing the playing track?

Re: Launch a batch file inside album folder

Posted: Tue Apr 17, 2018 12:07 pm
by grunter
musoware wrote:Could the command line player not be changed to handle queueing, so if it has another file pushed to it while it is playing it just adds it to its playlist rather than replacing the playing track?
No it couldn't.
This command line player is not waiting for response from user, so the only way to add another track is to launch it after the first track stops.

So the available way to actually use Muso and this player to play a complete album is:
1- Use Muso to browse album
2- After found the album use the option "Browse Album Folder"
3- Launch play.bat within the album folder

I ask if is it possible to launch this batch file directly from muso, i.e. an option to check for batch file in Muso.

This is the script.

@ECHO OFF
REM
REM *** CHANGE THE VALUES OF THE TWO PARAMETERS: PLAYDIR, PAPEXE ***
REM
set PLAYDIR=C:\Player\
set PLAYEXE=C:\Player\Player.exe
REM
REM DO NOT CHANGE ANYTHING BELOW THIS LINE
REM
if exist %PLAYDIR% goto OKDIR
md %PLAYDIR%
:OKDIR
set MYPATH=%~dp0
set STARTC=start /realtime /wait
REM set STARTC="start /realtime CMD /C"
for %%G IN (%MYPATH%*.flac) do (
copy /B/V/Y "%%G" %PLAYDIR%tmp.flac
%STARTC% %PLAYEXE% "%PLAYDIR%tmp.flac"
)
for %%G in (%MYPATH%*.dsf) do (
copy /B/V/Y "%%G" %PLAYDIR%tmp.dsf
%STARTC% %PLAYEXE% "%PLAYDIR%tmp.dsf"
)

Re: Launch a batch file inside album folder

Posted: Fri Apr 20, 2018 8:19 pm
by musoware
I'm just trying to think of a way to help you with a generic change that may be useful to others - I can't start adding entirely bespoke functionality that's useful for only one user.

Re: Launch a batch file inside album folder

Posted: Thu Apr 26, 2018 6:26 am
by grunter
musoware wrote:I'm just trying to think of a way to help you with a generic change that may be useful to others - I can't start adding entirely bespoke functionality that's useful for only one user.
Yes, of course.
You are right.
I'm thinking it too.

Re: Launch a batch file inside album folder

Posted: Thu Apr 26, 2018 7:04 am
by musoware
Maybe a configurable command to issue for the default player option, that would string paths together.