Is there a way to programmatically get the full path of the currently played track in rhythmbox (or even any music player on linux)? It could be a linux command or in python.
I need this to sort my new music albums with shortcuts (i.e., delete or archive the currently played file until the new music folder is empty). I was doing it with amarok but with the new version my plugins do not work anymore and there is no documentation yet.
It can be done with mplayer:
Details:
lsof -c mplayer: list all the files currently used by mplayer;grep -E '\.m4a|\.mp3|\.flac|\.mp4|\.wav|\.wma|\.aac': only keep the lines with audio files (there may be a more elegant way to do that...);sed "s+.*\(/home/$USER.*\)+\1+g": remove the line prefix (to adapt if your music files are not in /home/$USER).