More > JRiver Media Center 21 for Linux

Feature request for MC 21 for Linux

(1/2) > >>

geier22:
My wishes for a better view of the web radio will probably never considered. I had often wished but never even get an answer. OK- then I use other programs for the web radio, which can represent this better.
Another request is the better integration of MC in Linux.
Nearly all media player are able to send the currently playing song to the notifications. MC does not do that. I am not a programmer, but I think the interface is the same for the notifications in all desktop environments. It would be nice if this would be realized in MC 21.

I'm MC users since MC 8. Unfortunately, it is so that I use MC only for managing my music collection. For all other things - manage movies - listen to web radio - there are better programs - even in Linux. Instead, a lot of energy is invested in all kinds of servers and streaming solutions and porting to ARM machines. Sorry, but I must not necessarily walk with earbuds in the ear through the streets and listen to my music on the home server. I think that's perverse. It may be that the majority of users want these features - I do not need most of it.

mwillems:

--- Quote from: geier22 on August 09, 2015, 12:30:34 am ---My wishes for a better view of the web radio will probably never considered. I had often wished but never even get an answer. OK- then I use other programs for the web radio, which can represent this better.
Another request is the better integration of MC in Linux.
Nearly all media player are able to send the currently playing song to the notifications. MC does not do that. I am not a programmer, but I think the interface is the same for the notifications in all desktop environments. It would be nice if this would be realized in MC 21.

--- End quote ---

I'm not sure that the notification system is the same in all DEs, but I agree it would be nice to take advantage of that kind of OS integration.

In the meanwhile, you can do something similar with conky, see: http://yabb.jriver.com/interact/index.php?topic=98285.0

I've been using it for a while now and it works pretty well.  I can always see what's playing on the desktop background, and it's easily customizable as to what kind of info you display, etc.

geier22:

--- Quote from: mwillems on August 09, 2015, 09:52:58 am ---I'm not sure that the notification system is the same in all DEs, but I agree it would be nice to take advantage of that kind of OS integration.
--- End quote ---

I found this:http://ubuntuforums.org/showthread.php?t=1411620

I testet in KDE and Cinnamon:

--- Code: ---hans@enp2so:~$ notify-send "Message Title" "Hallo mwillems this is the Song MC is playin now:Listening to: 'Why Does Love (Have To Go Wrong)' from 'Around The Next Dream' by 'BBM (Bruce, Baker and Moore)' with JRiver Media Center 20" -i /usr/share/pixmaps/idle.xpm -t 5000
hans@enp2so:~$
--- End code ---

mwillems:

--- Quote from: geier22 on August 09, 2015, 01:11:14 pm ---I found this:http://ubuntuforums.org/showthread.php?t=1411620

I testet in KDE and Cinnamon:

--- Code: ---hans@enp2so:~$ notify-send "Message Title" "Hallo mwillems this is the Song MC is playin now:Listening to: 'Why Does Love (Have To Go Wrong)' from 'Around The Next Dream' by 'BBM (Bruce, Baker and Moore)' with JRiver Media Center 20" -i /usr/share/pixmaps/idle.xpm -t 5000
hans@enp2so:~$
--- End code ---


--- End quote ---

My point was that not all DE's support libnotify (at least not natively). Gnome, KDE, and Cinnamon do.  XFCE, LXDE, and several others lack native support.  See https://wiki.archlinux.org/index.php/Desktop_notifications.

You can get them working in most DE's with external plugins, but even then there's a few (like LXDE) that don't support them.

If you just want libnotify notifications, you could probably pretty easily script notifications yourself using MC's MCWS framework.  You could run a script that queries .MCWS at intervals, does a comparison, and then issues a notification on track change.  A lot of the architecture you'd need is already in the backend for my conky scripts linked above. 

mwillems:
Just to show that this can be user implemented relatively easily, here's a bash script that submits a libnotify notification on track change.  It runs every two seconds, and shows the Artist,  Album, and Track title.  With a little more work, you might even be able to get it to show the album art, but that looked like a bit more work than I felt like doing for a proof of concept.  It will run until you kill it, so is suitable to launch with your DE's startup.  It's not perfect; it performs some very basic data validation, but folks could easily make it more robust and/or add more functionality.  

The script assumes the MC instnace you want to monitor is running locally and that the server is available on the default port; you need to have enabled media network for it to work (I'm pretty sure the web interface depends on it). I tested on Gnome and Cinnamon, and it ran nicely.

I call the script "MC_Notifier".  It's provided as is, with no warranty whatsoever, etc., etc.  Hope this helps:


--- Code: ---#!/bin/bash

mkdir -p ~/.MC_Notifier
touch ~/.MC_Notifier/Filekey.Current

while true; do
wget -q localhost\:52199/MCWS/v1/Playback/Info\?Zone\=\-1 -O ~/.MC_Notifier/Info
mv ~/.MC_Notifier/Filekey.Current ~/.MC_Notifier/Filekey.Old
sed -n 's:.*<Item Name="FileKey">\(.*\)</Item>.*:\1:p' ~/.MC_Notifier/Info > ~/.MC_Notifier/Filekey.Current
diff ~/.MC_Notifier/Filekey.Current ~/.MC_Notifier/Filekey.Old > /dev/null
if [[ $? -ne 0 ]]; then
       sed -- 's/\&amp;/\&/g' ~/.MC_Notifier/Info > ~/.MC_Notifier/Info2
   mv ~/.MC_Notifier/Info2 ~/.MC_Notifier/Info
ALBUM=$(sed -n 's:.*<Item Name="Album">\(.*\)</Item>.*:\1:p' ~/.MC_Notifier/Info)
ARTIST=$(sed -n 's:.*<Item Name="Artist">\(.*\)</Item>.*:\1:p' ~/.MC_Notifier/Info)
TRACK=$(sed -n 's:.*<Item Name="Name">\(.*\)</Item>.*:\1:p' ~/.MC_Notifier/Info)
notify-send -t 2000 "$ALBUM" "$ARTIST - $TRACK"
fi
sleep 2
done

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version