Class: RhythmboxPlayer

Inherits:
MusicPlayer
  • Object
show all
Defined in:
lib/sonice-players/rhythmbox.rb

Instance Method Summary collapse

Instance Method Details

#current_trackObject



26
27
28
# File 'lib/sonice-players/rhythmbox.rb', line 26

def current_track
  tell_to 'print-playing'
end

#launched?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/sonice-players/rhythmbox.rb', line 30

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

#nextObject



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

def next
  tell_to 'next'
end

#playpauseObject



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

def playpause
  tell_to 'play-pause'
end

#prevObject



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

def prev
  tell_to 'previous'
end

#voldownObject



14
15
16
# File 'lib/sonice-players/rhythmbox.rb', line 14

def voldown
  tell_to 'volume-down'
end

#volumeObject



22
23
24
# File 'lib/sonice-players/rhythmbox.rb', line 22

def volume
  tell_to 'print-volume'
end

#volupObject



18
19
20
# File 'lib/sonice-players/rhythmbox.rb', line 18

def volup
  tell_to 'volume-up'
end