From 285bc328b330f69f211f21d20cd6ba0c2e01a7c2 Mon Sep 17 00:00:00 2001 From: evantaur Date: Tue, 6 Jul 2021 21:23:57 +0300 Subject: [PATCH 1/4] Add files via upload Fixed seek --- js/remote.js | 2 +- js/xbmc-helper.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/remote.js b/js/remote.js index 50be62e..e6544e4 100755 --- a/js/remote.js +++ b/js/remote.js @@ -57,7 +57,7 @@ function seek(playerId, timeInSeconds) { var minutes = Math.floor((timeInSeconds % 3600) / 60); var seconds = Math.floor((timeInSeconds % 3600) % 60); - var seek = '{"jsonrpc":"2.0", "method":"Player.Seek", "params":{"playerid":' + playerId + ', "value":{"hours":' + hours + ', "minutes":' + minutes + ', "seconds":' + seconds + '}},"id":1}'; + var seek = `{"jsonrpc":"2.0","method":"Player.Seek","params":[${playerId},{"time":{"hours":${hours},"minutes":${minutes},"seconds":${seconds}}}],"id":1}` ajaxPost(seek, function() {}); } diff --git a/js/xbmc-helper.js b/js/xbmc-helper.js index e6f8186..7363dc8 100755 --- a/js/xbmc-helper.js +++ b/js/xbmc-helper.js @@ -3,7 +3,7 @@ * curl -i -X POST --header Content-Type:"application/json" -d '' http://localhost:8085/jsonrpc */ -var debugLogsEnabled = localStorage[storageKeys.enableDebugLogs] == 'true'; +var debugLogsEnabled = true; //localStorage[storageKeys.enableDebugLogs] == 'true'; function getSiteName(url) { if (url.match("magnet:")) { @@ -21,7 +21,7 @@ function getPluginPath(url, callback) { if (module.canHandleUrl(url)) { foundModule = true; if (debugLogsEnabled) console.log("Found module to handle url: " + url); - + chrome://extensions/ module.getPluginPath(url, getAddOnVersion, function(path) { if (debugLogsEnabled) console.log("Path to play media: " + path); callback(module.getMediaType(), path); @@ -294,7 +294,7 @@ function playerSeek(value) { var seconds = Math.floor((value % 3600) % 60); getActivePlayerId(function (playerid) { if (playerid != null) { - var playerseek = '{"jsonrpc":"2.0", "method":"Player.Seek", "params":{"playerid":' + playerid + ', "value":{"hours":' + hours + ', "minutes":' + minutes + ', "seconds":' + seconds + '}},"id":1}'; + var seek = `{"jsonrpc":"2.0","method":"Player.Seek","params":[${playerId},{"time":{"hours":${hours},"minutes":${minutes},"seconds":${seconds}}}],"id":1}` ajaxPost(playerseek, function () { onChangeUpdate(); }); From f07bc8d13326163fa090a3b7978e14669ebbe274 Mon Sep 17 00:00:00 2001 From: evantaur Date: Tue, 6 Jul 2021 21:25:05 +0300 Subject: [PATCH 2/4] Add files via upload Fixed seek --- js/xbmc-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/xbmc-helper.js b/js/xbmc-helper.js index 7363dc8..6a9432a 100755 --- a/js/xbmc-helper.js +++ b/js/xbmc-helper.js @@ -3,7 +3,7 @@ * curl -i -X POST --header Content-Type:"application/json" -d '' http://localhost:8085/jsonrpc */ -var debugLogsEnabled = true; //localStorage[storageKeys.enableDebugLogs] == 'true'; +var debugLogsEnabled = localStorage[storageKeys.enableDebugLogs] == 'true'; function getSiteName(url) { if (url.match("magnet:")) { From 48c92512456c31ced49ff500225c3ddd4ce35376 Mon Sep 17 00:00:00 2001 From: evantaur Date: Tue, 6 Jul 2021 21:26:03 +0300 Subject: [PATCH 3/4] Add files via upload Fixed seek --- js/xbmc-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/xbmc-helper.js b/js/xbmc-helper.js index 6a9432a..b112495 100755 --- a/js/xbmc-helper.js +++ b/js/xbmc-helper.js @@ -21,7 +21,7 @@ function getPluginPath(url, callback) { if (module.canHandleUrl(url)) { foundModule = true; if (debugLogsEnabled) console.log("Found module to handle url: " + url); - chrome://extensions/ + module.getPluginPath(url, getAddOnVersion, function(path) { if (debugLogsEnabled) console.log("Path to play media: " + path); callback(module.getMediaType(), path); From 953a100389ccd24bd9313610e1ad3e07a5a458f4 Mon Sep 17 00:00:00 2001 From: evantaur Date: Tue, 6 Jul 2021 21:27:46 +0300 Subject: [PATCH 4/4] Add files via upload --- js/xbmc-helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/xbmc-helper.js b/js/xbmc-helper.js index b112495..ea9b175 100755 --- a/js/xbmc-helper.js +++ b/js/xbmc-helper.js @@ -21,7 +21,7 @@ function getPluginPath(url, callback) { if (module.canHandleUrl(url)) { foundModule = true; if (debugLogsEnabled) console.log("Found module to handle url: " + url); - + module.getPluginPath(url, getAddOnVersion, function(path) { if (debugLogsEnabled) console.log("Path to play media: " + path); callback(module.getMediaType(), path); @@ -294,7 +294,7 @@ function playerSeek(value) { var seconds = Math.floor((value % 3600) % 60); getActivePlayerId(function (playerid) { if (playerid != null) { - var seek = `{"jsonrpc":"2.0","method":"Player.Seek","params":[${playerId},{"time":{"hours":${hours},"minutes":${minutes},"seconds":${seconds}}}],"id":1}` + var playerseek = `{"jsonrpc":"2.0","method":"Player.Seek","params":[${playerId},{"time":{"hours":${hours},"minutes":${minutes},"seconds":${seconds}}}],"id":1}` ajaxPost(playerseek, function () { onChangeUpdate(); });