aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/poc_jsonrpc/albums.html12
-rw-r--r--web/poc_jsonrpc/artists.html26
-rw-r--r--web/poc_jsonrpc/development.html18
-rw-r--r--web/poc_jsonrpc/movies.html29
-rw-r--r--web/poc_jsonrpc/musicfiles.html24
-rw-r--r--web/poc_jsonrpc/nowplaying.html38
-rw-r--r--web/poc_jsonrpc/tvshowepisodes.html29
-rw-r--r--web/poc_jsonrpc/tvshows.html11
-rw-r--r--web/poc_jsonrpc/tvshowseasons.html20
-rw-r--r--web/poc_jsonrpc/videofiles.html22
10 files changed, 123 insertions, 106 deletions
diff --git a/web/poc_jsonrpc/albums.html b/web/poc_jsonrpc/albums.html
index f49fcfdcc6..67b3d276f0 100644
--- a/web/poc_jsonrpc/albums.html
+++ b/web/poc_jsonrpc/albums.html
@@ -7,7 +7,7 @@
function CallPlay(album) {
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
- http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"AudioPlaylist.Play\", \"params\": { \"albumid\": " + album + " }, \"id\": 1}");
+ http_request.send('{"jsonrpc": "2.0", "method": "XBMC.Play", "params": { "albumid": ' + album + ' }, "id": 1}');
}
</script>
</head>
@@ -35,19 +35,19 @@ function CallPlay(album) {
<script type="text/javascript">
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
-http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"MusicLibrary.GetAlbums\", \"id\": 1}");
+http_request.send('{"jsonrpc": "2.0", "method": "MusicLibrary.GetAlbums", "id": 1}');
var the_object = JSON.parse(http_request.responseText);
var result = the_object["result"];
var array = result["albums"];
for (var property in array) {
var item = array[property];
- document.write("<a href=\"nowplaying.html\" onclick=CallPlay(" + item["albumid"] + ")>");
+ document.write('<a href="nowplaying.html" onclick=CallPlay(' + item["albumid"] + ')>');
if (item["thumbnail"])
- document.write("<img src=thumb/" + item["thumbnail"] + ".jpg width=100 alt=\"" + item["album"] + "\"></img>");
+ document.write('<img src="thumb/' + item["thumbnail"] + '.jpg" width=100 alt="' + item["album"] + '"></img>');
else
- document.write("<img src=images/DefaultAlbumCover.png width=100 alt=\"" + item["album"] + "\"></img>");
- document.write("</a>");
+ document.write('<img src="images/DefaultAlbumCover.png" width=100 alt="' + item["album"] + '"></img>');
+ document.write('</a>');
}
</script>
diff --git a/web/poc_jsonrpc/artists.html b/web/poc_jsonrpc/artists.html
index 86daed3f30..bc962ae61c 100644
--- a/web/poc_jsonrpc/artists.html
+++ b/web/poc_jsonrpc/artists.html
@@ -7,15 +7,15 @@
function CallPlay(album) {
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
- http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"AudioPlaylist.Play\", \"params\": { \"albumid\": " + album + " }, \"id\": 1}");
+ http_request.send('{"jsonrpc": "2.0", "method": "XBMC.Play", "params": { "albumid": ' + album + ' }, "id": 1}');
}
-function writeArtist( artist ) {
- document.write("<h2>" + artist["label"] + "</h2>");
+function writeArtist(artist) {
+ document.write('<h2>' + artist["label"] + '</h2>');
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
- http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"MusicLibrary.GetAlbums\", \"params\": { \"artistid\": " + artist["artistid"] + " }, \"id\": 1}");
+ http_request.send('{"jsonrpc": "2.0", "method": "MusicLibrary.GetAlbums", "params": { "artistid": ' + artist["artistid"] + ' }, "id": 1}');
var the_object = JSON.parse(http_request.responseText);
var result = the_object["result"];
@@ -23,12 +23,12 @@ function writeArtist( artist ) {
for (var property in array) {
var item = array[property];
- document.write("<a href=\"nowplaying.html\" onclick=CallPlay(" + item["albumid"] + ")>");
+ document.write('<a href="nowplaying.html" onclick=CallPlay(' + item["albumid"] + ')>');
if (item["thumbnail"])
- document.write("<img src=\"thumb/" + item["thumbnail"] + ".jpg\" class=\"cover\" alt=\"" + item["label"] + "\"></img>");
+ document.write('<img src="thumb/' + item["thumbnail"] + '.jpg" class="cover" alt="' + item["label"] + '"></img>');
else
- document.write("<img src=\"images/DefaultAlbumCover.png\" class=\"cover\" alt=\"" + item["label"] + "\"></img>");
- document.write("</a>");
+ document.write('<img src="images/DefaultAlbumCover.png" class="cover" alt="' + item["label"] + '"></img>');
+ document.write('</a>');
}
}
</script>
@@ -57,23 +57,23 @@ function writeArtist( artist ) {
<script type="text/javascript">
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
-http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"MusicLibrary.GetArtists\", \"id\": 1}");
+http_request.send('{"jsonrpc": "2.0", "method": "MusicLibrary.GetArtists", "id": 1}');
var the_object = JSON.parse(http_request.responseText);
var result = the_object["result"];
var array = result["artists"];
-document.write("<table>");
+document.write('<table>');
for (var property in array) {
- document.write("<tr class=\"" + (property % 2 == 0 ? "even" : "odd") + "\"><td>");
+ document.write('<tr class="' + (property % 2 == 0 ? "even" : "odd") + '"><td>');
var item = array[property];
writeArtist(item);
- document.write("</td></tr>");
+ document.write('</td></tr>');
}
-document.write("</table>");
+document.write('</table>');
</script>
</body>
</html>
diff --git a/web/poc_jsonrpc/development.html b/web/poc_jsonrpc/development.html
index 7e6f4175c1..59105288b5 100644
--- a/web/poc_jsonrpc/development.html
+++ b/web/poc_jsonrpc/development.html
@@ -18,23 +18,23 @@
<script type="text/javascript">
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
-http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"JSONRPC.Introspect\", \"id\": 1}");
+http_request.send('{"jsonrpc": "2.0", "method": "JSONRPC.Introspect", "id": 1}');
var the_object = JSON.parse(http_request.responseText);
var result = the_object["result"];
var commands = result["commands"];
-document.write("<table class=\"Introspect\"><thead><tr><th>Command</th><th>Executable</th><th>Permission</th><th>Description</th></tr></thead><tbody>");
+document.write('<table class="Introspect"><thead><tr><th>Command</th><th>Executable</th><th>Permission</th><th>Description</th></tr></thead><tbody>');
for (var property in commands) {
var item = commands[property];
- document.write("<tr class=\"" + (property % 2 == 0 ? "even" : "odd") + "\">");
- document.write("<td class=\"command\">" + item["command"] + "</td>");
- document.write("<td class=\"executable\">" + item["executable"] + "</td>");
- document.write("<td class=\"permission\">" + item["permission"] + "</td>");
- document.write("<td class=\"description\">" + item["description"] + "</td>");
- document.write("</tr>");
+ document.write('<tr class="' + (property % 2 == 0 ? "even" : "odd") + '">');
+ document.write('<td class="command">' + item["command"] + '</td>');
+ document.write('<td class="executable">' + item["executable"] + '</td>');
+ document.write('<td class="permission">' + item["permission"] + '</td>');
+ document.write('<td class="description">' + item["description"] + '</td>');
+ document.write('</tr>');
}
-document.write("</tbody></table>");
+document.write('</tbody></table>');
</script>
</body>
</html>
diff --git a/web/poc_jsonrpc/movies.html b/web/poc_jsonrpc/movies.html
index 31b6078c70..afa59ad240 100644
--- a/web/poc_jsonrpc/movies.html
+++ b/web/poc_jsonrpc/movies.html
@@ -4,9 +4,10 @@
<link type="text/css" rel="stylesheet" href="basic.css" />
<script type="text/javascript" src="json.js" />
<script type="text/javascript">
-function PlayMovie(movieid)
-{
- alert("Not implemented");
+function CallPlay(movieid) {
+ var http_request = new XMLHttpRequest();
+ http_request.open( "POST", "jsonrpc", false );
+ http_request.send('{ "jsonrpc": "2.0", "method": "XBMC.Play", "params": { "movieid": ' + movieid + ' }, "id": 1 }');
}
</script>
</head>
@@ -34,29 +35,33 @@ function PlayMovie(movieid)
<script type="text/javascript">
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
-var send = { "jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "id": 1 }
-http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.GetMovies\", \"params\": { \"fields\": [\"title\", \"plot\"] }, \"id\": 1}");
+http_request.send('{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "fields": ["title", "plot"] }, "id": 1}');
var the_object = JSON.parse(http_request.responseText);
var result = the_object["result"];
var array = result["movies"];
-document.write("<table class=\"Movies\"><thead><tr><th>Thumbnail</th><th>Info</th></tr></thead><tbody>");
+document.write('<table class="Movies"><thead><tr><th>Thumbnail</th><th>Info</th></tr></thead><tbody>');
for (var property in array) {
var item = array[property];
- document.write("<tr class=\"" + (property % 2 == 0 ? "even" : "odd") + "\"><td class=\"cover\">");
+ document.write('<tr class="' + (property % 2 == 0 ? "even" : "odd") + '"><td class="cover">');
+ var thumbnail = "images/DefaultVideo.png";
if (item["thumbnail"])
- document.write("<img src=thumb/" + item["thumbnail"] + ".jpg alt=\"" + item["title"] + "\" class=\"cover\" onclick=\"PlayMovie(" + item["movieid"] + ")\"></img>");
- document.write("</td><td class=\"info\">");
+ thumbnail = "thumb/" + item["thumbnail"] + ".jpg";
- document.write("<h1>" + item["title"] + "</h1>");
+ document.write('<a href="nowplaying.html" onclick=CallPlay(' + item["movieid"] + ')>');
+ document.write('<img src="' + thumbnail + '" class="cover"></img>');
+ document.write('</td><td class="info">');
+ document.write('</a>');
+
+ document.write('<h1>' + item["title"] + '</h1>');
if (item["plot"])
document.write(item["plot"]);
- document.write("</td></tr>");
+ document.write('</td></tr>');
}
-document.write("</tbody></table>");
+document.write('</tbody></table>');
</script>
</body>
</html>
diff --git a/web/poc_jsonrpc/musicfiles.html b/web/poc_jsonrpc/musicfiles.html
index 96478ec31e..69e6470ed6 100644
--- a/web/poc_jsonrpc/musicfiles.html
+++ b/web/poc_jsonrpc/musicfiles.html
@@ -42,9 +42,9 @@ var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
if (directory)
- http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetDirectory\", \"params\": { \"type\": \"music\", \"directory\": \"" + Url.decode(directory) + "\", \"sortmethod\": \"label\", \"sortorder\": \"ascending\" }, \"id\": 1}");
+ http_request.send('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": { "type": "music", "directory": "' + Url.decode(directory) + '", "sortmethod": "label", "sortorder": "ascending" }, "id": 1}');
else
- http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetSources\", \"params\": { \"type\": \"music\" }, \"id\": 1}");
+ http_request.send('{"jsonrpc": "2.0", "method": "Files.GetSources", "params": { "type": "music" }, "id": 1}');
var the_object = JSON.parse(http_request.responseText);
@@ -56,30 +56,30 @@ if (result) {
else
array = result["shares"];
- document.write("<table class=\"Files\">");
+ document.write('<table class="Files">');
for (var i in array) {
var item = array[i];
- document.write("<tr class=\"" + (i % 2 == 0 ? "even" : "odd") + "\"><td class=\"cover\">");
+ document.write('<tr class="' + (i % 2 == 0 ? "even" : "odd") + '"><td class="cover">');
if (item["file"].endsWith("/")) {
- document.write("<a href=\"musicfiles.html?directory=" + Url.encode(item["file"]) + "\">");
- document.write("<img src=\"" + (item["thumbnail"] ? ("thumb/" + item["thumbnail"] + ".jpg"): "images/DefaultFolder.png") + "\" class=\"smallcover\" alt=\"" + item["label"] + "\"></img></a>");
+ document.write('<a href="musicfiles.html?directory=' + Url.encode(item["file"]) + '">');
+ document.write('<img src="' + (item["thumbnail"] ? ("thumb/" + item["thumbnail"] + ".jpg"): "images/DefaultFolder.png") + '" class="smallcover" alt="' + item["label"] + '"></img></a>');
} else {
- document.write("<img src=\"images/DefaultAlbumCover.png\" class=\"smallcover\" alt=\"" + item["label"] + "\"></img>");
+ document.write('<img src="images/DefaultAlbumCover.png" class="smallcover" alt="' + item["label"] + '"></img>');
}
- document.write("<td class=\"info\">");
+ document.write('<td class="info">');
if (item["file"].endsWith("/")) {
- document.write("<a href=\"musicfiles.html?directory=" + Url.encode(item["file"]) + "\">");
- document.write(item["label"] + "</a>");
+ document.write('<a href="musicfiles.html?directory=' + Url.encode(item["file"]) + '">');
+ document.write(item["label"] + '</a>');
} else {
document.write(item["label"]);
}
- document.write("</td></tr>");
+ document.write('</td></tr>');
}
- document.write("</tbody></table>");
+ document.write('</tbody></table>');
} else {
document.write("Error");
}
diff --git a/web/poc_jsonrpc/nowplaying.html b/web/poc_jsonrpc/nowplaying.html
index e81e4ca520..7830aad9a9 100644
--- a/web/poc_jsonrpc/nowplaying.html
+++ b/web/poc_jsonrpc/nowplaying.html
@@ -8,7 +8,7 @@ function CallMethod(method)
{
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
- http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"" + method + "\", \"params\": { \"fields\": [\"title\", \"plot\"] }, \"id\": 1}");
+ http_request.send('{"jsonrpc": "2.0", "method": "' + method + '", "params": { "fields": ["title", "plot"] }, "id": 1}');
window.location.reload( false );
}
@@ -16,7 +16,7 @@ function CallPlay(player, playlistItem)
{
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
- http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"" + player + "Playlist.Play\", \"params\": " + playlistItem + ", \"id\": 1}");
+ http_request.send('{"jsonrpc": "2.0", "method": "' + player + 'Playlist.Play", "params": ' + playlistItem + ', "id": 1}');
}
function refresh()
@@ -41,7 +41,7 @@ function refresh()
setTimeout( "refresh()", 5*1000 );
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
-http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"Player.GetActivePlayers\", \"id\": 1}");
+http_request.send('{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 1}');
var players = JSON.parse(http_request.responseText)["result"];
if (players.length > 0) {
@@ -49,7 +49,7 @@ if (players.length > 0) {
http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
- http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"" + player + "Playlist.GetItems\", \"params\": { \"fields\": [\"title\", \"plot\"] }, \"id\": 1}");
+ http_request.send('{"jsonrpc": "2.0", "method": "' + player + 'Playlist.GetItems", "params": { "fields": ["title", "plot"] }, "id": 1}');
var the_object = JSON.parse(http_request.responseText);
var result = the_object["result"];
@@ -58,32 +58,32 @@ if (players.length > 0) {
if (activeItem >= 0) {
if (array[activeItem]["thumbnail"])
- document.write("<img src=\"thumb/" + array[activeItem]["thumbnail"] + ".jpg\"></img>");
+ document.write('<img src="thumb/' + array[activeItem]["thumbnail"] + '.jpg"></img>"');
else
- document.write("<img src=\"images/DefaultAlbumCover.png\"></img>");
+ document.write('<img src="images/DefaultAlbumCover.png"></img>');
- document.write("<br></br>");
+ document.write('<br></br>');
- document.write("<a href=\"nowplaying.html\" onclick=CallMethod(\"" + player + "Player.SkipPrevious\")><img src=\"images/OSDPrevTrackFO.png\"></img></a>");
- document.write("<a href=\"nowplaying.html\" onclick=CallMethod(\"" + player + "Player.Stop\")><img src=\"images/OSDStopFO.png\"></img></a>");
- document.write("<a href=\"nowplaying.html\" onclick=CallMethod(\"" + player + "Player.PlayPause\")><img src=\"images/OSDPlayFO.png\"></img></a>");
- document.write("<a href=\"nowplaying.html\" onclick=CallMethod(\"" + player + "Player.SkipNext\")><img src=\"images/OSDNextTrackFO.png\"></img></a>");
+ document.write('<a href="nowplaying.html" onclick=CallMethod("' + player + 'Player.SkipPrevious")><img src="images/OSDPrevTrackFO.png"></img></a>');
+ document.write('<a href="nowplaying.html" onclick=CallMethod("' + player + 'Player.Stop")><img src="images/OSDStopFO.png"></img></a>');
+ document.write('<a href="nowplaying.html" onclick=CallMethod("' + player + 'Player.PlayPause")><img src="images/OSDPlayFO.png"></img></a>');
+ document.write('<a href="nowplaying.html" onclick=CallMethod("' + player + 'Player.SkipNext")><img src="images/OSDNextTrackFO.png"></img></a>');
- document.write("<br></br>");
+ document.write('<br></br>');
- document.write("<table class=\"Playlist\"><tbody>");
+ document.write('<table class="Playlist"><tbody>');
for (var i in array) {
var item = array[i];
- document.write("<tr class=\"" + (i % 2 == 0 ? "even" : "odd") + "\">");
- document.write("<td class=\"label\"><a href=\"nowplaying.html\" onclick=CallPlay(\"" + player + "\"," + i + ")>" + item["label"] + "</a></td>");
+ document.write('<tr class="' + (i % 2 == 0 ? "even" : "odd") + '">');
+ document.write('<td class="label"><a href="nowplaying.html" onclick=CallPlay("' + player + '",' + i + ')>' + item["label"] + '</a></td>');
if (i == activeItem)
- document.write("<td class=\"playing\"><img src=\"images/play.png\" height=16></img></td>");
+ document.write('<td class="playing"><img src="images/play.png" height=16></img></td>');
else
- document.write("<td class=\"playing\"></td>");
- document.write("</tr>");
+ document.write('<td class="playing"></td>');
+ document.write('</tr>');
}
- document.write("</tbody></table>");
+ document.write('</tbody></table>');
}
} else {
document.write("Nothings playing");
diff --git a/web/poc_jsonrpc/tvshowepisodes.html b/web/poc_jsonrpc/tvshowepisodes.html
index 1c0af92202..d8d7406f2b 100644
--- a/web/poc_jsonrpc/tvshowepisodes.html
+++ b/web/poc_jsonrpc/tvshowepisodes.html
@@ -3,6 +3,13 @@
<link type="text/css" rel="stylesheet" href="basic.css" />
<script type="text/javascript" src="json.js" />
<script type="text/javascript" src="help.js" />
+<script type="text/javascript">
+function CallPlay(episodeid) {
+ var http_request = new XMLHttpRequest();
+ http_request.open( "POST", "jsonrpc", false );
+ http_request.send('{"jsonrpc": "2.0", "method": "XBMC.Play", "params": { "episodeid": ' + episodeid + ' }, "id": 1}');
+}
+</script>
</head>
<body>
<table class="Navigation">
@@ -31,27 +38,33 @@ var season = gup("season");
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
-http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.GetEpisodes\", \"params\": { \"tvshowid\": " + tvshowid + ", \"season\": " + season + ", \"fields\": [\"plot\"] }, \"id\": 1}");
+http_request.send('{"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": { "tvshowid": ' + tvshowid + ', "season": ' + season + ', "fields": ["plot"] }, "id": 1}');
var the_object = JSON.parse(http_request.responseText);
var result = the_object["result"];
if (result) {
var array = result["episodes"];
- document.write("<table class=\"Episodes\"><thead><tr><th>Thumbnail</th><th>Info</th></tr></thead><tbody>");
+ document.write('<table class="Episodes"><thead><tr><th>Thumbnail</th><th>Info</th></tr></thead><tbody>');
for (var i in array) {
var item = array[i];
- document.write("<tr class=\"" + (i % 2 == 0 ? "even" : "odd") + "\"><td class=\"cover\">");
- document.write("<img src=\"" + (item["thumbnail"] ? ("thumb/" + item["thumbnail"] + ".jpg"): "images/nocover.jpg") + "\" class=\"cover\" alt=\"" + item["label"] + "\"></img>");
- document.write("</td><td class=\"info\">");
+ document.write('<tr class="" + (i % 2 == 0 ? "even" : "odd") + ""><td class="cover">');
+ var thumbnail = "images/DefaultVideo.png";
+ if (item["thumbnail"])
+ thumbnail = "thumb/" + item["thumbnail"] + ".jpg";
+
+ document.write('<a href="nowplaying.html" onclick=CallPlay(' + item["episodeid"] + ')>');
+ document.write('<img src="' + thumbnail + '" class="cover"></img>');
+ document.write('</td><td class="info">');
+ document.write('</a>');
- document.write("<h1>" + item["label"] + "</h1>");
+ document.write('<h1>' + item["label"] + '</h1>');
if (item["plot"])
document.write(item["plot"]);
- document.write("</td></tr>");
+ document.write('</td></tr>');
}
- document("</tbody></table>");
+ document('</tbody></table>');
} else {
document.write("Error");
}
diff --git a/web/poc_jsonrpc/tvshows.html b/web/poc_jsonrpc/tvshows.html
index c17ab86a1a..17d7090f98 100644
--- a/web/poc_jsonrpc/tvshows.html
+++ b/web/poc_jsonrpc/tvshows.html
@@ -27,18 +27,17 @@
<script type="text/javascript">
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
-var send = { "jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "id": 1 }
-http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.GetTVShows\", \"id\": 1}");
+http_request.send('{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "id": 1}');
var the_object = JSON.parse(http_request.responseText);
var result = the_object["result"];
var array = result["tvshows"];
for (var property in array) {
var item = array[property];
- document.write("<a href=\"tvshowseasons.html?tvshowid=" + item["tvshowid"] + "\">");
- document.write("<img src=\"" + (item["thumbnail"] ? ("thumb/" + item["thumbnail"] + ".jpg"): "images/nocover.jpg") + "\"></img>");
- document.write("</a>");
- document.write("<br>");
+ document.write('<a href="tvshowseasons.html?tvshowid=' + item["tvshowid"] + '">');
+ document.write('<img src="' + (item["thumbnail"] ? ("thumb/" + item["thumbnail"] + ".jpg"): "images/nocover.jpg") + '"></img>');
+ document.write('</a>');
+ document.write('<br>');
}
</script>
</body>
diff --git a/web/poc_jsonrpc/tvshowseasons.html b/web/poc_jsonrpc/tvshowseasons.html
index 2ca7638a15..8f00917de3 100644
--- a/web/poc_jsonrpc/tvshowseasons.html
+++ b/web/poc_jsonrpc/tvshowseasons.html
@@ -30,29 +30,29 @@ var tvshowid = gup("tvshowid");
var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
-http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.GetSeasons\", \"params\": { \"tvshowid\": " + tvshowid + ", \"fields\": [ \"season\" ] }, \"id\": 1}");
+http_request.send('{"jsonrpc": "2.0", "method": "VideoLibrary.GetSeasons", "params": { "tvshowid": ' + tvshowid + ', "fields": [ "season" ] }, "id": 1}');
var the_object = JSON.parse(http_request.responseText);
var result = the_object["result"];
if (result) {
var array = result["seasons"];
- document.write("<table class=\"Episodes\"><thead><tr><th>Thumbnail</th><th>Info</th></tr></thead><tbody>");
+ document.write('<table class="Episodes"><thead><tr><th>Thumbnail</th><th>Info</th></tr></thead><tbody>');
for (var i in array) {
var item = array[i];
- document.write("<tr class=\"" + (i % 2 == 0 ? "even" : "odd") + "\"><td class=\"cover\">");
- document.write("<a href=\"tvshowepisodes.html?tvshowid=" + tvshowid + "&season=" + item["season"] + "\">");
- document.write("<img src=\"" + (item["thumbnail"] ? ("thumb/" + item["thumbnail"] + ".jpg"): "images/nocover.jpg") + "\" class=\"cover\" alt=\"" + item["label"] + "\"></img>");
- document.write("</a>");
- document.write("</td><td class=\"info\">");
- document.write("<h1>" + item["label"] + "</h1>");
+ document.write('<tr class="' + (i % 2 == 0 ? 'even' : 'odd') + '"><td class="cover">');
+ document.write('<a href="tvshowepisodes.html?tvshowid=' + tvshowid + '&season=' + item["season"] + '">');
+ document.write('<img src="' + (item["thumbnail"] ? ("thumb/" + item["thumbnail"] + ".jpg"): "images/nocover.jpg") + '" class="cover" alt="' + item["label"] + '"></img>');
+ document.write('</a>');
+ document.write('</td><td class="info">');
+ document.write('<h1>' + item["label"] + '</h1>');
if (item["plot"])
document.write(item["plot"]);
- document.write("</td></tr>");
+ document.write('</td></tr>');
}
- document("</tbody></table>");
+ document('</tbody></table>');
} else {
document.write("Error");
}
diff --git a/web/poc_jsonrpc/videofiles.html b/web/poc_jsonrpc/videofiles.html
index d5d4a37c7d..c246eb118a 100644
--- a/web/poc_jsonrpc/videofiles.html
+++ b/web/poc_jsonrpc/videofiles.html
@@ -42,9 +42,9 @@ var http_request = new XMLHttpRequest();
http_request.open( "POST", "jsonrpc", false );
if (directory)
- http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetDirectory\", \"params\": { \"type\": \"video\", \"directory\": \"" + Url.decode(directory) + "\" }, \"id\": 1}");
+ http_request.send('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": { "type": "video", "directory": "' + Url.decode(directory) + '" }, "id": 1}');
else
- http_request.send("{\"jsonrpc\": \"2.0\", \"method\": \"Files.GetSources\", \"params\": { \"type\": \"video\" }, \"id\": 1}");
+ http_request.send('{"jsonrpc": "2.0", "method": "Files.GetSources", "params": { "type": "video" }, "id": 1}');
var the_object = JSON.parse(http_request.responseText);
@@ -56,30 +56,30 @@ if (result) {
else
array = result["shares"];
- document.write("<table class=\"Files\">");
+ document.write('<table class="Files">');
for (var i in array) {
var item = array[i];
- document.write("<tr class=\"" + (i % 2 == 0 ? "even" : "odd") + "\"><td class=\"cover\">");
+ document.write('<tr class="' + (i % 2 == 0 ? "even" : "odd") + '"><td class="cover">');
if (item["file"].endsWith("/")) {
- document.write("<a href=\"videofiles.html?directory=" + Url.encode(item["file"]) + "\">");
- document.write("<img src=\"" + (item["thumbnail"] ? ("thumb/" + item["thumbnail"] + ".jpg"): "images/DefaultFolder.png") + "\" class=\"smallcover\" alt=\"" + item["label"] + "\"></img></a>");
+ document.write('<a href="videofiles.html?directory=' + Url.encode(item["file"]) + '">');
+ document.write('<img src="' + (item["thumbnail"] ? ("thumb/" + item["thumbnail"] + ".jpg"): "images/DefaultFolder.png") + '" class="smallcover" alt="' + item["label"] + '"></img></a>');
} else {
- document.write("<img src=\"images/DefaultVideo.png\" class=\"smallcover\" alt=\"" + item["label"] + "\"></img>");
+ document.write('<img src="images/DefaultVideo.png" class="smallcover" alt="' + item["label"] + '"></img>');
}
- document.write("<td class=\"info\">");
+ document.write('<td class="info">');
if (item["file"].endsWith("/")) {
- document.write("<a href=\"videofiles.html?directory=" + Url.encode(item["file"]) + "\">");
+ document.write('<a href="videofiles.html?directory=' + Url.encode(item["file"]) + '">');
document.write(item["label"] + "</a>");
} else {
document.write(item["label"]);
}
- document.write("</td></tr>");
+ document.write('</td></tr>');
}
- document.write("</tbody></table>");
+ document.write('</tbody></table>');
} else {
document.write("Error");
}