diff -urN music/infobanshee music-1.3+listen-banshee/infobanshee --- music/infobanshee 1969-12-31 18:00:00.000000000 -0600 +++ music-1.3+listen-banshee/infobanshee 2006-09-20 15:06:08.000000000 -0500 @@ -0,0 +1,18 @@ +#Thanks to Dennis "dweazle" Krul for the bash-magic +#Based in infolisten of patux@patux.net +#Modified a little for banshee ahioros@gmail.com +BANSHEE=`ps aux | grep banshee | grep -v infobanshee | grep -v grep` +if [ -n "$BANSHEE" ] +then + STATUS=`banshee --query-status | cut -d: -f2 | cut -d' ' -f2`; + if [ "$STATUS" -ne -1 ] + then + ARTIST=`banshee --query-artist | cut -d':' -f2 | cut -d' ' -f2-` + TITLE=`banshee --query-title | cut -d':' -f2 | cut -d' ' -f2-` + echo "$ARTIST" - "$TITLE" + else + echo 0 + fi +else + echo 0 +fi diff -urN music/infolisten music-1.3+listen-banshee/infolisten --- music/infolisten 1969-12-31 18:00:00.000000000 -0600 +++ music-1.3+listen-banshee/infolisten 2006-09-20 15:05:57.000000000 -0500 @@ -0,0 +1,9 @@ +#Thanks to Dennis "dweazle" Krul for the bash-magic +#Modified a little for listen patux@patux.net +LISTEN=`ps aux | grep python | grep listen | grep -v grep` +if [ -n "$LISTEN" ] +then + listen -c +else + echo 0 +fi diff -urN music/music.tcl music-1.3+listen-banshee/music.tcl --- music/music.tcl 2005-11-25 16:46:26.000000000 -0600 +++ music-1.3+listen-banshee/music.tcl 2006-09-20 15:02:54.000000000 -0500 @@ -176,6 +176,8 @@ "XMMS" [list GetSongXMMS TreatSongXMMS] \ "Amarok" [list GetSongAmarok TreatSongAmarok] \ "Totem" [list GetSongTotem TreatSongTotem] \ + "Listen" [list GetSongListen TreatSongListen] \ + "Banshee" [list GetSongBanshee TreatSongBanshee] \ ] \ "windows nt" [list \ "WinAmp" [list GetSongWinamp TreatSongWinamp] \ @@ -473,6 +475,88 @@ } + + ############################################### + # ::music::TreatSongBanshee # + # ------------------------------------------- # + # Gets the current playing song in Banshee # + ############################################### + proc TreatSongBanshee {} { + #Grab the information asynchronously : thanks to Tjikkun + after 0 {::music::exec_async [file join $::music::musicpluginpath "infobanshee"]} + return 0 + } + + ############################################### + # ::music::GetSongBanshee # + # ------------------------------------------- # + # Gets the current playing song in Banshee # + ############################################### + proc GetSongBanshee {} { + + #actualsong is filled asynchronously in TreatSongBanshee + #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 { + + return $song + } + + } + + + + ############################################### + # ::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 + } + + ############################################### # ::music::TreatSongTotem # # ------------------------------------------- # @@ -491,7 +575,7 @@ ############################################### proc GetSongTotem {} { - #actualsong is filled asynchronously in TreatSongAmarok + #actualsong is filled asynchronously in TreatSongTotem #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 diff -urN music/readme.txt music-1.3+listen-banshee/readme.txt --- music/readme.txt 2005-10-27 14:19:23.000000000 -0500 +++ music-1.3+listen-banshee/readme.txt 2006-09-20 15:12:09.000000000 -0500 @@ -1,7 +1,7 @@ Hi and welcome in the Music plugin's readme. First of all, thank you to use this plugin and I hope it will be useful. To work with your prefered player, the plugin require some things to do. -Currently, the Music plugin supports 5 players : ITunes (Mac), WinAmp (Windows), XMMS, Amarok and Totem (Linux). +Currently, the Music plugin supports 7 players : ITunes (Mac), WinAmp (Windows), XMMS, Amarok, Totem, Listen and Banshee (Linux). ITunes : - you don't have anything to do it works immediately. Just go to the plugin's config to make Music plugin at your taste ;) Don't forget to set a nickname in the plugin config if you don't want to just have the song name as nickname. @@ -22,3 +22,9 @@ Totem : - You need to install the last version of Totem to make sure that the functionnality is installed (Thanks to Karel and the Totem team to make it for us) + +Listen: (http://listengnome.free.fr/) +- I have just tested with the listen 0.4.3-1 that I get from ubuntu dapper repositories, should work with that version and avobe + +Banshee: (http://banshee-project.org/Main_Page) +- Tested with success in ubundu dapper 6.06 and opensuse 10.1