summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandomEngy <[email protected]>2019-12-22 20:50:06 -0800
committerJohn Stebbins <[email protected]>2020-06-17 08:30:46 -0700
commitf04e441f7553e980e4f4144e8f94080c370f3164 (patch)
tree191eaa942a8b5af8046ed535a6f60e17a0f900a4
parentd3eb4a11acec05314e45d4b78e6c0fb7c38a6fcd (diff)
Added track number to audio and subtitle scan JSON
Technically not needed, but makes working with the objects easier. As long as you have the object, you have the track number needed to put it into the output.
-rw-r--r--libhb/hb_json.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libhb/hb_json.c b/libhb/hb_json.c
index 3b481b406..e834d06a0 100644
--- a/libhb/hb_json.c
+++ b/libhb/hb_json.c
@@ -391,7 +391,8 @@ static hb_dict_t* hb_title_to_dict_internal( hb_title_t *title )
attributes = hb_audio_attributes_to_dict(audio->config.lang.attributes);
audio_dict = json_pack_ex(&error, 0,
- "{s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o}",
+ "{s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o}",
+ "TrackNumber", hb_value_int(ii + 1),
"Description", hb_value_string(audio->config.lang.description),
"Language", hb_value_string(audio->config.lang.simple),
"LanguageCode", hb_value_string(audio->config.lang.iso639_2),
@@ -429,7 +430,8 @@ static hb_dict_t* hb_title_to_dict_internal( hb_title_t *title )
format = subtitle->format == PICTURESUB ? "bitmap" : "text";
attributes = hb_subtitle_attributes_to_dict(subtitle->attributes);
subtitle_dict = json_pack_ex(&error, 0,
- "{s:o, s:o, s:o, s:o, s:o, s:o}",
+ "{s:o, s:o, s:o, s:o, s:o, s:o, s:o}",
+ "TrackNumber", hb_value_int(ii + 1),
"Format", hb_value_string(format),
"Source", hb_value_int(subtitle->source),
"SourceName", hb_value_string(hb_subsource_name(subtitle->source)),