summaryrefslogtreecommitdiffstats
path: root/libhb/scan.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-11-06 10:48:26 -0800
committerGitHub <[email protected]>2017-11-06 10:48:26 -0800
commit8a68af4675fd90f58ab0b8a191345847bff94cea (patch)
tree5f473c29873fe702e9d2177903557cbd6acb79c3 /libhb/scan.c
parentd438e35c7edf9a94cddb7853fe68a50207d1027d (diff)
CLI: add option to log version, title, and progress in json
This is useful for scripts and other frontends that need to parse CLI output.
Diffstat (limited to 'libhb/scan.c')
-rw-r--r--libhb/scan.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index b096c4e4c..56ca56c90 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -1293,19 +1293,23 @@ static void LookForAudio(hb_scan_t *scan, hb_title_t * title, hb_buffer_t * b)
sprintf(audio->config.lang.description, "%s (%s)",
audio->config.lang.simple, codec_name);
- switch (audio->config.lang.type)
+ if (audio->config.lang.attributes & HB_AUDIO_ATTR_VISUALLY_IMPAIRED)
{
- case 2:
- strcat(audio->config.lang.description, " (Visually Impaired)");
- break;
- case 3:
- strcat(audio->config.lang.description, " (Director's Commentary 1)");
- break;
- case 4:
- strcat(audio->config.lang.description, " (Director's Commentary 2)");
- break;
- default:
- break;
+ strncat(audio->config.lang.description, " (Visually Impaired)",
+ sizeof(audio->config.lang.description) -
+ strlen(audio->config.lang.description) - 1);
+ }
+ if (audio->config.lang.attributes & HB_AUDIO_ATTR_COMMENTARY)
+ {
+ strncat(audio->config.lang.description, " (Director's Commentary 1)",
+ sizeof(audio->config.lang.description) -
+ strlen(audio->config.lang.description) - 1);
+ }
+ if (audio->config.lang.attributes & HB_AUDIO_ATTR_ALT_COMMENTARY)
+ {
+ strncat(audio->config.lang.description, " (Director's Commentary 2)",
+ sizeof(audio->config.lang.description) -
+ strlen(audio->config.lang.description) - 1);
}
if (audio->config.in.channel_layout)