diff options
author | thlo <smarttv640@gmail.com> | 2013-05-01 18:21:27 +0200 |
---|---|---|
committer | thlo <t.lohmar@gmx.de> | 2013-05-01 18:21:27 +0200 |
commit | eb44d51a9fdfc9be5a9b069b5bf5f45d93262504 (patch) | |
tree | c3c740dee0f1b977a098f688825b76606d3ab39f /smarttv-client/Javascript/Main.js | |
parent | 1f80c9528c5b83de6b301a1e845b2ed5b425bc30 (diff) | |
download | vdr-plugin-smarttvweb-eb44d51a9fdfc9be5a9b069b5bf5f45d93262504.tar.gz vdr-plugin-smarttvweb-eb44d51a9fdfc9be5a9b069b5bf5f45d93262504.tar.bz2 |
Widget v0.94
isNew indicator
delete YT URLs
Notification, when a recording is started / stopped
Notification, when a timer is added / deleted
HTTP based configuration.
Diffstat (limited to 'smarttv-client/Javascript/Main.js')
-rwxr-xr-x | smarttv-client/Javascript/Main.js | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/smarttv-client/Javascript/Main.js b/smarttv-client/Javascript/Main.js index 2581074..aa33217 100755 --- a/smarttv-client/Javascript/Main.js +++ b/smarttv-client/Javascript/Main.js @@ -61,11 +61,21 @@ var Main = { menuKeyHndl : null
};
+$(document).unload(function(){
+ Main.onUnload ();
+});
+
+Main.onUnload = function() {
+ Server.notifyServer("stopped");
+ Player.deinit();
+};
+
$(document).ready(function(){
Main.onLoad ();
});
Main.onLoad = function() {
+
window.onShow = showHandler;
window.onshow = showHandler;
@@ -166,7 +176,6 @@ Main.init = function () { HeartbeatHandler.start();
Server.updateVdrStatus();
-// Server.notifyServer("started");
DirectAccess.init();
Config.getWidgetVersion();
@@ -187,11 +196,11 @@ Main.init = function () { Main.logToServer (xmlDoc);
}
-*/ /*
- *
- Read widget conf. find the file to log
+*/
+// Read widget conf. find the file to log
+/*
xhttp=new XMLHttpRequest();
- xhttp.open("GET","$MANAGER_WIDGET/Common/webapi/1.0/webapis.js",false);
+ xhttp.open("GET","$MANAGER_WIDGET/Common/webapi/1.0/deviceapis.js",false);
xhttp.send("");
xmlDoc=xhttp.responseText;
Main.logToServer (xmlDoc);
@@ -220,10 +229,6 @@ Main.logToServer = function (msg) { */
};
-Main.onUnload = function() {
- Server.notifyServer("stopped");
- Player.deinit();
-};
Main.testUrls = function () {
Main.log("################## Main.testUrls");
@@ -318,11 +323,14 @@ Main.liveSelected = function() { };
Main.recordingsSelected = function() {
+
Server.retries = 0;
Player.stopCallback = function() {
Display.show();
- Server.saveResume ();
Data.getCurrentItem().childs[Main.selectedVideo].payload.isnew = "false";
+ var res = Display.getDisplayTitle (Data.getCurrentItem().childs[Main.selectedVideo]);
+ Display.setVideoItem(Display.videoList[Display.currentWindow +Display.FIRSTIDX], res);
+ Server.saveResume ();
};
Server.errorCallback = Main.serverError;
@@ -370,7 +378,7 @@ Main.urlsSelected = function() { Display.showPopup(msg);
Main.changeState(0);
};
- Server.setSort(true);
+ Server.setSort(false);
Spinner.show();
UrlsFetcher.fetchUrlList();
};
@@ -1061,6 +1069,22 @@ cMenuKeyHndl.prototype.handleKeyDown = function (event) { }
break;
+
+ case tvKey.KEY_YELLOW:
+ if (Main.state == Main.eURLS) {
+ Buttons.ynShow();
+ }
+ break;
+ case tvKey.KEY_BLUE:
+ if (Main.state == Main.eREC) {
+ //change sorting
+ Spinner.show();
+ Data.nextSortType();
+ Main.selectedVideo = 0;
+ Display.setVideoList(Main.selectedVideo, Main.selectedVideo);
+ Spinner.hide();
+ }
+ break;
case tvKey.KEY_RIGHT:
Main.log("Right");
|