You are not logged in.
Mpdcron is a little utility that can execute user defined commands on certain mpd actions. It also acts as a last.fm scrobbler and a statistics database.
See post below for more detailed infos.
AUR package:
http://aur.archlinux.org/packages.php?ID=32890
It includes a README, a mpdcron.example and some example scripts which can be found in /usr/share/doc/mpdcron
See the scripts in action (used as an OSD):
http://karif.server-speed.net/~carnager/mpdcron_new.ogv
Last edited by Rasi (2010-01-05 10:55:42)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
mpdcron got a huge update. Its more a general mpd daemon now.
It can still execute any command on all sorts of actions. (with very fine-grained control over actions monitored)
In addition it has the following new features:
[Scrobbler]
It can act as a last.fm scrobbler (libre.fm too) using 1.2 protocol and support for mpds crossfading and repeating songs.
[Statistics database]
Supports loving, killing, rating and tagging songs, artists, albums and genres.
Tracks play count of songs, artist, albums and genres.
Implements a simple server protocol for remote clients to receive data
Import data from last.fm
[Notify-send]
Uses notify-send to send notifications.
Can detect repeated songs.
The new maintainer is alip in #mpd on freenode and the new homepage is http://alip.github.com/
Last edited by Rasi (2010-01-05 10:48:14)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Sounds nice, building it right now :-)
Offline
Looks interesting, I have been looking for something which will update coverart on the desktop on song changes and not poll all the time to know when the song changes. I've quickly looked through the documentation I am not sure whether a configuration can be setup to update a single fixed file with the coverart image for use in conky on song changes? Can mpdcron handle this sort of thing do you know guys?
I am at work right now, when I get home I'll have a play
Maybe a new feature needs adding to provide desktop art support, much like what I have seen available for Rhythmbox via plugins in the past...wouldn't be too far removed from the notification functionality I guess
Last edited by kaivalagi (2010-01-05 13:09:12)
Offline
Looks interesting, I have been looking for something which will update coverart on the desktop on song changes and not poll all the time to know when the song changes. I've quickly looked through the documentation I am not sure whether a configuration can be setup to update a single fixed file with the coverart image for use in conky on song changes? Can mpdcron handle this sort of thing do you know guys?
I am at work right now, when I get home I'll have a play
Maybe a new feature needs adding to provide desktop art support, much like what I have seen available for Rhythmbox via plugins in the past...wouldn't be too far removed from the notification functionality I guess
Not sure if i understand you correctly. You want one file (an image) that dynamically gets overwritten on song change? there are scripts that will fetch the cover from some online source, you could tell mpdcron to run that script and show the cover afterwards with dzen2, notify-send or whatever.
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
kaivalagi wrote:Looks interesting, I have been looking for something which will update coverart on the desktop on song changes and not poll all the time to know when the song changes. I've quickly looked through the documentation I am not sure whether a configuration can be setup to update a single fixed file with the coverart image for use in conky on song changes? Can mpdcron handle this sort of thing do you know guys?
I am at work right now, when I get home I'll have a play
Maybe a new feature needs adding to provide desktop art support, much like what I have seen available for Rhythmbox via plugins in the past...wouldn't be too far removed from the notification functionality I guess
Not sure if i understand you correctly. You want one file (an image) that dynamically gets overwritten on song change? there are scripts that will fetch the cover from some online source, you could tell mpdcron to run that script and show the cover afterwards with dzen2, notify-send or whatever.
That's what I meant
I have mpdcron setup now scrobbling to last.fm for now, I'll do some reading on how to trigger a script call on a particular event
Nifty MPD app for sure, I was surprised how easy it is to add your own custom modules looking at the example C, I might have to look at creating something to do what I want in C code (script first though - I want cover art support soon(ish)
Thanks
Edit: I've setup a "player" hook to call a shell script which copies the coverart if found to a specific file name, this will sort me out for now...thanks again. There doesn't seem to be any requirement to write a C module for anything using hooks! Can use python scripts instead, far simpler
Last edited by kaivalagi (2010-01-05 21:13:54)
Offline
Hi Guys,
Anyone had this issue before? I am running a couple of scripts off the player hook and they are executing as expected. However both these scripts sole purpose is to provide lyrics and coverart in a default location to be picked up, the files are created but are missing any rights at all.
Here's my lyrics.sh script which is pointed to by the player hook:
#!/usr/bin/env sh
# get lyrics (if found) and copy it to /tmp/lyrics
lyricsfile="$HOME/.lyrics/$MPD_SONG_TAG_ARTIST-$MPD_SONG_TAG_TITLE.txt"
outputlyricsfile="/tmp/lyrics.txt"
if [ -f "$lyricsfile" ]; then
rm -f "$outputlyricsfile"
echo "lyrics.sh - Copying cover file '$lyricsfile' to /tmp/lyrics"
cp "$lyricsfile" "$outputlyricsfile"
echo "chown mark:users \"$outputlyricsfile\""
chown mark:users "$outputlyricsfile"
echo "chmod +rwx \"$outputlyricsfile\""
chmod +rwx "$outputlyricsfile"
fi
The resultant output from listing the file is as follows:
---------- 1 mark users 641 Jan 13 18:34 /tmp/lyrics.txt
Note the solid dashes, there are no read, write or wexecute rights associated, so nothing can read it
If you look in the script above I have tried to remedy it using chmod +rwx but it doesn't work
Any ideas? I assumed that mpdcron ran as the current user, especially considering it is started for me when I login (startup apps), so this shouldn't happen right?
EDIT: Didn't get to the bottom of the problem but found a work around, sym linked the files rather than copying them
Last edited by kaivalagi (2010-01-14 17:30:06)
Offline
I'm having a problem with the stats module of mpdcron; would anyone kind enough care to take a look?
Last edited by gladstone (2010-04-28 12:56:52)
Offline
@gladstone, just add "require 'date'"
Offline
mpdcron does not start as a daemon, it gives me
Daemon returned 2 as return value
Also with
$ homescrape hariskar
nothing happens. Any idea?
Thank you
Last edited by hariskar (2015-03-20 04:59:02)
Offline