summaryrefslogtreecommitdiff
path: root/smarttv-client/Javascript/Epg.js
diff options
context:
space:
mode:
Diffstat (limited to 'smarttv-client/Javascript/Epg.js')
-rw-r--r--smarttv-client/Javascript/Epg.js41
1 files changed, 41 insertions, 0 deletions
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