[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 76462] New: wishlist: support for user-specified scripts on
From: Justin Mason <jm-kde () jmason ! org>
Date: 2004-02-29 22:58:09
Message-ID: 20040229225809.20782.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=76462
Summary: wishlist: support for user-specified scripts on song-
change event
Product: juk
Version: unspecified
Platform: Debian testing
OS/Version: Linux
Status: UNCONFIRMED
Severity: wishlist
Priority: NOR
Component: general
AssignedTo: wheeler kde org
ReportedBy: jm-kde jmason org
Version: (using KDE KDE 3.2.0)
Installed from: Debian testing/unstable Packages
OS: Linux
Me again. Another wishlist item, this time from xmms: support for song-change \
events.
Xmms has a nifty plugin called "song-change". When a song is changed (e.g. start \
playing from Stop, or one track ends and the next one in the playlist starts), it \
will expand a user-specified command-line with a couple of %-escapes, and run it.
It's kind of cool for hooking all sorts of rubbish into the player, without causing \
too much overhead in the player code ;) . By just expanding a command line and \
running it, that's a very small amount of overhead in code terms -- and works pretty \
well in terms of speed overhead, too, since a song-change event doesn't happen that \
frequently.
Security-wise, it'd probably be best to remove all newline, ' and " chars -- or \
instead just take a CGI-type approach and pass the metadata to the script in \
predefined environment variables like "$JUK_SONG_ARTIST" etc.
For example, my .xmms/config has:
enabled_gplugins=libsong_change.so
[song_change]
cmd_line=xmms-song-change.sh "%s"
cmd_line_end=
and that script does:
#!/bin/sh
if [ "$*" = "`cat ~/.xmms.cur`" ] ; then
exit 0
fi
echo "$*" > ~/.xmms.cur
echo "$*" >> ~/.xmms.log
#echo "Song: $*" | set-osd
pretty simple -- logs all songs played into ~/.xmms.log and sets the \
on-screen-display (or at least it did before I turned that off). Then I have another \
shell script which takes ~/.xmms.log and generates a HTML snippet for inclusion on my \
weblog's front page, hacky hack ;)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic