The branch, eden has been updated
       via  53562b73589fb30221badcb5c0ad451d6656f05a (commit)
      from  6214e7a8053964a6754996fa748d943090507211 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/webinterfaces;a=commit;h=53562b73589fb30221badcb5c0ad451d6656f05a

commit 53562b73589fb30221badcb5c0ad451d6656f05a
Author: montellese <[email protected]>
Date:   Sun May 27 17:10:00 2012 +0200

    [webinterface.pwi] updated to 0.1.3

diff --git a/webinterface.pwi/addon.xml b/webinterface.pwi/addon.xml
index 19eb897..a7ec405 100644
--- a/webinterface.pwi/addon.xml
+++ b/webinterface.pwi/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <addon
   id="webinterface.pwi"
-  version="0.1.2"
+  version="0.1.3"
   name="pimaxplus web interface"
   provider-name="pimaxplus.com">
   <requires>
diff --git a/webinterface.pwi/changelog.txt b/webinterface.pwi/changelog.txt
index ec2e834..51e55ff 100644
--- a/webinterface.pwi/changelog.txt
+++ b/webinterface.pwi/changelog.txt
@@ -1,3 +1,6 @@
+v 0.1.3 (20120527)
+- Bug fix: now the currently playing time shows hours too
+
 v 0.1.2 (20120524)
 - Added playback buttons in footer
 - Page data is stored locally (no loss on refresh anymore)
diff --git a/webinterface.pwi/scripts/pimaxplus.xbmc.js 
b/webinterface.pwi/scripts/pimaxplus.xbmc.js
index ece8562..e1cac0c 100644
--- a/webinterface.pwi/scripts/pimaxplus.xbmc.js
+++ b/webinterface.pwi/scripts/pimaxplus.xbmc.js
@@ -38,8 +38,20 @@ var pwiCore = {
                        url: pwiCore.JSON_RPC + '?GetPlayerProperties',
                        data: '{"jsonrpc": "2.0", "method": 
"Player.GetProperties", "params" : {"playerid": ' + pwiCore.playerid + ', 
"properties": ["time", "totaltime"]}, "id": 1}',
                        success: jQuery.proxy(function(data) {
-                               if(data && data.result && data.result) {
-                                       pwiCore.playertime = 
data.result.time.minutes + ':' + pwiUtils.leadingZero(data.result.time.seconds) 
+ ' / ' + data.result.totaltime.minutes + ':' + 
pwiUtils.leadingZero(data.result.totaltime.seconds);
+                               if(data && data.result && data.result) {        
                                
+                                       pwiCore.playertime = '';
+                               
+                                       if(data.result.time.hours > 0) {
+                                               pwiCore.playertime += 
data.result.time.hours + ':';
+                                       }
+                                       
+                                       pwiCore.playertime += 
data.result.time.minutes + ':' + pwiUtils.leadingZero(data.result.time.seconds) 
+ ' / ';
+                                       
+                                       if(data.result.totaltime.hours > 0) {
+                                               pwiCore.playertime += 
data.result.totaltime.hours + ':';
+                                       }
+                                       
+                                       pwiCore.playertime += 
data.result.totaltime.minutes + ':' + 
pwiUtils.leadingZero(data.result.totaltime.seconds);
                                } 
                        }, this),
                        dataType: 'json'
diff --git a/webinterface.pwi/scripts/pimaxplus.xbmc.min.js 
b/webinterface.pwi/scripts/pimaxplus.xbmc.min.js
index d5d0add..308ad7b 100644
--- a/webinterface.pwi/scripts/pimaxplus.xbmc.min.js
+++ b/webinterface.pwi/scripts/pimaxplus.xbmc.min.js
@@ -1 +1 @@
-var 
pwiCore={JSON_RPC:"/jsonrpc",playerid:-1,playertime:"",init:function(){setInterval("pwiCore.getActivePlayer()",500)},setPlayerId:function(a){pwiCore.playerid=a},getActivePlayer:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetActivePlayer",data:'{"jsonrpc":
 "2.0", "method": "Player.GetActivePlayers", "id": 
1}',success:jQuery.proxy(function(b){if(b&&b.result&&b.result[0]){pwiCore.setPlayerId(b.result[0].playerid);pwiCore.getCurrentlyPlaying();pwiCore.getPlayerProperties()}else{$("#home-list").children('[data-current-media="divider"]').hide();$("#home-list").children('[data-current-media="info"]').hide();try{$("#home-list").listview("refresh")}catch(a){}}},this),dataType:"json"})},getPlayerProperties:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetPlayerProperties",data:'{"jsonrpc":
 "2.0", "method": "Player.GetProperties", "params" : {"playerid": 
'+pwiCore.playerid+', "properties": ["time", "totaltime"]}, "id": 
1}',success:jQuery.proxy(function(a){if(a&&a.result&&a.result){pwiCore.playertime=a.result.time.minutes+":"+pwiUtils.leadingZero(a.result.time.seconds)+"
 / 
"+a.result.totaltime.minutes+":"+pwiUtils.leadingZero(a.result.totaltime.seconds)}},this),dataType:"json"})},getCurrentlyPlaying:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetCurrentlyPlaying",data:'{"jsonrpc":
 "2.0", "method": "Player.GetItem", "params": { "playerid": 
'+pwiCore.playerid+', "properties": ["title", "showtitle", "artist", 
"thumbnail"] }, "id": 1}',success:jQuery.proxy(function(a){if(!$('#home-list 
li[data-current-media="info"]').is(":visible")){$('#home-list 
li[data-current-media="info"]').show();$('#home-list 
li[data-current-media="divider"]').show()}$('[data-current-media="title"]').text(a.result.item.title);$('[data-current-media="artist"]').text(a.result.item.artist);$('[data-current-media="player-time"]').text(pwiCore.playertime);$('[data-current-media="thumbnail"]').attr("src","/vfs/"+a.result.item.thumbnail);$('[data-currentlyplaying="info"]').each(function(){if(a.result.item){if(pwiCore.playerid==0){$(this).html(""+a.result.item.title+'<br
 /><span class="smallfont">'+a.result.item.artist+'</span><br /><span 
class="smallerfont">'+pwiCore.playertime+"</span>")}else{if(pwiCore.playerid==1){if(a.result.item.showtitle){$(this).html('<span
 class="smallfont">'+a.result.item.showtitle+"</span><br 
/>"+a.result.item.title+'<br /><span 
class="smallerfont">'+pwiCore.playertime+"</span>")}else{$(this).html(a.result.item.title+'<br
 /><span 
class="smallerfont">'+pwiCore.playertime+"</span>")}}}}try{$("#homelist").listview("refresh")}catch(b){}})},this),dataType:"json"})},scan:function(a){var
 b="";if(a=="video"){b='{"jsonrpc": "2.0", "method": "AudioLibrary.Scan", "id": 
1}'}else{if(a=="video"){b='{"jsonrpc": "2.0", "method": "VideoLibrary.Scan", 
"id": 
1}'}}jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?Scan",data:b,success:jQuery.proxy(function(c){},this),dataType:"json"})}};var
 
pwiRemote={init:function(){pwiRemote.getVolume();$("[data-remote-action]").on("click",function(){pwiRemote.remotePressed($(this).attr("data-remote-action"),$(this).attr("data-remote-params"))})},remotePressed:function(a,b){if(b==""){data='{"jsonrpc":
 "2.0", "method": "'+a+'", "id": 1}'}else{if(b=="player"){data='{"jsonrpc": 
"2.0", "method": "'+a+'", "params": { "playerid": 
'+pwiCore.playerid+"}}"}else{b=b.split("'").join('"');data='{"jsonrpc": "2.0", 
"method": "'+a+'", "params": { "playerid": '+pwiCore.playerid+", 
"+b+"}}"}}jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?SendRemoteKey",data:data,success:jQuery.proxy(function(c){},this),dataType:"json"})},getVolume:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?SendRemoteKey",data:'{"jsonrpc":
 "2.0", "method": "Application.GetProperties", "params": { "properties": [ 
"volume" ] }, "id": 
1}',success:jQuery.proxy(function(a){if($.mobile.activePage.attr("id")=="remote"){$("#volumeslider").val(a.result.volume).slider("refresh")}$("#volumeslider").on("change",function(){pwiRemote.changeVolume($(this).val())})},this),dataType:"json"})},changeVolume:function(a){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?SendRemoteKey",data:'{"jsonrpc":
 "2.0", "method": "Application.GetProperties", "params": { "properties": [ 
"volume" ] }, "id": 
1}',success:jQuery.proxy(function(b){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?SendRemoteKey",data:'{"jsonrpc":
 "2.0", "method": "Application.SetVolume", "params": { "volume": '+a+' }, "id": 
1}',success:jQuery.proxy(function(c){},this),dataType:"json"})},this),dataType:"json"})}};var
 
pwiMovies={showMain:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetMovies",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetMovies", "params": { "limits": { "start": 
0}, "properties": ["title"], "sort": {"method": "sorttitle", "ignorearticle": 
true}}, "id": 
1}',success:jQuery.proxy(function(b){dividing="-1";$("#moviemainlist").html("");$.each($(b.result.movies),jQuery.proxy(function(c,d){startsWith=d.title.indexOf("The
 
")==0?d.title.substr(4,1):d.title.substr(0,1);if(64<startsWith.charCodeAt(0)&&startsWith.charCodeAt(0)<91){if(startsWith!=dividing){$("#moviemainlist").append('<li><a
 href="#movies-overview" data-movie-starts-with="'+startsWith+'"> 
'+startsWith+'<p class="ui-li-count" 
data-movie-starts-with-count="'+startsWith+'">1</p></a></li>').trigger("create");dividing=startsWith}else{$('[data-movie-starts-with-count="'+startsWith+'"]').text($('[data-movie-starts-with-count="'+startsWith+'"]').text()-
 -1)}}else{if(dividing=="-1"){$("#moviemainlist").append('<li><a 
href="#movies-overview" data-movie-starts-with="#">#</a><p class="ui-li-count" 
data-movie-starts-with-count="#">1</p></li>');dividing=startsWith}else{$('[data-movie-starts-with-count="#"]').text($('[data-movie-starts-with-count="#"]').text()-
 
-1)}}}));try{$("#moviemainlist").listview("refresh")}catch(a){}$("[data-movie-starts-with]").on("click",function(){localStorage.setItem("movie-starts-with",$(this).attr("data-movie-starts-with"))})},this),dataType:"json"})},showOverview:function(){var
 
a=localStorage.getItem("movie-starts-with");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetMovies",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetMovies", "params": { "limits": { "start": 
0}, "properties": ["thumbnail", "tagline", "title", "rating"], "sort": 
{"method": "sorttitle", "ignorearticle": true}}, "id": 
1}',success:jQuery.proxy(function(c){dividing="-1";$("#movielist").html("");$("#moviemainlist").html("");$.each($(c.result.movies),jQuery.proxy(function(d,e){startsWith=e.title.indexOf("The
 
")==0?e.title.substr(4,1):e.title.substr(0,1);stars="";for(d=0;d<10;d=d+2){if(d<Math.round(e.rating)){stars+='<img
 src="images/star.png" alt="Star" />'}else{stars+='<img 
src="images/star-gray.png" alt="Star" 
/>'}}if(a=="#"&&!isNaN(startsWith)){$("#movielist").append('<li><a 
href="#movies-details" data-movie-id="'+e.movieid+'"><img 
src="/vfs/'+e.thumbnail+'" alt="Thumnail" />'+e.title+"<br />"+stars+'<br 
/><span 
class="smallfont">'+e.tagline+"</span></a></li>").trigger("create")}else{if(startsWith.toUpperCase()==a){$("#movielist").append('<li><a
 href="#movies-details" data-movie-id="'+e.movieid+'"><img 
src="/vfs/'+e.thumbnail+'" alt="Thumnail" />'+e.title+"<br />"+stars+'<br 
/><span 
class="smallfont">'+e.tagline+"</span></a></li>").trigger("create")}}}));try{$("#movielist").listview("refresh")}catch(b){}$("[data-movie-id]").on("click",function(){localStorage.setItem("movie-id",$(this).attr("data-movie-id"))})},this),dataType:"json"})},showDetails:function(){var
 
a=localStorage.getItem("movie-id");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetMovies",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetMovieDetails", "params": { "movieid": '+a+', 
"properties": [ "genre", "director", "cast", "tagline", "plot", "title", 
"lastplayed", "runtime", "year", "playcount", "rating", "thumbnail" ]}, "id": 
1}',success:jQuery.proxy(function(b){startsWith=b.result.moviedetails.title.indexOf("The
 
")==0?b.result.moviedetails.title.substr(4,1):b.result.moviedetails.title.substr(0,1);$("#movie-details").html("");$("#movie-details").append('<li
 data-role="list-divider" 
id="movie-plot">Plot</li>');$("#movie-details").append('<li 
data-role="list-divider" 
id="movie-genres">Genres</li>');$("#movie-details").append('<li 
data-role="list-divider" 
id="movie-cast">Cast</li>');$("#movie-details").append('<li 
data-role="list-divider" 
id="movie-crew">Director</li>');$("#movie-details").append('<li 
data-role="list-divider" id="movie-info">More 
info</li>');$("#movie-details").append('<li data-role="list-divider" 
id="movie-actions">Actions</li>');$("#movie-title").text(b.result.moviedetails.title);$("#movie-plot").after("<li>"+b.result.moviedetails.plot+"</li>");$("#movie-genres").after(pwiUtils.split(b.result.moviedetails.genre));for(i=0;i<b.result.moviedetails.cast.length;i++){img=b.result.moviedetails.cast[i].thumbnail?"/vfs/"+b.result.moviedetails.cast[i].thumbnail:"images/unknown-actor.gif";$("#movie-cast").after('<li><img
 src="'+img+'" alt="Actor" />'+b.result.moviedetails.cast[i].name+'<br /><span 
