diff options
Diffstat (limited to 'web/poc_jsonrpc/videofiles.html')
-rw-r--r-- | web/poc_jsonrpc/videofiles.html | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/web/poc_jsonrpc/videofiles.html b/web/poc_jsonrpc/videofiles.html deleted file mode 100644 index 6f89de3e6f..0000000000 --- a/web/poc_jsonrpc/videofiles.html +++ /dev/null @@ -1,107 +0,0 @@ -<html> -<head> -<title>XBMC - Video files</title> -<link type="text/css" rel="stylesheet" href="basic.css"> -<script type="text/javascript" src="json.js"></script> -<script type="text/javascript" src="help.js"></script> -<script type="text/javascript"> -function PlayMovie(movieid) -{ - alert("Not implemented"); -} -</script> -</head> -<body> -<table class="Navigation"> -<tr class="primary"> - <td class="unselected"><a href="nowplaying.html">Now playing</a></td> - <td class="selected">Videos</td> - <td class="unselected"><a href="artists.html">Music</a></td> - <td class="unselected"><a href="development.html">Development</a></td> -</tr> -<tr> - <td></td><td> - <table> - <tr class="secondary"> - <td>Video files</td> - <td><a href="movies.html">Movies</a></td> - <td><a href="tvshows.html">TV Shows</a></td> - </tr> - </table></td> -</tr> -</table> -<br> - -<script type="text/javascript"> -String.prototype.endsWith = function(str) -{return (this.match(str+"$")==str)} - -var directory = gup("directory"); - -var http_request = new XMLHttpRequest(); -http_request.open( "POST", "/jsonrpc", false ); - -if (directory) - http_request.send('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": { "media": "video", "directory": "' + unescape(directory) + '", "sort": { "method": "label", "order": "ascending" } }, "id": 1}'); -else - http_request.send('{"jsonrpc": "2.0", "method": "Files.GetSources", "params": { "media": "video" }, "id": 1}'); - - -var the_object = JSON.parse(http_request.responseText); -var result = the_object["result"]; -if (result) { - var directories; - var files; - - if (directory) { - directories = result["directories"]; - files = result["files"]; - } else { - directories = result["shares"]; - } - - document.write('<table class="Files">'); - - var even = 0; - - for (var i in directories) { - var item = directories[i]; - - document.write('<tr class="' + (even % 2 == 0 ? "even" : "odd") + '"><td class="cover">'); - even += 1; - - document.write('<a href="videofiles.html?directory=' + escape(item["file"]) + '">'); - var imgSrc = item["thumbnail"] ? ('/vfs/' + escape(item["thumbnail"])) : "images/DefaultFolder.png"; - document.write('<img src="' + imgSrc + '" class="smallcover" alt="' + item["label"] + '"></img></a>'); - - document.write('</td><td class="info">'); - - document.write('<a href="videofiles.html?directory=' + Url.encode(item["file"]) + '">'); - document.write(item["label"] + "</a>"); - - document.write('</td></tr>'); - } - - for (var i in files) { - var item = files[i]; - - document.write('<tr class="' + (even % 2 == 0 ? "even" : "odd") + '"><td class="cover">'); - even += 1; - - var imgSrc = item["thumbnail"] ? ('/vfs/' + escape(item["thumbnail"])) : "images/DefaultVideo.png"; - document.write('<img src="' + imgSrc + '" class="smallcover" alt="' + item["label"] + '"></img>'); - - document.write('</td><td class="info">'); - - document.write(item["label"]); - - document.write('</td></tr>'); - } - - document.write('</tbody></table>'); -} else { - document.write("Error"); -} -</script> -</body> -</html> |