cinera: Allow custom output paths

Relative to the Base:
    -a sets the player location
    -n sets the index location

Tweak flags, and add -B to set Base URL (necessary if setting -a or -n)

New template tags:
    __CINERA_URL__
    __CINERA_VIDEO_ID__

Bump DB version: 2
    index_header now contains the Index and Player Locations
This commit is contained in:
Matt Mascarenhas 2017-12-12 23:24:10 +00:00
parent 7312de5691
commit 0aa585a15d
2 changed files with 509 additions and 135 deletions

File diff suppressed because it is too large Load Diff

View File

@ -139,7 +139,8 @@ function renderMatches(renderStart) {
do {
var match = matches[resultsMarkerIndex];
var marker = markerPrototype.cloneNode();
marker.setAttribute("href", episode.filename.replace(/"/g, "") + "/#" + match.totalTime);
var playerURLPrefix = (baseURL ? baseURL + "/" : "") + (playerLocation ? playerLocation + "/" : "");
marker.setAttribute("href", playerURLPrefix + episode.filename.replace(/"/g, "") + "/#" + match.totalTime);
query.lastIndex = 0;
var cursor = 0;
var text = match.text;
@ -238,7 +239,9 @@ xhr.addEventListener("load", function() {
xhr.addEventListener("error", function() {
console.error("Failed to load content");
});
xhr.open("GET", projectID + ".index");
var indexLocation = (baseURL ? baseURL + "/" : "") + projectID + ".index";
xhr.open("GET", indexLocation);
xhr.setRequestHeader("Content-Type", "text/plain");
xhr.send();