Skip to content

Commit

Permalink
fix jsonrpc
Browse files Browse the repository at this point in the history
  • Loading branch information
Montellese committed Apr 9, 2015
1 parent 1a25691 commit 0d18c4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbmc/interfaces/json-rpc/PlayerOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,10 @@ JSONRPC_STATUS CPlayerOperations::Seek(const std::string &method, ITransportLaye

const CVariant& value = parameterObject["value"];
if (IsType(value, NumberValue) ||
(value.isObject() && value.isMember("percentage")))
(value.isObject() && value.isMember("percentage")))
g_application.SeekPercentage(IsType(value, NumberValue) ? value.asFloat() : value["percentage"].asFloat());
else if (value.isString() ||
(value.isObject() && value.isMember("step")))
(value.isObject() && value.isMember("step")))
{
std::string step = value.isString() ? value.asString() : value["step"].asString();
if (step == "smallforward")
Expand All @@ -416,7 +416,7 @@ JSONRPC_STATUS CPlayerOperations::Seek(const std::string &method, ITransportLaye
else
return InvalidParams;
}
else if (value.isObject() && value.isMember("seconds"))
else if (value.isObject() && value.isMember("seconds") && value.size() == 1)
CSeekHandler::Get().SeekSeconds(static_cast<int>(value["seconds"].asInteger()));
else if (value.isObject())
g_application.SeekTime(ParseTimeInSeconds(value.isMember("time") ? value["time"] : value));
Expand Down

0 comments on commit 0d18c4d

Please sign in to comment.