FStreamStatus |
|
Submitted By Mike Timm (mtimmsj) |
DescriptionThe idea for this xtra comes from biglittledragoon in the Adium forum.This xtra can be used to show the currently playing song and artist or radio station or URL in FStream depending on what information is available from the stream. More info on FStream can be found here: http://www.sourcemac.com/?page=fstream There are two ways to run this script - If you use: %_fstream The script will return 'Listening to "song" by artist' or if both the song and the artist are blank it will fall back to showing the webradio or if the webradio is blank it will fall back to showing the URL. If use: %_cfstream {Some string with tags} The parameter passed in will be passed through a simple tag conversion scheme and a string matching the required format will be returned. This is useful for radio stations that do not add proper artist and song information to a stream, you can have the xtra return something that makes more sense for that radio station. Current tags supported are:
When one of these tags is encountered in the parameter it is converted to the value included in the stream, or if no value is set in the stream it is converted to a default value. Some examples: %_cfstream {Listening to "%SONG%" by %ARTIST} This is the same format as you would get if you just used %_fstream %_cfstream {Listening to %WEBRADIO%} This will display just the webradio station that is being listened to. Changes2.0Added %_cfstream {param} option. 1.0 Introduced the xtra with the %_fstream option. CommentsYou can reply to individual comments by clicking the "Reply" link next to each. # by ericgus on 05/02/09 at 22:45:25Hi.. and thanks for making this script.. been looking for something like this for a while .. {being somewhat new to apple programming I am still learning and found this code nice and easy to understand} one thing I noticed was your code had a minor bug, It would fire off FStream is if it wasn't running when the "tell application" ran.. So I patched the code with this snipit to check if FStream was infact running before trying to get the current song name/artist before setting the status in adium:
tell application "System Events" set isRunning to ((application processes whose (name is equal to "FStream")) count) end tell if isRunning is equal to 0 then set MyStatusStr to "FStream is not running.. " return MyStatusStr end if Post a New CommentYou must be logged in to post comments. |
# by biglittledragoon on 11/08/08 at 07:37:09
- I like it;
- you credited me! :P