From 1f5fd1308b4518826408342f94d99ab6e10a4a71 Mon Sep 17 00:00:00 2001 From: thlo Date: Sun, 13 Jan 2013 21:28:52 +0100 Subject: Various changes: Folder Support for Live, Spinner, Keyboard, etc --- smarttv-client/Javascript/Epg.js | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 smarttv-client/Javascript/Epg.js (limited to 'smarttv-client/Javascript/Epg.js') diff --git a/smarttv-client/Javascript/Epg.js b/smarttv-client/Javascript/Epg.js new file mode 100644 index 0000000..c400e0e --- /dev/null +++ b/smarttv-client/Javascript/Epg.js @@ -0,0 +1,41 @@ +/* + * Principle: One monitor for each channel + * Nur max 20 + * Oder einer: + * Search once through all entries and look for the lowest expiry. + * Set a timer to update the entry + * check, whether the entry is "on screen" + * +*/ + +var Epg = { + restfulUrl : "" + +}; + +// Should be called after initial config +Epg.init = function () { + if (Config.serverUrl == "") + return; + if (Config.serverUrl.indexOf(':') != -1) { + Main.log ("Epg: Serverurl= " + Config.serverUrl); + this.restfulUrl = Config.serverUrl.splice(0, Config.serverUrl.indexOf(':')) + ":8002"; + } + + Main.log ("Restful API Url= "+ this.restfulUrl); + + $.ajax({ + type: "HEAD", + async: true, + url: this.restfulUrl + "channels.xml", + success: function(message,text,response){ + Main.log("AJAX Response: MSG= " + message + " txt= " + text + " resp= " + response); + } + }); +}; + +Epg.startEpgUpdating = function() { + + var res = Data.findEpgUpdateTime(); + Main.log("GUID= " + res.guid + " Min= " + res.min); +}; \ No newline at end of file -- cgit v1.2.3