class="smallfont">'+b.result.moviedetails.cast[i].role+"</span></li>")}$("#movie-crew").after(pwiUtils.split(b.result.moviedetails.director));$("#movie-info").after("<li>Released
 in "+b.result.moviedetails.year+"</li>");$("#movie-info").after("<li>Duration: 
"+b.result.moviedetails.runtime+" 
minutes</li>");$("#movie-actions").after('<li><span data-role="button" 
onclick="pwiMovies.playMovie();">Play 
movie</span></li>');$("#movie-details").listview("refresh");$("[data-role=button]").button()},this),dataType:"json"})},playMovie:function(){var
 
a=localStorage.getItem("movie-id");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?PlayMovie",data:'{"jsonrpc":
 "2.0", "method": "Player.Open", "params": { "item": { "movieid": '+a+' } }, 
"id": 1}',success:jQuery.proxy(function(b){},this),dataType:"json"})}};var 
pwiTvShows={showMain:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetTVShows",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetTVShows", "params": { "limits": { "start": 
0}, "properties": ["title"], "sort": {"method": "sorttitle", "ignorearticle": 
true}}, "id": 
1}',success:jQuery.proxy(function(b){dividing="-1";$("#tvshowmainlist").html("");$.each($(b.result.tvshows),jQuery.proxy(function(c,d){startsWith=d.title.indexOf("The
 
")==0?d.title.substr(4,1):d.title.substr(0,1);if(64<startsWith.charCodeAt(0)&&startsWith.charCodeAt(0)<91){if(startsWith!=dividing){$("#tvshowmainlist").append('<li><a
 href="#tvshows-overview" data-tvshow-starts-with="'+startsWith+'"> 
'+startsWith+'<p class="ui-li-count" 
data-tvshow-starts-with-count="'+startsWith+'">1</p></a></li>').trigger("create");dividing=startsWith}else{$('[data-tvshow-starts-with-count="'+startsWith+'"]').text($('[data-tvshow-starts-with-count="'+startsWith+'"]').text()-
 -1)}}else{if(dividing=="-1"){$("#tvshowmainlist").append('<li><a 
href="#tvshows-overview" data-tvshow-starts-with="#">#<p class="ui-li-count" 
data-tvshow-starts-with-count="#">1</p></a></li>');dividing=startsWith}else{$('[data-tvshow-starts-with-count="#"]').text($('[data-tvshow-starts-with-count="#"]').text()-
 
-1)}}}));try{$("#tvshowmainlist").listview("refresh")}catch(a){}$("[data-tvshow-starts-with]").on("click",function(){localStorage.setItem("tvshow-starts-with",$(this).attr("data-tvshow-starts-with"))})},this),dataType:"json"})},showOverview:function(){var
 
a=localStorage.getItem("tvshow-starts-with");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetTVShows",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetTVShows", "params": { "limits": { "start": 
0}, "properties": ["thumbnail", "title", "rating"], "sort": {"method": 
"sorttitle", "ignorearticle": true}}, "id": 
1}',success:jQuery.proxy(function(c){dividing="-1";$("#tvshowlist").html("");$.each($(c.result.tvshows),jQuery.proxy(function(e,f){startsWith=f.title.indexOf("The
 ")==0?f.title.substr(4,1):f.title.substr(0,1);var 
d="";for(e=0;e<10;e=e+2){if(e<Math.round(f.rating)){d+='<img 
src="images/star.png" alt="Star" />'}else{d+='<img src="images/star-gray.png" 
alt="Star" 
/>'}}if(a=="#"&&(65>startsWith.charCodeAt(0)||startsWith.charCodeAt(0)>91)){$("#tvshowlist").append('<li><a
 href="#tvshows-seasons" data-tvshow-id="'+f.tvshowid+'"><img 
src="/vfs/'+f.thumbnail+'" alt="Thumnail" />'+f.title+"<br 
/>"+d+"</li>").trigger("create")}else{if(startsWith.toUpperCase()==a){$("#tvshowlist").append('<li><a
 href="#tvshows-seasons" data-tvshow-id="'+f.tvshowid+'"><img 
src="/vfs/'+f.thumbnail+'" alt="Thumnail" />'+f.title+"<br 
/>"+d+"</li>").trigger("create")}}}));try{$("#tvshowlist").listview("refresh")}catch(b){}$("[data-tvshow-id]").on("click",function(){localStorage.setItem("tvshow-id",$(this).attr("data-tvshow-id"))})},this),dataType:"json"})},showSeasons:function(){var
 
a=localStorage.getItem("tvshow-id");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetSeasons",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetSeasons", "params": { "properties": [ 
"season", "showtitle"], "sort" : {"method": "sorttitle"}, "tvshowid" : '+a+' }, 
"id": 
1}',success:jQuery.proxy(function(c){$("#tvshowseasonslist").html("");$.each($(c.result.seasons),jQuery.proxy(function(d,e){$("#tvshowseasons-title").text(e.showtitle);startsWith=e.showtitle.indexOf("The
 
")==0?e.showtitle.substr(4,1):e.showtitle.substr(0,1);$("#tvshowseasonslist").append('<li><a
 href="#tvshows-episodes" 
data-tvshow-season="'+e.season+'">'+e.label+"</li>").trigger("create")}));try{$("#tvshowseasonslist").listview("refresh")}catch(b){}$("[data-tvshow-season]").on("click",function(){localStorage.setItem("tvshow-season",$(this).attr("data-tvshow-season"))})},this),dataType:"json"})},showEpisodes:function(){var
 b=localStorage.getItem("tvshow-id");var 
a=localStorage.getItem("tvshow-season");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetEpisodes",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetEpisodes", "params": { "properties": [ 
"title", "episode", "thumbnail", "playcount"], "sort" : {"method": "episode"}, 
"tvshowid" : '+b+', "season" : '+a+' }, "id": 
1}',success:jQuery.proxy(function(d){$("#tvshowepisodeslist").html("");$.each($(d.result.episodes),jQuery.proxy(function(e,f){$("#tvshowepisodes-title").text("Season
 "+a);seen=f.playcount>0?"Watched":"";$("#tvshowepisodeslist").append('<li><a 
href="#tvshows-episodes-details" data-tvshow-episode="'+f.episodeid+'"><img 
src="/vfs/'+f.thumbnail+'" alt="Thumnail" />'+f.episode+" - "+f.title+'<br 
/><span 
class="smallerfont">'+seen+"</span></li>").trigger("create")}));try{$("#tvshowepisodeslist").listview("refresh")}catch(c){}$("[data-tvshow-episode]").on("click",function(){localStorage.setItem("tvshow-episode",$(this).attr("data-tvshow-episode"))})},this),dataType:"json"})},showEpisodeDetails:function(){var
 
a=localStorage.getItem("tvshow-episode");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetEpisodeDetails",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetEpisodeDetails", "params": { "episodeid": 
'+a+', "properties": [ "director", "cast", "plot", "title", "lastplayed", 
"runtime", "firstaired", "playcount", "rating", "thumbnail" ]}, "id": 
1}',success:jQuery.proxy(function(b){$("#episode-details").html("");$("#episode-details").append('<li
 data-role="list-divider" 
id="episode-plot">Plot</li>');$("#episode-details").append('<li 
data-role="list-divider" 
id="episode-cast">Cast</li>');$("#episode-details").append('<li 
data-role="list-divider" 
id="episode-crew">Director</li>');$("#episode-details").append('<li 
data-role="list-divider" id="episode-info">More 
info</li>');$("#episode-details").append('<li data-role="list-divider" 
id="episode-actions">Actions</li>');$("#episode-title").text(b.result.episodedetails.title);$("#episode-plot").after("<li>"+b.result.episodedetails.plot+"</li>");for(i=0;i<b.result.episodedetails.cast.length;i++){img=b.result.episodedetails.cast[i].thumbnail?"/vfs/"+b.result.episodedetails.cast[i].thumbnail:"images/unknown-actor.gif";$("#episode-cast").after('<li><img
 src="'+img+'" alt="Actor" />'+b.result.episodedetails.cast[i].name+'<br 
/><span 
class="smallfont">'+b.result.episodedetails.cast[i].role+"</span></li>")}$("#episode-crew").after(pwiUtils.split(b.result.episodedetails.director));$("#episode-info").after("<li>First
 aired on 
"+b.result.episodedetails.firstaired+"</li>");$("#episode-info").after("<li>Duration:
 "+b.result.episodedetails.runtime+" 
minutes</li>");$("#episode-actions").after('<li><span data-role="button" 
onclick="pwiTvShows.playEpisode('+a+');">Play 
episode</span></li>');$("#episode-details").listview("refresh");$("[data-role=button]").button()},this),dataType:"json"})},playEpisode:function(a){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?AddTvShowToPlaylist",data:'{"jsonrpc":
 "2.0", "method": "Player.Open", "params": { "item": { "episodeid": '+a+' } }, 
"id": 1}',success:jQuery.proxy(function(b){},this),dataType:"json"})}};var 
pwiMusic={showMain:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetArtists",data:'{"jsonrpc":
 "2.0", "method": "AudioLibrary.GetArtists", "params": { "limits": { "start": 
0}, "properties": [], "sort": {"method": "label", "ignorearticle": true}}, 
"id": 
1}',success:jQuery.proxy(function(b){dividing="-1";$("#musicmainlist").html("");$.each($(b.result.artists),jQuery.proxy(function(c,d){startsWith=d.label.indexOf("The
 ")==0?d.label.substr(4,1):d.label.indexOf("De 
")==0?d.label.substr(3,1):d.label.substr(0,1);startsWith=startsWith.toUpperCase();if(64<startsWith.charCodeAt(0)&&startsWith.charCodeAt(0)<91){if(startsWith!=dividing){$("#musicmainlist").append('<li><a
 href="#music-artists" data-artists-start-with="'+startsWith+'"> 
'+startsWith+'<p class="ui-li-count" 
data-artists-start-with-count="'+startsWith+'">1</p></a></li>').trigger("create");dividing=startsWith}else{$('[data-artists-start-with-count="'+startsWith+'"]').text($('[data-artists-start-with-count="'+startsWith+'"]').text()-
 -1)}}else{if(dividing=="-1"){$("#musicmainlist").append('<li><a 
href="#music-artists" data-artists-start-with="#">#<p class="ui-li-count" 
data-artists-start-with-count="#">1</p></a></li>');dividing=startsWith}else{$('[data-artists-start-with-count="#"]').text($('[data-artists-start-with-count="#"]').text()-
 
-1)}}}));try{$("#musicmainlist").listview("refresh")}catch(a){}$("[data-artists-start-with]").on("click",function(){localStorage.setItem("music-artists-start-with",$(this).attr("data-artists-start-with"))})},this),dataType:"json"})},showArtists:function(){var
 
a=localStorage.getItem("music-artists-start-with");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetArtists",data:'{"jsonrpc":
 "2.0", "method": "AudioLibrary.GetArtists", "params": { "limits": { "start": 
0}, "properties": [], "sort": {"method": "label", "ignorearticle": true}}, 
"id": 
1}',success:jQuery.proxy(function(c){$("#artistlist").html("");$.each($(c.result.artists),jQuery.proxy(function(d,e){startsWith=e.label.indexOf("The
 ")==0?e.label.substr(4,1):e.label.indexOf("De 
")==0?e.label.substr(3,1):e.label.substr(0,1);startsWith=startsWith.toUpperCase();if((a=="#"&&(65>startsWith.charCodeAt(0)||startsWith.charCodeAt(0)>91))||startsWith.toUpperCase()==a){$("#artistlist").append('<li><a
 href="#music-artists-songs" 
data-music-artist="'+e.artistid+'">'+e.label+"</li>").trigger("create")}}));try{$("#artistlist").listview("refresh")}catch(b){}$("[data-music-artist]").on("click",function(){localStorage.setItem("music-artist",$(this).attr("data-music-artist"))})},this),dataType:"json"})},showArtistSongs:function(){var
 
a=localStorage.getItem("music-artist");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetArtists",data:'{"jsonrpc":
 "2.0", "method": "AudioLibrary.GetSongs", "params": { "artistid": '+a+', 
"limits": { "start": 0}, "properties": ["artist", "title", "album", "duration", 
"thumbnail"], "sort": {"method": "title", "ignorearticle": true}}, "id": 
1}',success:jQuery.proxy(function(c){$("#songlist").html("");$.each($(c.result.songs),jQuery.proxy(function(d,e){$("#songs-title").text(e.artist);startsWith=e.artist.indexOf("The
 ")==0?e.artist.substr(4,1):e.artist.indexOf("De 
")==0?e.artist.substr(3,1):e.artist.substr(0,1);$("#songlist").append('<li><a 
href="javascript:pwiMusic.playSong();" data-music-song="'+e.songid+'"><img 
src="/vfs/'+e.thumbnail+'" alt="Thubnail" />'+e.title+'<br /><span 
class="smallfont">'+e.album+"</span></li>").trigger("create")}));try{$("#songlist").listview("refresh")}catch(b){}$("[data-music-song]").on("click",function(){localStorage.setItem("music-song",$(this).attr("data-music-song"))})},this),dataType:"json"})},playSong:function(){var
 
a=localStorage.getItem("music-song");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?AddSongToPlaylist",data:'{"jsonrpc":
 "2.0", "method": "Player.Open", "params": { "item": { "songid": '+a+' } }, 
"id": 1}',success:jQuery.proxy(function(b){},this),dataType:"json"})}};var 
pwiUtils={split:function(c){var b=c.split(" / ");var 
a="";for(i=0;i<b.length;i++){a+="<li>"+b[i]+"</li>"}return 
a},leadingZero:function(b){var a="0"+b;return 
a.substr(a.length-2)}};$(document).delegate(document,"pageshow",pwiCore.init);$(document).delegate("#home,
 #remote, 
#system","pageshow",pwiRemote.init);$(document).delegate("#movies-main","pageshow",pwiMovies.showMain);$(document).delegate("#movies-overview","pageshow",pwiMovies.showOverview);$(document).delegate("#movies-details","pageshow",pwiMovies.showDetails);$(document).delegate("#tvshows-main","pageshow",pwiTvShows.showMain);$(document).delegate("#tvshows-overview","pageshow",pwiTvShows.showOverview);$(document).delegate("#tvshows-seasons","pageshow",pwiTvShows.showSeasons);$(document).delegate("#tvshows-episodes","pageshow",pwiTvShows.showEpisodes);$(document).delegate("#tvshows-episodes-details","pageshow",pwiTvShows.showEpisodeDetails);$(document).delegate("#music-main","pageshow",pwiMusic.showMain);$(document).delegate("#music-artists","pageshow",pwiMusic.showArtists);$(document).delegate("#music-artists-songs","pageshow",pwiMusic.showArtistSongs);
\ No newline at end of file
+var 
pwiCore={JSON_RPC:"/jsonrpc",playerid:-1,playertime:"",init:function(){setInterval("pwiCore.getActivePlayer()",500)},setPlayerId:function(a){pwiCore.playerid=a},getActivePlayer:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetActivePlayer",data:'{"jsonrpc":
 "2.0", "method": "Player.GetActivePlayers", "id": 
1}',success:jQuery.proxy(function(b){if(b&&b.result&&b.result[0]){pwiCore.setPlayerId(b.result[0].playerid);pwiCore.getCurrentlyPlaying();pwiCore.getPlayerProperties()}else{$("#home-list").children('[data-current-media="divider"]').hide();$("#home-list").children('[data-current-media="info"]').hide();try{$("#home-list").listview("refresh")}catch(a){}}},this),dataType:"json"})},getPlayerProperties:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetPlayerProperties",data:'{"jsonrpc":
 "2.0", "method": "Player.GetProperties", "params" : {"playerid": 
'+pwiCore.playerid+', "properties": ["time", "totaltime"]}, "id": 
1}',success:jQuery.proxy(function(a){if(a&&a.result&&a.result){pwiCore.playertime="";if(a.result.time.hours>0){pwiCore.playertime+=a.result.time.hours+":"}pwiCore.playertime+=a.result.time.minutes+":"+pwiUtils.leadingZero(a.result.time.seconds)+"
 / 
";if(a.result.totaltime.hours>0){pwiCore.playertime+=a.result.totaltime.hours+":"}pwiCore.playertime+=a.result.totaltime.minutes+":"+pwiUtils.leadingZero(a.result.totaltime.seconds)}},this),dataType:"json"})},getCurrentlyPlaying:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetCurrentlyPlaying",data:'{"jsonrpc":
 "2.0", "method": "Player.GetItem", "params": { "playerid": 
'+pwiCore.playerid+', "properties": ["title", "showtitle", "artist", 
"thumbnail"] }, "id": 1}',success:jQuery.proxy(function(a){if(!$('#home-list 
li[data-current-media="info"]').is(":visible")){$('#home-list 
li[data-current-media="info"]').show();$('#home-list 
li[data-current-media="divider"]').show()}$('[data-current-media="title"]').text(a.result.item.title);$('[data-current-media="artist"]').text(a.result.item.artist);$('[data-current-media="player-time"]').text(pwiCore.playertime);$('[data-current-media="thumbnail"]').attr("src","/vfs/"+a.result.item.thumbnail);$('[data-currentlyplaying="info"]').each(function(){if(a.result.item){if(pwiCore.playerid==0){$(this).html(""+a.result.item.title+'<br
 /><span class="smallfont">'+a.result.item.artist+'</span><br /><span 
class="smallerfont">'+pwiCore.playertime+"</span>")}else{if(pwiCore.playerid==1){if(a.result.item.showtitle){$(this).html('<span
 class="smallfont">'+a.result.item.showtitle+"</span><br 
/>"+a.result.item.title+'<br /><span 
class="smallerfont">'+pwiCore.playertime+"</span>")}else{$(this).html(a.result.item.title+'<br
 /><span 
class="smallerfont">'+pwiCore.playertime+"</span>")}}}}try{$("#homelist").listview("refresh")}catch(b){}})},this),dataType:"json"})},scan:function(a){var
 b="";if(a=="video"){b='{"jsonrpc": "2.0", "method": "AudioLibrary.Scan", "id": 
1}'}else{if(a=="video"){b='{"jsonrpc": "2.0", "method": "VideoLibrary.Scan", 
"id": 
1}'}}jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?Scan",data:b,success:jQuery.proxy(function(c){},this),dataType:"json"})}};var
 
pwiRemote={init:function(){pwiRemote.getVolume();$("[data-remote-action]").on("click",function(){pwiRemote.remotePressed($(this).attr("data-remote-action"),$(this).attr("data-remote-params"))})},remotePressed:function(a,b){if(b==""){data='{"jsonrpc":
 "2.0", "method": "'+a+'", "id": 1}'}else{if(b=="player"){data='{"jsonrpc": 
"2.0", "method": "'+a+'", "params": { "playerid": 
'+pwiCore.playerid+"}}"}else{b=b.split("'").join('"');data='{"jsonrpc": "2.0", 
"method": "'+a+'", "params": { "playerid": '+pwiCore.playerid+", 
"+b+"}}"}}jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?SendRemoteKey",data:data,success:jQuery.proxy(function(c){},this),dataType:"json"})},getVolume:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?SendRemoteKey",data:'{"jsonrpc":
 "2.0", "method": "Application.GetProperties", "params": { "properties": [ 
"volume" ] }, "id": 
1}',success:jQuery.proxy(function(a){if($.mobile.activePage.attr("id")=="remote"){$("#volumeslider").val(a.result.volume).slider("refresh")}$("#volumeslider").on("change",function(){pwiRemote.changeVolume($(this).val())})},this),dataType:"json"})},changeVolume:function(a){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?SendRemoteKey",data:'{"jsonrpc":
 "2.0", "method": "Application.GetProperties", "params": { "properties": [ 
"volume" ] }, "id": 
1}',success:jQuery.proxy(function(b){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?SendRemoteKey",data:'{"jsonrpc":
 "2.0", "method": "Application.SetVolume", "params": { "volume": '+a+' }, "id": 
1}',success:jQuery.proxy(function(c){},this),dataType:"json"})},this),dataType:"json"})}};var
 
