Class: Anyplayer::Rhythmbox

Inherits:
Player
  • Object
show all
Defined in:
lib/anyplayer/players/rhythmbox.rb

Constant Summary

Constants inherited from Player

Player::DEFAULT_VOTES_TO_SKIP

Instance Method Summary collapse

Methods inherited from Player

#initialize, #name, #paused?, #platforms, #vote, #votes

Constructor Details

This class inherits a constructor from Anyplayer::Player

Instance Method Details

#albumObject



44
45
46
# File 'lib/anyplayer/players/rhythmbox.rb', line 44

def album
  rhythmbox "print-playing-format=%at"
end

#artistObject



40
41
42
# File 'lib/anyplayer/players/rhythmbox.rb', line 40

def artist
  rhythmbox "print-playing-format=%ta"
end

#launched?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/anyplayer/players/rhythmbox.rb', line 48

def launched?
  %x(rhythmbox-client --no-start --print-playing 2>/dev/null).rstrip != ""
end

#nextObject



19
20
21
22
# File 'lib/anyplayer/players/rhythmbox.rb', line 19

def next
  rhythmbox "next"
  super
end

#pauseObject



10
11
12
# File 'lib/anyplayer/players/rhythmbox.rb', line 10

def pause
  rhythmbox "pause"
end

#playObject



6
7
8
# File 'lib/anyplayer/players/rhythmbox.rb', line 6

def play
  rhythmbox "play"
end

#playpauseObject



2
3
4
# File 'lib/anyplayer/players/rhythmbox.rb', line 2

def playpause
  rhythmbox "play-pause"
end

#prevObject



14
15
16
17
# File 'lib/anyplayer/players/rhythmbox.rb', line 14

def prev
  rhythmbox "previous"
  super
end

#trackObject



36
37
38
# File 'lib/anyplayer/players/rhythmbox.rb', line 36

def track
  rhythmbox "print-playing-format=%tt"
end

#voldownObject



24
25
26
# File 'lib/anyplayer/players/rhythmbox.rb', line 24

def voldown
  rhythmbox "volume-down"
end

#volumeObject



32
33
34
# File 'lib/anyplayer/players/rhythmbox.rb', line 32

def volume
  rhythmbox "print-volume"
end

#volupObject



28
29
30
# File 'lib/anyplayer/players/rhythmbox.rb', line 28

def volup
  rhythmbox "volume-up"
end