LOLastfm 0.0.3 → 0.0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/LOLastfm-send +2 -2
- data/lib/LOLastfm/checkers/moc.rb +12 -0
- data/lib/LOLastfm/version.rb +1 -1
- metadata +2 -2
data/bin/LOLastfm-send
CHANGED
@@ -79,9 +79,9 @@ else
|
|
79
79
|
if options[:now_playing]
|
80
80
|
client.send_command :now_playing, options[:song]
|
81
81
|
elsif options[:love]
|
82
|
-
client.send_command :love, options[:song].empty? ? (options[:current] ? :current : nil) : options[:song]
|
82
|
+
client.send_command :love, (options[:song].empty? ? (options[:current] ? :current : nil) : options[:song])
|
83
83
|
elsif options[:unlove]
|
84
|
-
client.send_command :unlove, options[:song].empty? ? (options[:current] ? :current : nil) : options[:song]
|
84
|
+
client.send_command :unlove, (options[:song].empty? ? (options[:current] ? :current : nil) : options[:song])
|
85
85
|
else
|
86
86
|
client.send_command :listened, options[:song]
|
87
87
|
end
|
@@ -43,6 +43,8 @@ LOLastfm.define_checker :moc do
|
|
43
43
|
create = proc {
|
44
44
|
unless moc = Moc::Controller.new(settings[:socket]) rescue false
|
45
45
|
set_timeout settings[:every], &create unless stopped?
|
46
|
+
|
47
|
+
next
|
46
48
|
end
|
47
49
|
|
48
50
|
Thread.new {
|
@@ -88,6 +90,16 @@ LOLastfm.define_checker :moc do
|
|
88
90
|
$stderr.puts e.backtrace
|
89
91
|
end
|
90
92
|
|
93
|
+
if song.stream?
|
94
|
+
listened song
|
95
|
+
else
|
96
|
+
if LOLastfm::Song.is_scrobblable?(position, song.length)
|
97
|
+
listened song
|
98
|
+
else
|
99
|
+
stopped_playing!
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
91
103
|
set_timeout settings[:every], &create unless stopped?
|
92
104
|
}
|
93
105
|
}
|
data/lib/LOLastfm/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: LOLastfm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.3
|
4
|
+
version: 0.0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: lastfm
|