Commit 0aa585a1 authored by Matt Mascarenhas's avatar Matt Mascarenhas

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
parent 7312de56
This diff is collapsed.
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment