Major cleanup, added all old files (python2) to 'old_v0.1' folder

This commit is contained in:
2017-02-08 20:03:36 +01:00
parent 94e5389e44
commit c17ab40f6a
1507 changed files with 0 additions and 9841 deletions

58
html/images/image_nf.svg Normal file
View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 60 60" style="enable-background:new 0 0 60 60;" xml:space="preserve">
<g>
<g>
<g>
<rect x="1" y="4.5" style="fill:#ECF0F1;" width="55" height="42"/>
<path style="fill:#545E73;" d="M57,47.5H0v-44h57V47.5z M2,45.5h53v-40H2V45.5z"/>
</g>
<g>
<rect x="5" y="8.5" style="fill:#545E73;" width="47" height="34"/>
<path style="fill:#ECF0F1;" d="M53,43.5H4v-36h49V43.5z M6,41.5h45v-32H6V41.5z"/>
</g>
<circle style="fill:#F3D55A;" cx="15" cy="17.069" r="4.569"/>
<polygon style="fill:#11A085;" points="51,32.611 50,31.5 38,20.5 27.5,32 32.983,37.483 37,41.5 51,41.5 "/>
<polygon style="fill:#26B999;" points="6,41.5 37,41.5 32.983,37.483 22.017,26.517 6,40.5 "/>
</g>
<g>
<circle style="fill:#ED7161;" cx="48" cy="44.5" r="12"/>
<path style="fill:#FFFFFF;" d="M49.414,44.5l3.536-3.536c0.391-0.391,0.391-1.023,0-1.414s-1.023-0.391-1.414,0L48,43.086
l-3.536-3.536c-0.391-0.391-1.023-0.391-1.414,0s-0.391,1.023,0,1.414l3.536,3.536l-3.536,3.536c-0.391,0.391-0.391,1.023,0,1.414
c0.195,0.195,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293L48,45.914l3.536,3.536c0.195,0.195,0.451,0.293,0.707,0.293
s0.512-0.098,0.707-0.293c0.391-0.391,0.391-1.023,0-1.414L49.414,44.5z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

57
html/js/searchBar.js Normal file
View File

@@ -0,0 +1,57 @@
var button = document.getElementById("btnSearch");
button.onclick = function () {
var text = document.getElementById("link_id").value;
console.log(text);
queryTMDB(text);
}
function queryTMDB(query) {
var data = "{}";
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
var display = document.getElementById("display");
var jsonObj = JSON.parse(this.responseText);
console.log(jsonObj.movies);
Object.keys(jsonObj.movies).forEach(function(key) {
var id = jsonObj.movies[key].id;
var title = jsonObj.movies[key].title;
var posterURL = jsonObj.movies[key].poster_path;
if (posterURL != null)
var poster_path = "http://image.tmdb.org/t/p/w500"+jsonObj.movies[key].poster_path;
else
var poster_path = "images/image_nf.svg";
var node = document.createElement("li"); // Create a <li> node
var imageNode = document.createElement('img');
var textNode = document.createTextNode(title); // Create a text node
var buttonNode = document.createElement("span");
var button2Node = document.createElement("span");
buttonNode.innerHTML = '<button onclick="request('+ id +')">REQUEST</button>';
button2Node.innerHTML = '<button onclick="request('+ id +')">FORCE REQUEST</button>';
imageNode.src = poster_path;
imageNode.style.width = "500px";
node.appendChild(textNode); // Append the text to <li>
node.appendChild(imageNode);
node.appendChild(buttonNode);
node.appendChild(button2Node);
display.appendChild(node);
});
}
});
xhr.open("GET", "http://localhost:63590/api/v1/plex/request?query="+query);
console.log(data);
xhr.send(data);
}

14
html/searchDisplay.html Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>tmdb.org Search Displayer</title>
</head>
<body>
<input type='text' id='link_id'>
<input type='button' id='btnSearch' value='Search' onClick="search(this)"'>
<p id="display"></p>
</body>
<script type="text/javascript" src="js/searchBar.js"></script>
</html>