pwiMovies={showMain:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetMovies",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetMovies", "params": { "limits": { "start": 
0}, "properties": ["title"], "sort": {"method": "sorttitle", "ignorearticle": 
true}}, "id": 
1}',success:jQuery.proxy(function(b){dividing="-1";$("#moviemainlist").html("");$.each($(b.result.movies),jQuery.proxy(function(c,d){startsWith=d.title.indexOf("The
 
")==0?d.title.substr(4,1):d.title.substr(0,1);if(64<startsWith.charCodeAt(0)&&startsWith.charCodeAt(0)<91){if(startsWith!=dividing){$("#moviemainlist").append('<li><a
 href="#movies-overview" data-movie-starts-with="'+startsWith+'"> 
'+startsWith+'<p class="ui-li-count" 
data-movie-starts-with-count="'+startsWith+'">1</p></a></li>').trigger("create");dividing=startsWith}else{$('[data-movie-starts-with-count="'+startsWith+'"]').text($('[data-movie-starts-with-count="'+startsWith+'"]').text()-
 -1)}}else{if(dividing=="-1"){$("#moviemainlist").append('<li><a 
href="#movies-overview" data-movie-starts-with="#">#</a><p class="ui-li-count" 
data-movie-starts-with-count="#">1</p></li>');dividing=startsWith}else{$('[data-movie-starts-with-count="#"]').text($('[data-movie-starts-with-count="#"]').text()-
 
-1)}}}));try{$("#moviemainlist").listview("refresh")}catch(a){}$("[data-movie-starts-with]").on("click",function(){localStorage.setItem("movie-starts-with",$(this).attr("data-movie-starts-with"))})},this),dataType:"json"})},showOverview:function(){var
 
a=localStorage.getItem("movie-starts-with");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetMovies",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetMovies", "params": { "limits": { "start": 
0}, "properties": ["thumbnail", "tagline", "title", "rating"], "sort": 
{"method": "sorttitle", "ignorearticle": true}}, "id": 
1}',success:jQuery.proxy(function(c){dividing="-1";$("#movielist").html("");$("#moviemainlist").html("");$.each($(c.result.movies),jQuery.proxy(function(d,e){startsWith=e.title.indexOf("The
 
")==0?e.title.substr(4,1):e.title.substr(0,1);stars="";for(d=0;d<10;d=d+2){if(d<Math.round(e.rating)){stars+='<img
 src="images/star.png" alt="Star" />'}else{stars+='<img 
src="images/star-gray.png" alt="Star" 
/>'}}if(a=="#"&&!isNaN(startsWith)){$("#movielist").append('<li><a 
href="#movies-details" data-movie-id="'+e.movieid+'"><img 
src="/vfs/'+e.thumbnail+'" alt="Thumnail" />'+e.title+"<br />"+stars+'<br 
/><span 
class="smallfont">'+e.tagline+"</span></a></li>").trigger("create")}else{if(startsWith.toUpperCase()==a){$("#movielist").append('<li><a
 href="#movies-details" data-movie-id="'+e.movieid+'"><img 
src="/vfs/'+e.thumbnail+'" alt="Thumnail" />'+e.title+"<br />"+stars+'<br 
/><span 
class="smallfont">'+e.tagline+"</span></a></li>").trigger("create")}}}));try{$("#movielist").listview("refresh")}catch(b){}$("[data-movie-id]").on("click",function(){localStorage.setItem("movie-id",$(this).attr("data-movie-id"))})},this),dataType:"json"})},showDetails:function(){var
 
a=localStorage.getItem("movie-id");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetMovies",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetMovieDetails", "params": { "movieid": 
'+a+', "properties": [ "genre", "director", "cast", "tagline", "plot", "title", 
"lastplayed", "runtime", "year", "playcount", "rating", "thumbnail" ]}, "id": 
1}',success:jQuery.proxy(function(b){startsWith=b.result.moviedetails.title.indexOf("The
 
")==0?b.result.moviedetails.title.substr(4,1):b.result.moviedetails.title.substr(0,1);$("#movie-details").html("");$("#movie-details").append('<li
 data-role="list-divider" 
id="movie-plot">Plot</li>');$("#movie-details").append('<li 
data-role="list-divider" 
id="movie-genres">Genres</li>');$("#movie-details").append('<li 
data-role="list-divider" 
id="movie-cast">Cast</li>');$("#movie-details").append('<li 
data-role="list-divider" 
id="movie-crew">Director</li>');$("#movie-details").append('<li 
data-role="list-divider" id="movie-info">More 
info</li>');$("#movie-details").append('<li data-role="list-divider" 
id="movie-actions">Actions</li>');$("#movie-title").text(b.result.moviedetails.title);$("#movie-plot").after("<li>"+b.result.moviedetails.plot+"</li>");$("#movie-genres").after(pwiUtils.split(b.result.moviedetails.genre));for(i=0;i<b.result.moviedetails.cast.length;i++){img=b.result.moviedetails.cast[i].thumbnail?"/vfs/"+b.result.moviedetails.cast[i].thumbnail:"images/unknown-actor.gif";$("#movie-cast").after('<li><img
 src="'+img+'" alt="Actor" />'+b.result.moviedetails.cast[i].name+'<br /><span 
class="smallfont">'+b.result.moviedetails.cast[i].role+"</span></li>")}$("#movie-crew").after(pwiUtils.split(b.result.moviedetails.director));$("#movie-info").after("<li>Released
 in "+b.result.moviedetails.year+"</li>");$("#movie-info").after("<li>Duration: 
"+b.result.moviedetails.runtime+" 
minutes</li>");$("#movie-actions").after('<li><span data-role="button" 
onclick="pwiMovies.playMovie();">Play 
movie</span></li>');$("#movie-details").listview("refresh");$("[data-role=button]").button()},this),dataType:"json"})},playMovie:function(){var
 
a=localStorage.getItem("movie-id");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?PlayMovie",data:'{"jsonrpc":
 "2.0", "method": "Player.Open", "params": { "item": { "movieid": '+a+' } }, 
"id": 1}',success:jQuery.proxy(function(b){},this),dataType:"json"})}};var 
pwiTvShows={showMain:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetTVShows",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetTVShows", "params": { "limits": { "start": 
0}, "properties": ["title"], "sort": {"method": "sorttitle", "ignorearticle": 
true}}, "id": 
1}',success:jQuery.proxy(function(b){dividing="-1";$("#tvshowmainlist").html("");$.each($(b.result.tvshows),jQuery.proxy(function(c,d){startsWith=d.title.indexOf("The
 
")==0?d.title.substr(4,1):d.title.substr(0,1);if(64<startsWith.charCodeAt(0)&&startsWith.charCodeAt(0)<91){if(startsWith!=dividing){$("#tvshowmainlist").append('<li><a
 href="#tvshows-overview" data-tvshow-starts-with="'+startsWith+'"> 
'+startsWith+'<p class="ui-li-count" 
data-tvshow-starts-with-count="'+startsWith+'">1</p></a></li>').trigger("create");dividing=startsWith}else{$('[data-tvshow-starts-with-count="'+startsWith+'"]').text($('[data-tvshow-starts-with-count="'+startsWith+'"]').text()-
 -1)}}else{if(dividing=="-1"){$("#tvshowmainlist").append('<li><a 
href="#tvshows-overview" data-tvshow-starts-with="#">#<p class="ui-li-count" 
data-tvshow-starts-with-count="#">1</p></a></li>');dividing=startsWith}else{$('[data-tvshow-starts-with-count="#"]').text($('[data-tvshow-starts-with-count="#"]').text()-
 
-1)}}}));try{$("#tvshowmainlist").listview("refresh")}catch(a){}$("[data-tvshow-starts-with]").on("click",function(){localStorage.setItem("tvshow-starts-with",$(this).attr("data-tvshow-starts-with"))})},this),dataType:"json"})},showOverview:function(){var
 
a=localStorage.getItem("tvshow-starts-with");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetTVShows",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetTVShows", "params": { "limits": { "start": 
0}, "properties": ["thumbnail", "title", "rating"], "sort": {"method": 
"sorttitle", "ignorearticle": true}}, "id": 
1}',success:jQuery.proxy(function(c){dividing="-1";$("#tvshowlist").html("");$.each($(c.result.tvshows),jQuery.proxy(function(e,f){startsWith=f.title.indexOf("The
 ")==0?f.title.substr(4,1):f.title.substr(0,1);var 
d="";for(e=0;e<10;e=e+2){if(e<Math.round(f.rating)){d+='<img 
src="images/star.png" alt="Star" />'}else{d+='<img src="images/star-gray.png" 
alt="Star" 
/>'}}if(a=="#"&&(65>startsWith.charCodeAt(0)||startsWith.charCodeAt(0)>91)){$("#tvshowlist").append('<li><a
 href="#tvshows-seasons" data-tvshow-id="'+f.tvshowid+'"><img 
src="/vfs/'+f.thumbnail+'" alt="Thumnail" />'+f.title+"<br 
/>"+d+"</li>").trigger("create")}else{if(startsWith.toUpperCase()==a){$("#tvshowlist").append('<li><a
 href="#tvshows-seasons" data-tvshow-id="'+f.tvshowid+'"><img 
src="/vfs/'+f.thumbnail+'" alt="Thumnail" />'+f.title+"<br 
/>"+d+"</li>").trigger("create")}}}));try{$("#tvshowlist").listview("refresh")}catch(b){}$("[data-tvshow-id]").on("click",function(){localStorage.setItem("tvshow-id",$(this).attr("data-tvshow-id"))})},this),dataType:"json"})},showSeasons:function(){var
 
a=localStorage.getItem("tvshow-id");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetSeasons",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetSeasons", "params": { "properties": [ 
"season", "showtitle"], "sort" : {"method": "sorttitle"}, "tvshowid" : '+a+' }, 
"id": 
1}',success:jQuery.proxy(function(c){$("#tvshowseasonslist").html("");$.each($(c.result.seasons),jQuery.proxy(function(d,e){$("#tvshowseasons-title").text(e.showtitle);startsWith=e.showtitle.indexOf("The
 
")==0?e.showtitle.substr(4,1):e.showtitle.substr(0,1);$("#tvshowseasonslist").append('<li><a
 href="#tvshows-episodes" 
data-tvshow-season="'+e.season+'">'+e.label+"</li>").trigger("create")}));try{$("#tvshowseasonslist").listview("refresh")}catch(b){}$("[data-tvshow-season]").on("click",function(){localStorage.setItem("tvshow-season",$(this).attr("data-tvshow-season"))})},this),dataType:"json"})},showEpisodes:function(){var
 b=localStorage.getItem("tvshow-id");var 
a=localStorage.getItem("tvshow-season");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetEpisodes",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetEpisodes", "params": { "properties": [ 
"title", "episode", "thumbnail", "playcount"], "sort" : {"method": "episode"}, 
"tvshowid" : '+b+', "season" : '+a+' }, "id": 
1}',success:jQuery.proxy(function(d){$("#tvshowepisodeslist").html("");$.each($(d.result.episodes),jQuery.proxy(function(e,f){$("#tvshowepisodes-title").text("Season
 "+a);seen=f.playcount>0?"Watched":"";$("#tvshowepisodeslist").append('<li><a 
href="#tvshows-episodes-details" data-tvshow-episode="'+f.episodeid+'"><img 
src="/vfs/'+f.thumbnail+'" alt="Thumnail" />'+f.episode+" - "+f.title+'<br 
/><span 
class="smallerfont">'+seen+"</span></li>").trigger("create")}));try{$("#tvshowepisodeslist").listview("refresh")}catch(c){}$("[data-tvshow-episode]").on("click",function(){localStorage.setItem("tvshow-episode",$(this).attr("data-tvshow-episode"))})},this),dataType:"json"})},showEpisodeDetails:function(){var
 
a=localStorage.getItem("tvshow-episode");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetEpisodeDetails",data:'{"jsonrpc":
 "2.0", "method": "VideoLibrary.GetEpisodeDetails", "params": { "episodeid": 
'+a+', "properties": [ "director", "cast", "plot", "title", "lastplayed", 
"runtime", "firstaired", "playcount", "rating", "thumbnail" ]}, "id": 
1}',success:jQuery.proxy(function(b){$("#episode-details").html("");$("#episode-details").append('<li
 data-role="list-divider" 
id="episode-plot">Plot</li>');$("#episode-details").append('<li 
data-role="list-divider" 
id="episode-cast">Cast</li>');$("#episode-details").append('<li 
data-role="list-divider" 
id="episode-crew">Director</li>');$("#episode-details").append('<li 
data-role="list-divider" id="episode-info">More 
info</li>');$("#episode-details").append('<li data-role="list-divider" 
id="episode-actions">Actions</li>');$("#episode-title").text(b.result.episodedetails.title);$("#episode-plot").after("<li>"+b.result.episodedetails.plot+"</li>");for(i=0;i<b.result.episodedetails.cast.length;i++){img=b.result.episodedetails.cast[i].thumbnail?"/vfs/"+b.result.episodedetails.cast[i].thumbnail:"images/unknown-actor.gif";$("#episode-cast").after('<li><img
 src="'+img+'" alt="Actor" />'+b.result.episodedetails.cast[i].name+'<br 
/><span 
class="smallfont">'+b.result.episodedetails.cast[i].role+"</span></li>")}$("#episode-crew").after(pwiUtils.split(b.result.episodedetails.director));$("#episode-info").after("<li>First
 aired on 
"+b.result.episodedetails.firstaired+"</li>");$("#episode-info").after("<li>Duration:
 "+b.result.episodedetails.runtime+" 
