More > JRiver Media Center 22 for Windows

Did you change something in MCWS in v22

<< < (2/4) > >>

AndrewFG:
I have the URL below in my (Safari) browser favorites; until now, opening this favorite was sufficient to send my MC HTPC to sleep; but now it doesn't work. So what do I need to add to this URL to make it work again?

http://192.168.1.103:52199/MCWS/v1/Control/MCC?Command=27001&Parameter=1

mattkhan:
I've done it like this https://github.com/3ll3d00d/jrmc-utils/blob/master/functions.sh


--- Code: ---# Obtains an authentication token if one does not exist already
function authenticate {
    ensure_jrmc_alive
    if [ -z "${MCWS_AUTH_TOKEN}" ]
    then
        export MCWS_AUTH_TOKEN="$(curl -s -u ${JRMC_USER}:${JRMC_PASS} http://${JRMC_HOST}:${JRMC_PORT}/MCWS/v1/Authenticate | xmllint --xpath '/Response[@Status="OK"]/Item[@Name="Token"]/text()' - 2>/dev/null)"
return $?
    else
return 0
    fi
}

--- End code ---

which you use by appending
--- Code: ---&Token=${MCWS_AUTH_TOKEN}
--- End code ---
to the request

if would be nice if there were a simpler way to get a token rather than having to parse XML

how to supply http basic auth details probably depends on how you are calling it, curl is something like curl -u me:password123 http://foo.com for example

AndrewFG:
I am not using code to call this function. And I do not want to use code for it. I just navigate to the http URL (stored in the browser favorites folder) via the regular stock Safari browser on my iPad. On MC 21 it worked just fine. But MC 22 has broken it..

mattkhan:

--- Quote from: AndrewFG on July 28, 2016, 04:03:40 pm ---I am not using code to call this function. And I do not want to use code for it. I just navigate to the http URL (stored in the browser favorites folder) via the regular stock Safari browser on my iPad. On MC 21 it worked just fine. But MC 22 has broken it..

--- End quote ---
it should challenge you for a username and password then, some browsers let you do http://username:password@myjriverinstance/some/path but I don't know if safari is one of them

Hendrik:
You probably need to enable Authentication in the Media Network settings for those commands to be accessible again, which then means all interaction needs authentication. We decided a command to shutdown your system is best only available with credentials.
Its the same way with any action that writes to the library - you need to turn on Authentication or they fail.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version