summaryrefslogtreecommitdiff
path: root/smarttv-client/Javascript/Server.js
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2013-08-27 22:08:08 +0200
committerthlo <t.lohmar@gmx.de>2013-08-27 22:08:08 +0200
commit611fd0079284be330812e9eb44a43304c42387fe (patch)
tree7884c091d5b94731781b1ff9be587b26c5131f0c /smarttv-client/Javascript/Server.js
parent616c3e41b03f39799abe0c9e27922a196fadf70d (diff)
downloadvdr-plugin-smarttvweb-611fd0079284be330812e9eb44a43304c42387fe.tar.gz
vdr-plugin-smarttvweb-611fd0079284be330812e9eb44a43304c42387fe.tar.bz2
New Overlay Menu for RecCmd Handling
Make YouTube entry optional (Select Screen option is configurable through widget.conf) First 3D iter function for 3D TVs and 3D BDs.
Diffstat (limited to 'smarttv-client/Javascript/Server.js')
-rwxr-xr-xsmarttv-client/Javascript/Server.js58
1 files changed, 57 insertions, 1 deletions
diff --git a/smarttv-client/Javascript/Server.js b/smarttv-client/Javascript/Server.js
index 660230a..8c696b7 100755
--- a/smarttv-client/Javascript/Server.js
+++ b/smarttv-client/Javascript/Server.js
@@ -175,7 +175,7 @@ Server.updateVdrStatus = function (){
// if Config.tzCorrection larger zero, then TV is ahead
// thus, I need to substract Config.tzCorrection from the TV time
// Config.tzCorrection = 1;
- Main.logToServer("Server.updateVdrStatu: tzCor= " + Config.tzCorrection);
+ Main.logToServer("Server.updateVdrStatus: tzCor= " + Config.tzCorrection);
}
else
Main.logToServer("tzCor WARNING");
@@ -319,6 +319,62 @@ Server.notifyServer = function (state) {
});
};
+Server.fetchRecCmdsList = function() {
+ var url = Config.serverUrl + "/reccmds.xml";
+ $.ajax({
+ url: url,
+ type : "GET",
+ success : function(data, status, XHR ) {
+ Main.logToServer("Server.fetchRecCmdsList Success Response - status= " + status + " mime= " + XHR.responseType + " data= "+ data);
+
+ $(data).find("item").each(function () {
+ var title = $(this).text();
+ var confirm = (($(this).attr("confirm") == "true") ? true : false);
+ var cmd = parseInt($(this).attr("cmd"));
+
+ var title_list = title.split("~");
+ RecCmds.addItem( title_list, {cmd : cmd, confirm: confirm });
+ }); // each
+
+/* if (Server.dataReceivedCallback) {
+ Server.dataReceivedCallback();
+ }
+*/
+// RecCmds.dumpFolderStruct();
+ RecCmds.completed();
+ RecCmdHandler.createRecCmdOverlay();
+ },
+ error : function (jqXHR, status, error) {
+ Main.logToServer("Server.fetchRecCmdsList Error Response - status= " + status + " error= "+ error);
+ Display.showPopup("Error with XML File: " + status);
+ },
+ parsererror : function () {
+ Main.logToServer("Server.fetchRecCmdsList parserError " );
+ Display.showPopup("Error in XML File");
+/* if (Server.errorCallback != null) {
+ Server.errorCallback("XmlError");
+ }
+*/
+ }
+ });
+};
+
+Server.execRecCmd = function (cmd, guid) {
+ var url = Config.serverUrl + "/execreccmd?cmd="+cmd+"&guid=" + guid;
+
+ Main.logToServer("Server.execRecCmd cmd="+cmd+" guid=" + guid + " url= " + url);
+ $.ajax({
+ url: url,
+ type : "GET",
+ success : function(data, status, XHR ) {
+ Main.logToServer("Server.execRecCmd OK" ) ;
+ Display.handleDescription(Main.selectedVideo);
+ },
+ error : function (XHR, status, error) {
+ Main.logToServer("Server.execRecCmd failed" ) ;
+ }
+ });
+};
var HeartbeatHandler = {
timeoutObj : null,