kagu 3.0.4 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/kagu/playlist.rb +5 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c72ac237dffdb85e14dd0bb2264b10f2e34bff3c709576f8341e340641030655
4
- data.tar.gz: d198038482460222f3cc92e5996a47748d94c3f97aba6d4465aaf7bad20f4556
3
+ metadata.gz: f42802bc51d1c4527070117392111e06dc86a5a076abdafbb323a57b81d3e4e0
4
+ data.tar.gz: 7f095724080e80aa06d323bfdfc6ad7bb562e3f671ce14c26d8e985bd64c888f
5
5
  SHA512:
6
- metadata.gz: 02f2ae6d970dcdb39b3302f8feef95f534b45164edea028fbde2d3086acf936cc0598b72addbd58d9b9e62485433588d9051af03b24caeecd2b0ec49cf8571ad
7
- data.tar.gz: '099947a2d0c575e5afa0aa0ced54a4dfaa874f73f19b77b1e927527ee9a4fb43eadd8c0e45fed3d34d45fb4da10c7e029e3d12f99f1e6b26b83b6c185fb91fee'
6
+ metadata.gz: 2f64f022b5b4562ab006346d4171c363b5c84c0494d8f4002cf2ff222d8e4526f7f30de48de5087a7eabc96db84760997ae33c446c84e3f5fea7d2d26729790a
7
+ data.tar.gz: 3c44ac6690a8ea947b0a2a77c76167fd1e0200a64ffc28850c22d85fa33ff85b0388127ebda179304ef3da8d76f97edcbf281fd4fcd9c92566c3e69f9d4da436
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.4
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(100) do |ids|
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
- duplicate (tracks of library playlist 1 whose #{conditions.join(' or ')}) to playlistToPush
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
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-05 00:00:00.000000000 Z
11
+ date: 2019-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport