Class: Anyplayer::Amarok

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

Constant Summary

Constants inherited from Player

Player::DEFAULT_VOTES_TO_SKIP

Instance Method Summary collapse

Methods inherited from Player

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

Constructor Details

This class inherits a constructor from Anyplayer::Player

Instance Method Details

#albumObject



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

def album
  amarok_get_meta 'album'
end

#artistObject



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

def artist
  amarok_get_meta 'artist'
end

#launched?Boolean

Returns:

  • (Boolean)


48
49
50
51
52
# File 'lib/anyplayer/players/amarok.rb', line 48

def launched?
  not %x(qdbus org.kde.amarok 2>&1).match(
    /does not exist|not found|cannot find the path specified/
  )
end

#nextObject



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

def next
  amarok 'Next'
  super
end

#pauseObject



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

def pause
  amarok 'Pause'
end

#platformsObject



54
55
56
# File 'lib/anyplayer/players/amarok.rb', line 54

def platforms
  [:unix, :linux]
end

#playObject



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

def play
  amarok 'Play'
end

#playpauseObject



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

def playpause
  amarok 'PlayPause'
end

#prevObject



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

def prev
  amarok 'Prev'
  super
end

#trackObject



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

def track
  amarok_get_meta 'title'
end

#voldownObject



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

def voldown
  amarok 'VolumeDown 5'
end

#volumeObject



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

def volume
  amarok 'VolumeGet'
end

#volupObject



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

def volup
  amarok 'VolumeUp 5'
end