kagu 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/kagu/playlist.rb +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f42802bc51d1c4527070117392111e06dc86a5a076abdafbb323a57b81d3e4e0
|
4
|
+
data.tar.gz: 7f095724080e80aa06d323bfdfc6ad7bb562e3f671ce14c26d8e985bd64c888f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f64f022b5b4562ab006346d4171c363b5c84c0494d8f4002cf2ff222d8e4526f7f30de48de5087a7eabc96db84760997ae33c446c84e3f5fea7d2d26729790a
|
7
|
+
data.tar.gz: 3c44ac6690a8ea947b0a2a77c76167fd1e0200a64ffc28850c22d85fa33ff85b0388127ebda179304ef3da8d76f97edcbf281fd4fcd9c92566c3e69f9d4da436
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.5
|
data/lib/kagu/playlist.rb
CHANGED
@@ -30,12 +30,14 @@ module Kagu
|
|
30
30
|
def add_tracks
|
31
31
|
return if tracks.empty?
|
32
32
|
Kagu.logger.info('Kagu') { "Adding #{tracks.size} track(s) to playlist #{name.inspect}" }
|
33
|
-
tracks.map(&:id).each_slice(
|
34
|
-
conditions = ids.map { |id| "persistent ID is #{id.inspect}" }
|
33
|
+
tracks.map(&:id).each_slice(500) do |ids|
|
35
34
|
AppleScript.execute(%Q{
|
36
35
|
tell application #{Kagu::OSX_APP_NAME.inspect}
|
37
36
|
set playlistToPush to user playlist #{name.inspect}
|
38
|
-
|
37
|
+
set idsToAdd to {#{ids.join(',')}}
|
38
|
+
repeat with idToAdd in idsToAdd
|
39
|
+
duplicate (tracks of library playlist 1 whose persistent ID is idToAdd) to playlistToPush
|
40
|
+
end repeat
|
39
41
|
end tell
|
40
42
|
})
|
41
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kagu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexis Toulotte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|