~ubuntu-branches/ubuntu/saucy/cairo-dock-plug-ins/saucy

« back to all changes in this revision

Viewing changes to xmms/data/infobanshee.sh

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-08-26 21:07:39 UTC
  • Revision ID: james.westby@ubuntu.com-20090826210739-gyjuuqezrzuluao4
Tags: upstream-2.0.8.1
Import upstream version 2.0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# Banshee Emulated pipe
 
3
# Pipe created by ChAnGFu
 
4
 
 
5
 
 
6
STATUS=$(banshee --query-status)
 
7
STATUS=${STATUS#*:}
 
8
 
 
9
if [  "$STATUS" -eq "-1" ]; then
 
10
  exit
 
11
fi
 
12
 
 
13
TITLE=$(banshee --query-title)
 
14
ARTIST=$(banshee --query-artist)
 
15
GTITLE="${ARTIST#*:} -${TITLE#*:}"
 
16
TTIMESEC=$(banshee --query-duration)
 
17
TTIMESEC=${TTIMESEC#*:}
 
18
POSITIONSEC=$(banshee --query-position)
 
19
POSITIONSEC=${POSITIONSEC#*:}
 
20
 
 
21
M=$(($TTIMESEC/60))
 
22
S=$(($TTIMESEC%60))
 
23
TTIME="$M:$S"
 
24
 
 
25
M=$(($POSITIONSEC/60))
 
26
S=$(($POSITIONSEC%60))
 
27
ETIME="$M:$S"
 
28
 
 
29
#Status du player
 
30
if [  "$STATUS" -eq "1" ]; then
 
31
  echo "status: Playing"
 
32
elif [  "$STATUS" -eq "0" ]; then
 
33
  echo "status: Paused"
 
34
fi
 
35
#Position du morceaux
 
36
echo "trackInPlaylist: N/A"
 
37
#Position actuelle en secondes
 
38
echo "uSecPosition: $POSITIONSEC"
 
39
#Temps écoulé
 
40
#echo "timeElapsed $ETIME"
 
41
echo ""
 
42
#Temps total en secondes
 
43
echo "totalTimeInSec $TTIMESEC"
 
44
#Temps total du son
 
45
#echo "totalTime: $TTIME"
 
46
echo ""
 
47
#Titre du son
 
48
echo "nowTitle: $GTITLE"