If it helps, you can start auto-import with this:
http://localhost:52199/MCWS/v1/Control/MCC?Command=23020
That helps! Brilliant, thank you. That also tells me that the other MCC commands can be used in the same way, in case I find those useful.
For anyone interested, I used the above URL to make a one-click process to run the auto-import. This can be done with any of the other functions too, I assume.
I created a new bash script and saved it in
~/.local/bin with the name
jmc-importThat script contains the following code:
#!/bin/bash
# determine if JRiver Media Center 24 process is running and if so, run auto-import:
if pgrep -x mediacenter24 >/dev/null
then
echo
echo "***** JRiver Media Center is running *****"
# trigger JRiver Media Center auto-import and supress output by using the -s flag and sending to /dev/null
curl -s http://localhost:52199/MCWS/v1/Control/MCC?Command=23020 > /dev/null
echo
echo '***** JRiver Media Center auto-import triggered *****'
echo
else
echo
echo "***** JRiver Media Center is not running *****"
echo
# pop-up error message:
notify-send --expire-time=3000 'JRiver Media Center' 'IS NOT RUNNING'
fi
Some of that code is to make it prettier if the script is run in the command line. The pop-up notification is to notify if MC24 isn't running as the auto import won't work if so.
I then created a new desktop file
jmc-import.desktop in
~/.local/share/applications and inserted the following:
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Name=jmc-import
Exec=/home/<user>/.local/bin/jmc-import
Icon=/path/to/preferred/icon/import.png
Name[en_GB]=jmc-import
That puts a clickable desktop shortcut to trigger the script into the applications menu, which I then added to my taskbar favourites next to the MC24 icon so I can trigger the auto-import with a single mouse click.