diff options
author | thlo <smarttv640@gmail.com> | 2013-07-24 20:32:03 +0200 |
---|---|---|
committer | thlo <t.lohmar@gmx.de> | 2013-07-24 20:32:03 +0200 |
commit | 0ecc9a2ca4c3604ef2590fef5b3072417689a7d3 (patch) | |
tree | 3e8d88ad1c84e9f537d1fa8853ddd00f200760d0 /smarttv-client/Javascript/Epg.js | |
parent | d8688559455cc3cd86f41e816568d099f07f3800 (diff) | |
download | vdr-plugin-smarttvweb-0ecc9a2ca4c3604ef2590fef5b3072417689a7d3.tar.gz vdr-plugin-smarttvweb-0ecc9a2ca4c3604ef2590fef5b3072417689a7d3.tar.bz2 |
Widget updates:
- Multi-Server Support
- Number key personalization for recordings
- Timezone fix
- Fix in YouTube Handling
- Fix in Helpbar
- Other misc fixes
Diffstat (limited to 'smarttv-client/Javascript/Epg.js')
-rw-r--r-- | smarttv-client/Javascript/Epg.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/smarttv-client/Javascript/Epg.js b/smarttv-client/Javascript/Epg.js index e6bfdd6..87325a8 100644 --- a/smarttv-client/Javascript/Epg.js +++ b/smarttv-client/Javascript/Epg.js @@ -161,6 +161,7 @@ Epg.parseResponse = function (message,text, XHR) { entry.prog = $(this).find("title").text();
entry.desc = $(this).find("desc").text();
entry.start = parseInt($(this).find("start").text());
+ entry.eventid= parseInt($(this).find("eventid").text());
entry.dur = (parseInt($(this).find("end").text()) - parseInt($(this).find("start").text()));
Main.log("Epg.parseResponse : Guid= "+ guid + " title= " + entry.prog+ " start= " +entry.start + " dur= " + entry.dur);
@@ -188,4 +189,39 @@ Epg.parseResponse = function (message,text, XHR) { });
};
+Epg.getCurrentEvent4Rec = function (guid) {
+ var url = Config.serverUrl + "/epg.xml?id=" + guid;
+
+ Main.log("Epg.getCurrentEpg: guid= " + guid + " and url= " + url);
+ $.ajax({
+ type: "GET",
+ async: true,
+ url: url,
+ success: function(data, status, XHR ) {
+ $(message).find("programme").each(function(){
+ var guid = $(this).find("guid").text();
+ if (guid != Epg.curGuid) {
+ Main.logToServer("ERROR in Epg.parseResponse : Guid (="+ guid + ") != Epg.curGuid (=" + Epg.curGuid+ ") " );
+ }
+
+ entry={};
+ entry.prog = $(this).find("title").text();
+ entry.desc = $(this).find("desc").text();
+ entry.start = parseInt($(this).find("start").text());
+ entry.eventid= parseInt($(this).find("eventid").text());
+ entry.dur = (parseInt($(this).find("end").text()) - parseInt($(this).find("start").text()));
+
+ Main.log("Epg.getCurrentEpg : Guid= "+ guid + " title= " + entry.prog+ " start= " +entry.start + " dur= " + entry.dur);
+
+ // thlo: here I should invoke the rec command
+ // then I should switch to recording playback (new state?).
+
+ });
+
+ },
+ error: function (jqXHR, status, error) {
+
+ }
+ });
+};
|