kagu 3.0.3 → 3.0.4
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 +4 -6
- 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: c72ac237dffdb85e14dd0bb2264b10f2e34bff3c709576f8341e340641030655
|
4
|
+
data.tar.gz: d198038482460222f3cc92e5996a47748d94c3f97aba6d4465aaf7bad20f4556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02f2ae6d970dcdb39b3302f8feef95f534b45164edea028fbde2d3086acf936cc0598b72addbd58d9b9e62485433588d9051af03b24caeecd2b0ec49cf8571ad
|
7
|
+
data.tar.gz: '099947a2d0c575e5afa0aa0ced54a4dfaa874f73f19b77b1e927527ee9a4fb43eadd8c0e45fed3d34d45fb4da10c7e029e3d12f99f1e6b26b83b6c185fb91fee'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.4
|
data/lib/kagu/playlist.rb
CHANGED
@@ -30,14 +30,12 @@ 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
|
-
|
34
|
-
|
35
|
-
File.open(path, 'w') do |io|
|
36
|
-
tracks.each { |track| io << "file://#{URI.escape(track.path.to_s)}\n" }
|
37
|
-
end
|
33
|
+
tracks.map(&:id).each_slice(100) do |ids|
|
34
|
+
conditions = ids.map { |id| "persistent ID is #{id.inspect}" }
|
38
35
|
AppleScript.execute(%Q{
|
39
36
|
tell application #{Kagu::OSX_APP_NAME.inspect}
|
40
|
-
|
37
|
+
set playlistToPush to user playlist #{name.inspect}
|
38
|
+
duplicate (tracks of library playlist 1 whose #{conditions.join(' or ')}) to playlistToPush
|
41
39
|
end tell
|
42
40
|
})
|
43
41
|
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.4
|
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-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|