dubbletrack_remote 0.7.3 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/dubbletrack_remote/item.rb +3 -3
- data/lib/dubbletrack_remote/reader/dbf.rb +15 -6
- data/lib/dubbletrack_remote/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da200a7c41fdf5c680e89a74a2424717f90789e950177a60e9d089ef9f072167
|
4
|
+
data.tar.gz: c80f31216df67ae33bc569d85d5ea0c64d75b8ad991393b27aed227b067a251f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47302702a8666b9d6e340937288c5b3016ca045f6ea59797cfdd01ba660256aa8293e32f25fa6dac65e9a7f1b52b58dbaa80cb06d2340f4ecee563855b08bafc
|
7
|
+
data.tar.gz: 7fda2dc35136f7d907821f18a63236bee17f7b92f0e5b958d45e6314bbaffce03bc5ea07f2aa6676e017508e3417e8a307564512dcac6468019f39ecb97238a3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
dubbletrack remote changelog
|
2
2
|
|
3
|
+
## [0.7.5](https://github.com/dubbletrack/remote/compare/v0.7.4...v0.7.5) (2023-06-15)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* only ingest cuts that have a guid ([798906a](https://github.com/dubbletrack/remote/commit/798906a184665c0c9d273da1e625fc4a56d8a7ed))
|
9
|
+
|
10
|
+
## [0.7.4](https://github.com/dubbletrack/remote/compare/v0.7.3...v0.7.4) (2023-06-15)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* better handle when there is an invalid scheduled time in the schedule ([8e3464d](https://github.com/dubbletrack/remote/commit/8e3464dfd3446268725b1b3ccd89467c7003a656))
|
16
|
+
|
3
17
|
## [0.7.3](https://github.com/dubbletrack/remote/compare/v0.7.2...v0.7.3) (2023-06-15)
|
4
18
|
|
5
19
|
## [0.7.2](https://github.com/dubbletrack/remote/compare/v0.7.1...v0.7.2) (2023-06-15)
|
@@ -59,14 +59,14 @@ module DubbletrackRemote
|
|
59
59
|
else
|
60
60
|
"[ ] "
|
61
61
|
end
|
62
|
-
duration_s = duration ? " [#{duration}s]" : ""
|
62
|
+
duration_s = duration ? " [#{duration}s]" : "[DURATION MISSING]"
|
63
63
|
if track?
|
64
|
-
line = "
|
64
|
+
line = "#{state}#{id}:#{played_at.utc.iso8601}".ljust(30) + " " + "#{title} - #{artist_name}" "\r\n" +
|
65
65
|
" ".ljust(32) + "#{release_name} // #{label_name} \r\n" +
|
66
66
|
" ".ljust(32) + "#{genre}, #{duration_s}, #{automation_group}, #{automation_id}" + "\r\n" +
|
67
67
|
(last_error_code ? "".ljust(30) + "[#{last_error_code}] #{last_error_text}" : "") + "\r\n"
|
68
68
|
elsif traffic?
|
69
|
-
line = "
|
69
|
+
line = "#{state}#{id}:#{played_at.utc.iso8601}".ljust(30) + " " + title.to_s + "\r\n" +
|
70
70
|
"#{genre}, #{duration_s}, #{automation_group}, #{automation_id}" + "\r\n" +
|
71
71
|
(last_error_code ? "".ljust(30) + "[#{last_error_code}] #{last_error_text}" : "") + "\r\n"
|
72
72
|
else
|
@@ -24,7 +24,7 @@ module DubbletrackRemote
|
|
24
24
|
rescue => e
|
25
25
|
puts e.inspect
|
26
26
|
puts "date = #{date}, time = #{time}"
|
27
|
-
|
27
|
+
raise e
|
28
28
|
end
|
29
29
|
|
30
30
|
def rows
|
@@ -43,6 +43,8 @@ module DubbletrackRemote
|
|
43
43
|
attrs[key] = attrs[key].mb_chars.tidy_bytes.to_s
|
44
44
|
end
|
45
45
|
|
46
|
+
debugger unless attrs["LENGTH"]
|
47
|
+
|
46
48
|
attrs
|
47
49
|
end
|
48
50
|
|
@@ -51,7 +53,7 @@ module DubbletrackRemote
|
|
51
53
|
ids = @db.entries.pluck("CUT")
|
52
54
|
|
53
55
|
@cuts.each do |entry|
|
54
|
-
if entry && ids.include?(entry.cut)
|
56
|
+
if entry && ids.include?(entry.cut) && entry.guid.present?
|
55
57
|
hash[entry.cut] = entry.attributes
|
56
58
|
end
|
57
59
|
end
|
@@ -83,14 +85,21 @@ module DubbletrackRemote
|
|
83
85
|
label = (hash["PRODUCER"] || "").strip
|
84
86
|
date = (hash["DATE"] || "").strip
|
85
87
|
time = (hash["ACTSTART"] || "").strip
|
86
|
-
|
88
|
+
|
89
|
+
debugger if hash["TITLE"] == "PSA CSA Juneteenth 23"
|
90
|
+
duration = (hash["LENGTH"] || "0.0").to_f
|
87
91
|
automation_id = (hash["CUT"] || "").strip
|
88
92
|
automation_group = (hash["GROUP"] || "").strip
|
89
93
|
genre = (hash["GENRE"] || "").strip
|
90
94
|
guid = (hash["GUID"] || "").strip
|
91
95
|
played_at = timestamp(date, time)
|
92
|
-
|
93
|
-
|
96
|
+
|
97
|
+
begin
|
98
|
+
intended_played_at_time = (hash["SCHSTART"] || "").strip
|
99
|
+
intended_played_at = timestamp(date, intended_played_at_time) if intended_played_at_time
|
100
|
+
rescue => e
|
101
|
+
puts e.inspect
|
102
|
+
end
|
94
103
|
|
95
104
|
unless played_at.respond_to?(:dst?)
|
96
105
|
puts "played_at is not a time: #{played_at.inspect} for #{hash.inspect}"
|
@@ -121,7 +130,7 @@ module DubbletrackRemote
|
|
121
130
|
item.source = File.basename(@file_path)
|
122
131
|
item.guid = guid
|
123
132
|
|
124
|
-
if played_at.dst? != intended_played_at.dst? && intended_played_at.to_i > played_at.to_i
|
133
|
+
if played_at.is_a?(Time) && intended_played_at.is_a?(Time) && played_at.dst? != intended_played_at.dst? && intended_played_at.to_i > played_at.to_i
|
125
134
|
# This compensates and sends correct time during the hour where DST changes and the hour is repeated
|
126
135
|
difference = intended_played_at.hour - played_at.hour
|
127
136
|
played_at = played_at + difference.hours
|