kagu 0.4.5 → 0.4.6
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 +11 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e72459fb8b2155a8648292713869ec81035bbae3
|
4
|
+
data.tar.gz: 535005114a5406af37e19bb0cd57965934148b33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92d42997513966eb67d979f4b005406f0dd48ecb3933ead9ee0f55e3a933eec1a40e9b46b8051ab846669db12cc7ae43c00baeb8a592f497420d92e29e6acfc6
|
7
|
+
data.tar.gz: 5ae20b503952c9ff4ce2924c2c0172584efacd416a584059380ad77d84089b690b8c45f16db80afb3adce98dd0d690230c3146243eed59b32eeda886ec2edb9b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.6
|
data/lib/kagu/playlist.rb
CHANGED
@@ -28,16 +28,17 @@ module Kagu
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def add_tracks
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
31
|
+
tracks.map(&:id).each_slice(500) do |ids|
|
32
|
+
AppleScript.execute(%Q{
|
33
|
+
tell application "iTunes"
|
34
|
+
set playlistToPush to user playlist #{name.inspect}
|
35
|
+
set idsToAdd to {#{ids.join(',')}}
|
36
|
+
repeat with idToAdd in idsToAdd
|
37
|
+
duplicate (tracks of library playlist 1 whose database ID is idToAdd) to playlistToPush
|
38
|
+
end repeat
|
39
|
+
end tell
|
40
|
+
})
|
41
|
+
end
|
41
42
|
true
|
42
43
|
rescue => e
|
43
44
|
raise Error.new(e)
|
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: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexis Toulotte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|