INTERACT FORUM
Linux => JRiver Media Center 32 for Linux => Topic started by: zeltak on March 24, 2024, 04:09:26 pm
-
Hi all
first thank you for @max for his amazing docker image
im struggling trough with getting the web server (mcws) to work for me
the IP address of the docker image is 192.168.1.37, and I turned iff (for now) authentication, yet I cant see to interact with mcws,ie this wont work
curl http://192.168.1.37:52199/MCWS/v1/Control/MCC\?Command\=10000 -O /dev/null
it simply does nothing and the CLI show an error
zsh: no such file or directory: http://192.168.1.37:52199/MCWS/v1/Control/MCC?Command=10000
any clue guys?
thx alot
Z
-
Could it be that the port number is wrong? I've gotten myself in trouble with that before.
-
thx!
you mean the port on the docker JRiver install itself?
In the jriver server it does say
TCP Port: 52199
thx alot
Z
-
curl http://192.168.1.37:52199/MCWS/v1/Control/MCC\?Command\=10000 -O /dev/null
With media network enabled you can type that into the browser 192.168.1.37:52199 to get to Panel. Might be easier than curl?
If you canīt get there either 52199 is blocked by your firewall or you are using bridge networking and have not forwarded 52199 in docker or you have not enabled media network in mc.
-
thx @max096
wow Panel does work wonder then why does the curl command dosent
Im a bit at loss since media network is enabled
thx
Z
-
any clue guys?
try wrapping the url in single quotes or using
alias curl='noglob curl'
-
curl http://192.168.1.37:52199/MCWS/v1/Control/MCC\?Command\=10000 -O /dev/null
it simply does nothing and the CLI show an error
zsh: no such file or directory: http://192.168.1.37:52199/MCWS/v1/Control/MCC?Command=10000
It's lowercase -o /dev/null.
Uppercase -O is telling it to write to a file called "MCC\?Command\=10000" or similar (perhaps the full URL as a filename, depends on curl variant), which cannot be created, or you're running in a folder with no write permissions.
Also, not sure you need to escape the ? and = symbols.
-
Also, not sure you need to escape the ? and = symbols.
you do need to escape the ? in zsh (or quote the URL or use noglob)
-
Hi all really appreciate all the comments but I think im more confused then ever and nothings works haha
so I have MC setup in a docker on my nas (192.168.1.37), which will never play anything just serve files to MBP and MB air.
I have been using a local library for years on Mac with curl commands to control/intereact with MC, ie
curl http://localhost:52199/MCWS/v1/Control/MCC\?Command\=10000 -O /dev/null
but playback is done ie via MC on MBP
now im confused :
1) do I need to run this command still on MBP (localhost) or do I need to run it on the server, ie:
curl http://192.168.1.37:52199/MCWS/v1/Control/MCC\?Command\=10000 -O /dev/null
2) how do I authenticate? I cant for the life of me get it to work after I enabled authentication (since starting to use a "server") at all
I tried this
curl http://USER:PASS:localhost:52199/MCWS/v1/Control/MCC\?Command\=10000 -O /dev/null
but dosent seem to work
any help would be truly appreciate as im totally lost :)
best
Z
-
but playback is done ie via MC on MBP
do you mean you now have 2 instances of MC? one is the server which is running in docker, the other running locally on the MBP and which is actually playing content?
if so, you have 2 choices
1) tell the server to be able to control client zones, send the command to the server targeting the client zone (this will be easier to do using a more explicit command like MCWS/v1/Playback/Pause)
2) enable media server on the client, send the command to localhost as you have been doing since forever
probably 2) is simpler
2)I tried this
curl http://USER:PASS:localhost:52199/MCWS/v1/Control/MCC\?Command\=10000 -O /dev/null
basic auth is http://USER:PASS@localhost:52199/etc
or curl -u USER:PASS http://localhost:52199/etc
-
C:\Temp> curl --help
Usage: curl [options...] <url>
-d, --data <data> HTTP POST data
-f, --fail Fail fast with no output on HTTP errors
-h, --help <category> Get help for commands
-i, --include Include protocol response headers in the output
-o, --output <file> Write to file instead of stdout
-O, --remote-name Write output to a file named as the remote file
-s, --silent Silent mode
-T, --upload-file <file> Transfer local FILE to destination
-u, --user <user:password> Server user and password
-A, --user-agent <name> Send User-Agent <name> to server
-v, --verbose Make the operation more talkative
-V, --version Show version number and quit
This is not the full help, this menu is stripped into categories.
Use "--help category" to get an overview of all categories.
For all options use the manual or "--help all".
It's -o /dev/null, not -O /dev/null
For user/pass add a -u user:pass
Send you curl commands to the localhost, assuming it's connected to the NAS/Docker library. MCWS needs to be enabled of course.
-
thank you both!!
that solved it, really appreciate your help guys!
Z