minutes</li>");$("#episode-actions").after('<li><span data-role="button" 
onclick="pwiTvShows.playEpisode('+a+');">Play 
episode</span></li>');$("#episode-details").listview("refresh");$("[data-role=button]").button()},this),dataType:"json"})},playEpisode:function(a){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?AddTvShowToPlaylist",data:'{"jsonrpc":
 "2.0", "method": "Player.Open", "params": { "item": { "episodeid": '+a+' } }, 
"id": 1}',success:jQuery.proxy(function(b){},this),dataType:"json"})}};var 
pwiMusic={showMain:function(){jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetArtists",data:'{"jsonrpc":
 "2.0", "method": "AudioLibrary.GetArtists", "params": { "limits": { "start": 
0}, "properties": [], "sort": {"method": "label", "ignorearticle": true}}, 
"id": 
1}',success:jQuery.proxy(function(b){dividing="-1";$("#musicmainlist").html("");$.each($(b.result.artists),jQuery.proxy(function(c,d){startsWith=d.label.indexOf("The
 ")==0?d.label.substr(4,1):d.label.indexOf("De 
")==0?d.label.substr(3,1):d.label.substr(0,1);startsWith=startsWith.toUpperCase();if(64<startsWith.charCodeAt(0)&&startsWith.charCodeAt(0)<91){if(startsWith!=dividing){$("#musicmainlist").append('<li><a
 href="#music-artists" data-artists-start-with="'+startsWith+'"> 
'+startsWith+'<p class="ui-li-count" 
data-artists-start-with-count="'+startsWith+'">1</p></a></li>').trigger("create");dividing=startsWith}else{$('[data-artists-start-with-count="'+startsWith+'"]').text($('[data-artists-start-with-count="'+startsWith+'"]').text()-
 -1)}}else{if(dividing=="-1"){$("#musicmainlist").append('<li><a 
href="#music-artists" data-artists-start-with="#">#<p class="ui-li-count" 
data-artists-start-with-count="#">1</p></a></li>');dividing=startsWith}else{$('[data-artists-start-with-count="#"]').text($('[data-artists-start-with-count="#"]').text()-
 
-1)}}}));try{$("#musicmainlist").listview("refresh")}catch(a){}$("[data-artists-start-with]").on("click",function(){localStorage.setItem("music-artists-start-with",$(this).attr("data-artists-start-with"))})},this),dataType:"json"})},showArtists:function(){var
 
a=localStorage.getItem("music-artists-start-with");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetArtists",data:'{"jsonrpc":
 "2.0", "method": "AudioLibrary.GetArtists", "params": { "limits": { "start": 
0}, "properties": [], "sort": {"method": "label", "ignorearticle": true}}, 
"id": 
1}',success:jQuery.proxy(function(c){$("#artistlist").html("");$.each($(c.result.artists),jQuery.proxy(function(d,e){startsWith=e.label.indexOf("The
 ")==0?e.label.substr(4,1):e.label.indexOf("De 
")==0?e.label.substr(3,1):e.label.substr(0,1);startsWith=startsWith.toUpperCase();if((a=="#"&&(65>startsWith.charCodeAt(0)||startsWith.charCodeAt(0)>91))||startsWith.toUpperCase()==a){$("#artistlist").append('<li><a
 href="#music-artists-songs" 
data-music-artist="'+e.artistid+'">'+e.label+"</li>").trigger("create")}}));try{$("#artistlist").listview("refresh")}catch(b){}$("[data-music-artist]").on("click",function(){localStorage.setItem("music-artist",$(this).attr("data-music-artist"))})},this),dataType:"json"})},showArtistSongs:function(){var
 
a=localStorage.getItem("music-artist");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?GetArtists",data:'{"jsonrpc":
 "2.0", "method": "AudioLibrary.GetSongs", "params": { "artistid": '+a+', 
"limits": { "start": 0}, "properties": ["artist", "title", "album", "duration", 
"thumbnail"], "sort": {"method": "title", "ignorearticle": true}}, "id": 
1}',success:jQuery.proxy(function(c){$("#songlist").html("");$.each($(c.result.songs),jQuery.proxy(function(d,e){$("#songs-title").text(e.artist);startsWith=e.artist.indexOf("The
 ")==0?e.artist.substr(4,1):e.artist.indexOf("De 
")==0?e.artist.substr(3,1):e.artist.substr(0,1);$("#songlist").append('<li><a 
href="javascript:pwiMusic.playSong();" data-music-song="'+e.songid+'"><img 
src="/vfs/'+e.thumbnail+'" alt="Thubnail" />'+e.title+'<br /><span 
class="smallfont">'+e.album+"</span></li>").trigger("create")}));try{$("#songlist").listview("refresh")}catch(b){}$("[data-music-song]").on("click",function(){localStorage.setItem("music-song",$(this).attr("data-music-song"))})},this),dataType:"json"})},playSong:function(){var
 
a=localStorage.getItem("music-song");jQuery.ajax({type:"POST",contentType:"application/json",url:pwiCore.JSON_RPC+"?AddSongToPlaylist",data:'{"jsonrpc":
 "2.0", "method": "Player.Open", "params": { "item": { "songid": '+a+' } }, 
"id": 1}',success:jQuery.proxy(function(b){},this),dataType:"json"})}};var 
pwiUtils={split:function(c){var b=c.split(" / ");var 
a="";for(i=0;i<b.length;i++){a+="<li>"+b[i]+"</li>"}return 
a},leadingZero:function(b){var a="0"+b;return 
a.substr(a.length-2)}};$(document).delegate(document,"pageshow",pwiCore.init);$(document).delegate("#home,
 #remote, 
#system","pageshow",pwiRemote.init);$(document).delegate("#movies-main","pageshow",pwiMovies.showMain);$(document).delegate("#movies-overview","pageshow",pwiMovies.showOverview);$(document).delegate("#movies-details","pageshow",pwiMovies.showDetails);$(document).delegate("#tvshows-main","pageshow",pwiTvShows.showMain);$(document).delegate("#tvshows-overview","pageshow",pwiTvShows.showOverview);$(document).delegate("#tvshows-seasons","pageshow",pwiTvShows.showSeasons);$(document).delegate("#tvshows-episodes","pageshow",pwiTvShows.showEpisodes);$(document).delegate("#tvshows-episodes-details","pageshow",pwiTvShows.showEpisodeDetails);$(document).delegate("#music-main","pageshow",pwiMusic.showMain);$(document).delegate("#music-artists","pageshow",pwiMusic.showArtists);$(document).delegate("#music-artists-songs","pageshow",pwiMusic.showArtistSongs);
\ No newline at end of file

-----------------------------------------------------------------------

Summary of changes:
 webinterface.pwi/addon.xml                     |    2 +-
 webinterface.pwi/changelog.txt                 |    3 +++
 webinterface.pwi/scripts/pimaxplus.xbmc.js     |   16 ++++++++++++++--
 webinterface.pwi/scripts/pimaxplus.xbmc.min.js |    2 +-
 4 files changed, 19 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Web Interfaces

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to