cinera.c: Only build search if != Single Edition

This commit is contained in:
Matt Mascarenhas 2018-01-05 20:03:02 +00:00
parent c1d6c87746
commit 7d88e3c17d
1 changed files with 12 additions and 5 deletions

View File

@ -14,7 +14,7 @@ typedef struct
version CINERA_APP_VERSION = { version CINERA_APP_VERSION = {
.Major = 0, .Major = 0,
.Minor = 5, .Minor = 5,
.Patch = 18 .Patch = 19
}; };
// TODO(matt): Copy in the DB 3 stuff from cinera_working.c // TODO(matt): Copy in the DB 3 stuff from cinera_working.c
@ -2448,9 +2448,12 @@ HMMLToBuffers(buffers *CollationBuffers, template **BespokeTemplate, char *Filen
HMML_Annotation *Anno = HMML.annotations + AnnotationIndex; HMML_Annotation *Anno = HMML.annotations + AnnotationIndex;
CopyStringToBuffer(&CollationBuffers->Search, "\"%d\": \"", TimecodeToSeconds(Anno->time)); if(Config.Edition != EDITION_SINGLE)
CopyStringToBufferJSONSafe(&CollationBuffers->Search, Anno->text); {
CopyStringToBuffer(&CollationBuffers->Search, "\"\n"); CopyStringToBuffer(&CollationBuffers->Search, "\"%d\": \"", TimecodeToSeconds(Anno->time));
CopyStringToBufferJSONSafe(&CollationBuffers->Search, Anno->text);
CopyStringToBuffer(&CollationBuffers->Search, "\"\n");
}
categories LocalTopics = { 0 }; categories LocalTopics = { 0 };
categories LocalMedia = { 0 }; categories LocalMedia = { 0 };
@ -2933,7 +2936,11 @@ AppendedIdentifier:
DeclaimBuffer(&AnnotationHeader); DeclaimBuffer(&AnnotationHeader);
DeclaimBuffer(&Annotation); DeclaimBuffer(&Annotation);
} }
CopyStringToBuffer(&CollationBuffers->Search, "---\n");
if(Config.Edition != EDITION_SINGLE)
{
CopyStringToBuffer(&CollationBuffers->Search, "---\n");
}
#if DEBUG #if DEBUG
printf("\n\n --- End of Annotations Loop ---\n\n\n\n"); printf("\n\n --- End of Annotations Loop ---\n\n\n\n");