hi all... i found in the forum this thread http://amsn.sourceforge.net/forums/viewtopic.php?t=1565&highlight=music+plugin+listen .

The code was for an old version of music plugin (1.3) so i rearranged it for the latest version (1.5). I have only added te code for listen because banshee is already supported in the new version.
I have attached the .diff file of music.tcl and the script

I have also attached a .tar.gz of the two files (i don't actually know if i did the diff file in the right way)

Hope it helps... and sorry for my bad english!
216a217
> 			"Listen" [list GetSongListen TreatSongListen] \
737c738,784
< 	
---
> 
> 	###############################################
> 	# ::music::TreatSongListen                    #
> 	# ------------------------------------------- #
> 	# Gets the current playing song in Listen     #
> 	###############################################
> 	proc TreatSongListen {} {
> 		#Grab the information asynchronously : thanks to Tjikkun
> 		after 0 {::music::exec_async [file join $::music::musicpluginpath "infolisten"]}
> 		return 0
> 	}
> 
> 	###############################################
> 	# ::music::GetSongListen                      #
> 	# ------------------------------------------- #
> 	# Gets the current playing song in Listen     #
> 	###############################################
> 	proc GetSongListen {} {
> 
> 		#actualsong is filled asynchronously in TreatSongListen
> 		#Split the lines into a list and set the variables as appropriate
> 		if { [catch {split $::music::actualsong "\n"} song] } {
> 			#actualsong isn't yet defined by asynchronous exec
> 			return 0
> 		}
> 
> 
> 
> 		if {$song == "0"} {
> 			return 0
> 		} else {
> 			#Define in witch order we want to show the song (from the config)
> 			#Use the separator(from the cong) betwen song and artist
> #			if {$::music::config(songart) == 1} {
> #				append songart $song " " $::music::config(separator) " " $art
> #			} elseif {$::music::config(songart) == 2} {
> #				append songart $art " " $::music::config(separator) " " $song
> #			}
> #			lappend return $songart
> #			lappend return [urldecode [string range $path 5 end]]
> 			return $song
> 		}
> #		return $return
> 	}
> 
> 
> 

Attachment: music.tar.gz
Description: application/gzip

#!/bin/sh
#Thanks to Dennis "dweazle" Krul for the bash-magic
#Modified a little for listen [EMAIL PROTECTED]
LISTEN=`ps aux | grep python | grep listen | grep -v grep`
if [ -n "$LISTEN" ] 
then 
        listen -c 
else 
        echo 0 
fi 
exit 0
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to