Class: Anyplayer::Amarok
- Inherits:
-
Player
- Object
- Player
- Anyplayer::Amarok
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
Instance Method Details
#album ⇒ Object
44
45
46
|
# File 'lib/anyplayer/players/amarok.rb', line 44
def album
amarok_get_meta "album"
end
|
#artist ⇒ Object
40
41
42
|
# File 'lib/anyplayer/players/amarok.rb', line 40
def artist
amarok_get_meta "artist"
end
|
#launched? ⇒ 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
|
#next ⇒ Object
19
20
21
22
|
# File 'lib/anyplayer/players/amarok.rb', line 19
def next
amarok "Next"
super
end
|
#pause ⇒ Object
10
11
12
|
# File 'lib/anyplayer/players/amarok.rb', line 10
def pause
amarok "Pause"
end
|
54
55
56
|
# File 'lib/anyplayer/players/amarok.rb', line 54
def platforms
[:unix, :linux]
end
|
#play ⇒ Object
6
7
8
|
# File 'lib/anyplayer/players/amarok.rb', line 6
def play
amarok "Play"
end
|
#playpause ⇒ Object
2
3
4
|
# File 'lib/anyplayer/players/amarok.rb', line 2
def playpause
amarok "PlayPause"
end
|
#prev ⇒ Object
14
15
16
17
|
# File 'lib/anyplayer/players/amarok.rb', line 14
def prev
amarok "Prev"
super
end
|
#track ⇒ Object
36
37
38
|
# File 'lib/anyplayer/players/amarok.rb', line 36
def track
amarok_get_meta "title"
end
|
#voldown ⇒ Object
24
25
26
|
# File 'lib/anyplayer/players/amarok.rb', line 24
def voldown
amarok "VolumeDown 5"
end
|
#volume ⇒ Object
32
33
34
|
# File 'lib/anyplayer/players/amarok.rb', line 32
def volume
amarok "VolumeGet"
end
|
#volup ⇒ Object
28
29
30
|
# File 'lib/anyplayer/players/amarok.rb', line 28
def volup
amarok "VolumeUp 5"
end
|