mpc 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/mpc.rb +10 -2
  2. data/lib/mpc/version.rb +1 -1
  3. metadata +2 -2
data/lib/mpc.rb CHANGED
@@ -90,8 +90,12 @@ class Mpc
90
90
  end
91
91
 
92
92
  def current_song
93
- options = to_hash(send_command("currentsong"))
94
- Song.new(options)
93
+ song = to_hash(send_command("currentsong"))
94
+ Song.new(song)
95
+ end
96
+
97
+ def info
98
+ "State: #{status[:state]} Volume: #{volume}% Artists: #{stats[:artists]} Albums: #{stats[:albums]} Songs: #{stats[:songs]}"
95
99
  end
96
100
 
97
101
  private
@@ -147,6 +151,10 @@ class Mpc
147
151
  to_hash(send_command("status"))
148
152
  end
149
153
 
154
+ def stats
155
+ to_hash(send_command("stats"))
156
+ end
157
+
150
158
  def bool_to_int(bool)
151
159
  bool == true ? 1 : 0
152
160
  end
@@ -1,3 +1,3 @@
1
1
  class Mpc
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mpc
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.2
5
+ version: 0.9.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Micha\xC5\x82 Krzy\xC5\xBCanowski"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-04 00:00:00 +02:00
13
+ date: 2011-08-05 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency