You are not logged in.
Pages: 1
I use MPD + ncmpcpp and its really awesome. I use mpdscribble for scrobbling to last.fm and mpd-sima for adding common songs in the playlists, and other tools like mpd-add-similar look nice (adding more than one song at a time.). What i miss now is a simple last.fm love track script or something, and a script that will copy the songs from a mpd playlist to a mp3 player. Anyone mind sharing such scripts or helping me make one ? , plus if you have any idea or a nice mpd tool write it here
If it ain't broke, broke it then fix it.
Offline
I use MPD + ncmpcpp and its really awesome. I use mpdscribble for scrobbling to last.fm and mpd-sima for adding common songs in the playlists, and other tools like mpd-add-similar look nice (adding more than one song at a time.). What i miss now is a simple last.fm love track script or something, and a script that will copy the songs from a mpd playlist to a mp3 player. Anyone mind sharing such scripts or helping me make one ? , plus if you have any idea or a nice mpd tool write it here
loving a track:
http://aur.archlinux.org/packages.php?ID=41508
how I use it:
> cat love
#!/bin/bash
~/bin/lastfm-mpd-cli.py love --lastfmusername=USER --lastfmpassword=MD5SUM_OF_PASSWORD && echo "You loved `mpc current`" | dzen2 -y 1062 -p 4 -fn envy-code-r-10 -fg '#00BBFF' -bg '#080808'
just put ~/bin/love to some hotkey - voila
Last edited by Rasi (2011-01-17 22:36:45)
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
very handy tool to execute scripts/binary/whatever on certain mpd actions:
http://aur.archlinux.org/packages.php?ID=32890
how to use it:
cat .mpdcron/hooks/player
# Example player hook.
hooks/dump-status.bash
hooks/dump-song.bash
hooks/playing.sh
> cat playing.sh
echo "$MPD_SONG_TAG_ARTIST - $MPD_SONG_TAG_TITLE [#$MPD_SONG_TAG_TRACK $MPD_SONG_TAG_ALBUM]" | dzen2 -y 1062 -p 4 -fn 'envy code r-10' -fg '#00BBFF' -bg '#080808'
start mpdcron as user and now on every stop/play/pause it will show current track. i have simlar scripts for showing if i changed options like random mode etc...
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
I wanted notifications of track changes, but only when I had ncmpcpp open, so added an execute_on_song_change entry in ~/.ncmpcpp/config calling this:
#!/bin/sh
ARTIST=`mpc -f "%artist%" current | sed -e s/"&"/"&"/`
ALBUM=`mpc -f "%album%" current | sed -e s/"&"/"&"/`
TITLE=`mpc -f "%title%" current`
if [ "$ARTIST" != "" ] && [ "$ALBUM" != "" ]
then
LINETWO="
<b>"$ARTIST"
"$ALBUM"</b>"
elif [ "$ARTIST" != "" ] && [ "$ALBUM" == "" ]
then
LINETWO="<b>"$ARTIST"</b>"
elif [ "$ARTIST" == "" ] && [ "$ALBUM" != "" ]
then
LINETWO="<b>"$ALBUM"</b>"
else
LINETWO=""
fi
notify-send "$TITLE" "$LINETWO" -u low -t 3000 -h int:x:875 -h int:y:25 -i /usr/share/icons/elementary/emblems/48/emblem-sound.svg -h string:synchronous:mpd
It's ugly coding, I know, but it gets things how I want them in terms of layout, creating three lines (title/artist/album) when necessary within the two 'lines' as notify-send sees them. The sed commands deal with a problem with ampersands in the second entry of the notify-send signal, which may deserve a bug report there or elsewhere, if I pin down the issue. Screenshot.
Edit: removing a superfluououos necessary...
Last edited by owain (2011-01-18 01:59:06)
Offline
Another version of the "notify on track change" script:
#!/bin/bash
# vim:set filetype=sh: *
setsid /usr/bin/mpc idleloop player |\
while read ; do
currtrack="$(/usr/bin/mpc -f '%file%' current)"
if [[ "$currtrack" != "$prevtrack" ]] ; then
/usr/bin/mpc -f '%title%' current |\
/usr/bin/osd_cat -p bottom -f 10x20 -c white -s 1
[[ $? -ne 0 ]] && exit 2
prevtrack="$currtrack"
fi
done &
Offline
Maki wrote:I use MPD + ncmpcpp and its really awesome. I use mpdscribble for scrobbling to last.fm and mpd-sima for adding common songs in the playlists, and other tools like mpd-add-similar look nice (adding more than one song at a time.). What i miss now is a simple last.fm love track script or something, and a script that will copy the songs from a mpd playlist to a mp3 player. Anyone mind sharing such scripts or helping me make one ? , plus if you have any idea or a nice mpd tool write it here
loving a track:
http://aur.archlinux.org/packages.php?ID=41508how I use it:
> cat love #!/bin/bash ~/bin/lastfm-mpd-cli.py love --lastfmusername=USER --lastfmpassword=MD5SUM_OF_PASSWORD && echo "You loved `mpc current`" | dzen2 -y 1062 -p 4 -fn envy-code-r-10 -fg '#00BBFF' -bg '#080808'
just put ~/bin/love to some hotkey - voila
thanks alot , it works as a charm.
If it ain't broke, broke it then fix it.
Offline
A great guy over at #archlinux has created this script for copying stuff to mp3/folder
http://paste.pocoo.org/raw/322532/
All thanks goes to e36freak
If it ain't broke, broke it then fix it.
Offline
Pages: 1