Skip to content

Commit 4cb2c75

Browse files
committed
Undo Merge branch 'v5.0.0-dev' into master
1 parent 2561bc5 commit 4cb2c75

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

autocue.cue_file.liq

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
# 2024-06-18 - Moonbase59 - v4.0.3 - Changed overlay_longtail from -15 to -12,
3939
# most people seem to want transitions a bit tighter
4040
# 2024-07-01 - Moonbase59 - v4.0.4 - Sync with cue_file version
41+
# 2024-07-01 - Moonbase59 - v5.0.0-dev - New JSON API
4142

4243
# Lots of debugging output for AzuraCast in this, will be removed eventually.
4344

@@ -51,7 +52,7 @@ let settings.autocue.cue_file.version =
5152
settings.make(
5253
description=
5354
"Software version of autocue.cue_file. Should coincide with `cue_file`.",
54-
"4.0.4"
55+
"5.0.0-dev"
5556
)
5657

5758
# Internal only! Not a user setting.

cue_file

+14-2
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@
6363
# errors when piping something to cue_file
6464
# - streamline tag conversion code a little
6565
# - only write known tags, not all `liq_*`
66+
# 2024-07-01 Moonbase59 - v5.0.0-dev
67+
# - New more compatible JSON output
6668
#
6769
# Originally based on an idea and some code by John Warburton (@Warblefly):
6870
# https://github.com/Warblefly/TrackBoundaries
6971
# Some collaborative work with RM-FM (@RM-FM): Sustained ending analysis.
7072

7173
__author__ = 'Matthias C. Hormann'
72-
__version__ = '4.0.4'
74+
__version__ = '5.0.0-dev'
7375

7476
import os
7577
import sys
@@ -1254,5 +1256,15 @@ liq_result = {
12541256
}
12551257

12561258
# 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+
)
12581270
print(json_output)

0 commit comments

Comments
 (0)