alarm/kodi-rpi-git to 19.0rc1.57039.46685b10c7-2

This commit is contained in:
graysky 2021-02-06 16:18:24 -05:00
parent cc8be7da28
commit 19fecb0792
2 changed files with 1 additions and 69 deletions

View file

@ -1,63 +0,0 @@
From 88b3174bdc47bfa7fb0e798ef0d01cd0bdf8e734 Mon Sep 17 00:00:00 2001
From: graysky <graysky@archlinux.us>
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<int>(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

View file

@ -17,7 +17,7 @@ _commitnumber=57039
_commit=46685b10c76b523eac8f38119c4705b618213235
pkgver="19.0rc1.$_commitnumber.${_commit:0:10}"
pkgrel=1
pkgrel=2
arch=('armv7h' 'aarch64')
url="https://github.com/popcornmix/xbmc/tree/gbm"
license=('GPL2')
@ -73,7 +73,6 @@ source=(
tmpfiles.conf
use-mcpu-avoiding-march-and-mtune.patch
0001-mcpu-cortex-application-to-ffmpeg.patch
0002-Revert-jsonrpc-remove-ambiguous-and-duplicate-Player.patch
)
backup=(boot/kodi.config.txt)
noextract=(
@ -118,10 +117,6 @@ prepare() {
# patch kodi build system to apply the patch we just copied over
patch -Np1 -i ../0001-mcpu-cortex-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() {