I was having issues with MC remembering some library changes after stopping the program with systemd, such as the recent commands list, playlist deletions, profiles, settings, etc (likely anything committed on program exit). I found that shutting down MC using File>Exit or the window manager buttons wouldn't trigger this issue and narrowed it down to the MC process getting killed by systemd using SIGTERM (I also tried SIGHUP as well as various other KillMode= and KillSignal= settings to no avail).
Currently I'm working around this by calling MCC_EXIT in the ExecStop= directive and setting KillMode=none to disable systemd from issuing any kill signals and instead relying on the MCC command to cleanly shut down MC:
[Unit]
Description=JRiver Media Center 31
After=graphical.target
[Service]
Type=simple
Environment=DISPLAY=:0
Environment=XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.HW2B51
ExecStart=/usr/bin/mediacenter31
ExecStop=/usr/bin/mc31 /MCC 20007
KillMode=none
Restart=always
RestartSec=10
TimeoutStopSec=30
[Install]
WantedBy=graphical.target
This works swimmingly (my library changes are retained after program restart) but setting KillMode=none and relying solely on ExecStop= is strongly recommended against by the docs (since systemd can't know for sure that the process has exited--what if the stub is missing or fails?). If/when possible, it's better to have the program respond to SIGTERM properly with a clean shutdown. Also, I vaguely recall a discussion on this years ago but can't seem to locate it now, so perhaps there's some other reason that MC is treating SIGTERM more like a SIGKILL/SIGHUP?