File tree 2 files changed +16
-3
lines changed
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 38
38
# 2024-06-18 - Moonbase59 - v4.0.3 - Changed overlay_longtail from -15 to -12,
39
39
# most people seem to want transitions a bit tighter
40
40
# 2024-07-01 - Moonbase59 - v4.0.4 - Sync with cue_file version
41
+ # 2024-07-01 - Moonbase59 - v5.0.0-dev - New JSON API
41
42
42
43
# Lots of debugging output for AzuraCast in this, will be removed eventually.
43
44
@@ -51,7 +52,7 @@ let settings.autocue.cue_file.version =
51
52
settings.make(
52
53
description=
53
54
"Software version of autocue.cue_file. Should coincide with `cue_file`.",
54
- "4 .0.4 "
55
+ "5 .0.0-dev "
55
56
)
56
57
57
58
# Internal only! Not a user setting.
Original file line number Diff line number Diff line change 63
63
# errors when piping something to cue_file
64
64
# - streamline tag conversion code a little
65
65
# - only write known tags, not all `liq_*`
66
+ # 2024-07-01 Moonbase59 - v5.0.0-dev
67
+ # - New more compatible JSON output
66
68
#
67
69
# Originally based on an idea and some code by John Warburton (@Warblefly):
68
70
# https://github.com/Warblefly/TrackBoundaries
69
71
# Some collaborative work with RM-FM (@RM-FM): Sustained ending analysis.
70
72
71
73
__author__ = 'Matthias C. Hormann'
72
- __version__ = '4 .0.4 '
74
+ __version__ = '5 .0.0-dev '
73
75
74
76
import os
75
77
import sys
@@ -1254,5 +1256,15 @@ liq_result = {
1254
1256
}
1255
1257
1256
1258
# output compact (one line) JSON, for use in Liquidsoap "autocue:" protocol
1257
- json_output = json .dumps (liq_result )
1259
+ method = "tags" if skip_analysis else "full"
1260
+ method = "forced" if args .force else method
1261
+
1262
+ json_output = json .dumps (
1263
+ {
1264
+ "apiVersion" : __version__ ,
1265
+ "id" : args .file ,
1266
+ "method" : method ,
1267
+ "data" : liq_result
1268
+ }
1269
+ )
1258
1270
print (json_output )
You can’t perform that action at this time.
0 commit comments