diff --git a/alarm/kodi-rpi-git/0002-Revert-jsonrpc-remove-ambiguous-and-duplicate-Player.patch b/alarm/kodi-rpi-git/0002-Revert-jsonrpc-remove-ambiguous-and-duplicate-Player.patch new file mode 100644 index 000000000..29753e797 --- /dev/null +++ b/alarm/kodi-rpi-git/0002-Revert-jsonrpc-remove-ambiguous-and-duplicate-Player.patch @@ -0,0 +1,63 @@ +From 88b3174bdc47bfa7fb0e798ef0d01cd0bdf8e734 Mon Sep 17 00:00:00 2001 +From: graysky +Date: Tue, 29 Dec 2020 14:42:12 -0500 +Subject: [PATCH] Revert "[jsonrpc] remove ambiguous and duplicate Player.Seek + options" + +This reverts commit 3801ec4b07d74c81d830c83c799ae90228c5cf2e. +--- + xbmc/interfaces/json-rpc/PlayerOperations.cpp | 14 +++++++------- + xbmc/interfaces/json-rpc/schema/methods.json | 3 +++ + 2 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/xbmc/interfaces/json-rpc/PlayerOperations.cpp b/xbmc/interfaces/json-rpc/PlayerOperations.cpp +index 8572736bef..d472a6951f 100644 +--- a/xbmc/interfaces/json-rpc/PlayerOperations.cpp ++++ b/xbmc/interfaces/json-rpc/PlayerOperations.cpp +@@ -401,11 +401,11 @@ JSONRPC_STATUS CPlayerOperations::Seek(const std::string &method, ITransportLaye + return FailedToExecute; + + const CVariant& value = parameterObject["value"]; +- if (value.isMember("percentage")) +- g_application.SeekPercentage(value["percentage"].asFloat()); +- else if (value.isMember("step")) ++ if (IsType(value, NumberValue) || value.isMember("percentage")) ++ g_application.SeekPercentage(IsType(value, NumberValue) ? value.asFloat() : value["percentage"].asFloat()); ++ else if (value.isString() || value.isMember("step")) + { +- std::string step = value["step"].asString(); ++ std::string step = value.isString() ? value.asString() : value["step"].asString(); + if (step == "smallforward") + CBuiltins::GetInstance().Execute("playercontrol(smallskipforward)"); + else if (step == "smallbackward") +@@ -417,10 +417,10 @@ JSONRPC_STATUS CPlayerOperations::Seek(const std::string &method, ITransportLaye + else + return InvalidParams; + } +- else if (value.isMember("seconds")) ++ else if (value.isMember("seconds") && value.size() == 1) + g_application.GetAppPlayer().GetSeekHandler().SeekSeconds(static_cast(value["seconds"].asInteger())); +- else if (value.isMember("time")) +- g_application.SeekTime(ParseTimeInSeconds(value["time"])); ++ else if (value.isObject()) ++ g_application.SeekTime(ParseTimeInSeconds(value.isMember("time") ? value["time"] : value)); + else + return InvalidParams; + +diff --git a/xbmc/interfaces/json-rpc/schema/methods.json b/xbmc/interfaces/json-rpc/schema/methods.json +index d23ad943d7..a2e2927b2a 100644 +--- a/xbmc/interfaces/json-rpc/schema/methods.json ++++ b/xbmc/interfaces/json-rpc/schema/methods.json +@@ -295,6 +295,9 @@ + "params": [ + { "name": "playerid", "$ref": "Player.Id", "required": true }, + { "name": "value", "required": true, "type": [ ++ { "$ref": "Player.Position.Percentage", "required": true, "description": "Percentage value to seek to" }, ++ { "$ref": "Player.Position.Time", "required": true, "description": "Time to seek to" }, ++ { "type": "string", "enum": [ "smallforward", "smallbackward", "bigforward", "bigbackward" ], "required": true, "description": "Seek by predefined jumps" }, + { "type": "object", "properties": { "percentage": { "$ref": "Player.Position.Percentage", "required": true, "description": "Percentage value to seek to" } }, "additionalProperties": false, "required": true }, + { "type": "object", "properties": { "time": { "$ref": "Player.Position.Time", "required": true, "description": "Time to seek to" } }, "additionalProperties": false, "required": true }, + { "type": "object", "properties": { "step": { "type": "string", "enum": [ "smallforward", "smallbackward", "bigforward", "bigbackward" ], "required": true, "description": "Seek by predefined jumps" } }, "additionalProperties": false, "required": true }, +-- +2.30.0 + diff --git a/alarm/kodi-rpi-git/PKGBUILD b/alarm/kodi-rpi-git/PKGBUILD index fa8bc112d..022991c2b 100644 --- a/alarm/kodi-rpi-git/PKGBUILD +++ b/alarm/kodi-rpi-git/PKGBUILD @@ -17,7 +17,7 @@ _commitnumber=56840 _commit=579551ef130f80963a857f0af3a2a984b112d26c pkgver="19.0b2.$_commitnumber.${_commit:0:10}" -pkgrel=2 +pkgrel=3 arch=('armv7h') url="https://github.com/popcornmix/xbmc/tree/gbm" license=('GPL2') @@ -73,6 +73,7 @@ source=( tmpfiles.conf 0000-use-mcpu-avoiding-march-and-mtune.patch 0001-mcpu-cortex-a72-for-RPi4-application-to-ffmpeg.patch + 0002-Revert-jsonrpc-remove-ambiguous-and-duplicate-Player.patch ) backup=(boot/kodi.config.txt) noextract=( @@ -116,6 +117,10 @@ prepare() { # patch kodi build system to apply the patch we just copied over patch -Np1 -i ../0001-mcpu-cortex-a72-for-RPi4-application-to-ffmpeg.patch + + # this causes issues for the official iOS app which are not yet addressed + # see: https://github.com/xbmc/Official-Kodi-Remote-iOS/issues/95 + patch -Np1 -i ../0002-Revert-jsonrpc-remove-ambiguous-and-duplicate-Player.patch } build() {