dubbletrack_remote 0.7.6 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/.tool-versions +1 -1
- data/CHANGELOG.md +20 -0
- data/config/settings-example.yml +1 -1
- data/dubbletrack_remote.gemspec +1 -1
- data/lib/dubbletrack_remote/cli.rb +4 -6
- data/lib/dubbletrack_remote/client.rb +3 -4
- data/lib/dubbletrack_remote/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bab3eb59f38391bededa96b0a8fcec79ed55ef13ce2b4b86d73d1e95f4a9b48
|
4
|
+
data.tar.gz: 335bfcb6b730533b350c1d9abcc16765989bd94bb6a7f3846acc8035b247517d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b58c6025392b9441dc15dcd4e1b5067ec91e0d02217beef87a0490556e782dd9bfd28975443391541914aaa2ec9286532333ffaed939428460d32b800181776e
|
7
|
+
data.tar.gz: 3457d8f677d12b05a643886c3ad7a0f87de1da6560077004c33fa850be1bc9dd80c8ed426d95181287bf6f40bb57ff0bee09429c7764b87b4e89d92a43419ec8
|
data/.github/workflows/ruby.yml
CHANGED
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby
|
1
|
+
ruby 3.1.2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
dubbletrack remote changelog
|
2
2
|
|
3
|
+
## [0.8.1](https://github.com/dubbletrack/remote/compare/v0.8.0...v0.8.1) (2024-07-10)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* fix to_a bug ([322df50](https://github.com/dubbletrack/remote/commit/322df50c3c197087425aad60cd886cdd162f458a))
|
9
|
+
|
10
|
+
# [0.8.0](https://github.com/dubbletrack/remote/compare/v0.7.6...v0.8.0) (2024-07-10)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* use delay time for test ([37d3fb6](https://github.com/dubbletrack/remote/commit/37d3fb669929800277e39942f565cf1f14075854))
|
16
|
+
|
17
|
+
|
18
|
+
### Features
|
19
|
+
|
20
|
+
* send in batches ([be99f11](https://github.com/dubbletrack/remote/commit/be99f11d13b377b1e4f751b65c9fd42c766b3217))
|
21
|
+
* update to use v2 endpoint and save uuids ([51e0e6f](https://github.com/dubbletrack/remote/commit/51e0e6f4c2208d5281feb0b8f5281924bac78e39))
|
22
|
+
|
3
23
|
## [0.7.6](https://github.com/dubbletrack/remote/compare/v0.7.5...v0.7.6) (2023-06-15)
|
4
24
|
|
5
25
|
|
data/config/settings-example.yml
CHANGED
data/dubbletrack_remote.gemspec
CHANGED
@@ -55,7 +55,7 @@ Gem::Specification.new do |spec|
|
|
55
55
|
spec.add_dependency "require_all", "~> 3.0"
|
56
56
|
spec.add_dependency "rspec", "~> 3.9.0"
|
57
57
|
spec.add_dependency "sinatra-activerecord", "~> 2.0.18"
|
58
|
-
spec.add_dependency "sqlite3", "~> 1.
|
58
|
+
spec.add_dependency "sqlite3", "~> 1.5.1"
|
59
59
|
spec.add_dependency "thor", "~> 1.0.1"
|
60
60
|
spec.add_dependency "timecop", "~> 0.9.1"
|
61
61
|
spec.add_dependency "tzinfo", "~> 1.2.9"
|
@@ -23,9 +23,7 @@ module DubbletrackRemote
|
|
23
23
|
|
24
24
|
Thread.new do
|
25
25
|
loop do
|
26
|
-
Item.next(
|
27
|
-
client.send([item])
|
28
|
-
end
|
26
|
+
client.send(Item.next(25).to_a)
|
29
27
|
update # this feels redundant with the watch above
|
30
28
|
status
|
31
29
|
rescue => e
|
@@ -86,8 +84,8 @@ module DubbletrackRemote
|
|
86
84
|
|
87
85
|
if remaining.count > 0
|
88
86
|
puts "sending #{remaining.size} from playlist #{file_path}"
|
89
|
-
Item.where(id: remaining.pluck(:id)).remaining.
|
90
|
-
client.send(
|
87
|
+
items = Item.where(id: remaining.pluck(:id)).remaining.find_in_batches(batch_size: 25) do |items|
|
88
|
+
client.send(items.to_a)
|
91
89
|
end
|
92
90
|
end
|
93
91
|
else
|
@@ -328,7 +326,7 @@ module DubbletrackRemote
|
|
328
326
|
playlists_path = ask "Where should I look for playlists? (This can include regex and strftime components, i.e. /Enco/Dad/STUDIO[1-2]%m%d%y.DBF)", path: true
|
329
327
|
end
|
330
328
|
<<~YAMS.strip
|
331
|
-
api_url: https://api.dubbletrack.com/api/
|
329
|
+
api_url: https://api.dubbletrack.com/api/v2/automation
|
332
330
|
api_key: #{api_key}
|
333
331
|
api_secret: #{api_secret}
|
334
332
|
automation:
|
@@ -13,7 +13,7 @@ module DubbletrackRemote
|
|
13
13
|
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
|
14
14
|
end
|
15
15
|
|
16
|
-
@url = url # || 'https://dubbletrack.com/api/
|
16
|
+
@url = url # || 'https://api.dubbletrack.com/api/v2/automation'
|
17
17
|
@key = key # || 'dt_xxxxxxxx'
|
18
18
|
@secret = secret # || 'dts_xxxxxxxxxxxx'
|
19
19
|
end
|
@@ -49,13 +49,12 @@ module DubbletrackRemote
|
|
49
49
|
|
50
50
|
found_response = if data.size > 1
|
51
51
|
data.find do |d|
|
52
|
-
d["
|
53
|
-
d["attributes"]["artist_name"] == item.artist_name
|
52
|
+
d["remote_automation_id"] == item.automation_id
|
54
53
|
end
|
55
54
|
else
|
56
55
|
data.first
|
57
56
|
end
|
58
|
-
item.remote_id = found_response["
|
57
|
+
item.remote_id = found_response["uuid"] if found_response
|
59
58
|
item.save
|
60
59
|
puts item.pretty_print
|
61
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dubbletrack_remote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Keen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -282,14 +282,14 @@ dependencies:
|
|
282
282
|
requirements:
|
283
283
|
- - "~>"
|
284
284
|
- !ruby/object:Gem::Version
|
285
|
-
version: 1.
|
285
|
+
version: 1.5.1
|
286
286
|
type: :runtime
|
287
287
|
prerelease: false
|
288
288
|
version_requirements: !ruby/object:Gem::Requirement
|
289
289
|
requirements:
|
290
290
|
- - "~>"
|
291
291
|
- !ruby/object:Gem::Version
|
292
|
-
version: 1.
|
292
|
+
version: 1.5.1
|
293
293
|
- !ruby/object:Gem::Dependency
|
294
294
|
name: thor
|
295
295
|
requirement: !ruby/object:Gem::Requirement
|