cinera_search.js: Prevent crashes caused by |
This commit is contained in:
parent
3d7add5b66
commit
0f27c96b29
|
@ -14,7 +14,7 @@ typedef struct
|
|||
version CINERA_APP_VERSION = {
|
||||
.Major = 0,
|
||||
.Minor = 5,
|
||||
.Patch = 29
|
||||
.Patch = 30
|
||||
};
|
||||
|
||||
// TODO(matt): Copy in the DB 3 stuff from cinera_working.c
|
||||
|
|
|
@ -56,10 +56,6 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
#cineraIndex #cineraIndexEntries.sort_reverse {
|
||||
flex-flow: column-reverse;
|
||||
}
|
||||
|
||||
#cineraResults .dayContainer {
|
||||
display: flex;
|
||||
}
|
||||
|
|
|
@ -15,12 +15,12 @@ indexSort.addEventListener("click", function(ev) {
|
|||
if(indexSortChronological)
|
||||
{
|
||||
this.firstChild.nodeValue = "Sort: New to Old ⏷"
|
||||
indexEntries.classList.add("sort_reverse");
|
||||
indexEntries.style.flexFlow = "column-reverse";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.firstChild.nodeValue = "Sort: Old to New ⏶"
|
||||
indexEntries.classList.remove("sort_reverse");
|
||||
indexEntries.style.flexFlow = "column";
|
||||
}
|
||||
indexSortChronological = !indexSortChronological;
|
||||
});
|
||||
|
@ -96,7 +96,8 @@ function runSearch() {
|
|||
if (queryStr && queryStr.length > 0) {
|
||||
indexContainer.style.display = "none";
|
||||
if (episodes.length > 0) {
|
||||
var query = new RegExp(queryStr.replace("(", "\\(").replace(")", "\\)").replace(/(^|[^\\])\\$/, "$1"), "gi");
|
||||
var query = new RegExp(queryStr.replace("(", "\\(").replace(")", "\\)").replace(/\|+/, "\|").replace(/\|$/, "").replace(/(^|[^\\])\\$/, "$1"), "gi");
|
||||
console.log(query);
|
||||
for (var i = 0; i < episodes.length; ++i) {
|
||||
var episode = episodes[i];
|
||||
var matches = [];
|
||||
|
|
Binary file not shown.
|
@ -24,6 +24,10 @@ typedef struct {
|
|||
|
||||
char** annotators;
|
||||
size_t annotator_count;
|
||||
|
||||
char* template;
|
||||
char* medium;
|
||||
|
||||
} HMML_VideoMetaData;
|
||||
|
||||
typedef struct {
|
||||
|
@ -95,4 +99,10 @@ HMML_Output hmml_parse_file (FILE* file);
|
|||
void hmml_dump (HMML_Output* output);
|
||||
void hmml_free (HMML_Output* output);
|
||||
|
||||
// Version
|
||||
|
||||
extern const struct HMML_Version {
|
||||
int Major, Minor, Patch;
|
||||
} hmml_version;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue