Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jsonrpc] set movie collection plots and get/set season titles #14523

Merged
merged 2 commits into from Oct 20, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -644,6 +644,8 @@ JSONRPC_STATUS CVideoLibrary::SetSeasonDetails(const std::string &method, ITrans
std::set<std::string> removedArtwork;
std::set<std::string> updatedDetails;
UpdateVideoTag(parameterObject, infos, artwork, removedArtwork, updatedDetails);
if (ParameterNotNull(parameterObject, "title"))
infos.SetSortTitle(parameterObject["title"].asString());

This comment has been minimized.

Copy link
@Razzeee

Razzeee Oct 17, 2018

Member

Should probably be SetTitle to be consistent with the code paths

This comment has been minimized.

Copy link
@rmrector

rmrector Oct 17, 2018

Author Contributor

This matches the existing implementation from #6041, should I change the way season title works in the rest of the code?

This comment has been minimized.

Copy link
@Razzeee

Razzeee Oct 18, 2018

Member

Keep it like it is, and let's move this forward this way. We will see if problems appear.
When I get some time I will look at why we're setting this and if this is an oversight.

Then again, this is about setting it from the outside and it might be very confusing for an api, if you try to set title and it get's set to sorttitle. While setting sorttitle will do nothing.

This comment has been minimized.

Copy link
@rmrector

rmrector Oct 18, 2018

Author Contributor

I'm up for changing it elsewhere, I wanted to confirm expanding the scope of the PR a bit beyond the JSON-RPC layer before I did.

sorttitle is not an option for seasons over JSON-RPC so either way the outside interface is the same, it's just some internal behavior that calls it sort title.

This comment has been minimized.

Copy link
@DaveTBlake

DaveTBlake Oct 19, 2018

Member

If kept like it is then it is possible to get this into v18 (additions to API acceptable under beta, will freeze API at RC) and further changes could then be in another PR for v19. It all depends how quickly this is wanted.

This comment has been minimized.

Copy link
@rmrector

rmrector Oct 19, 2018

Author Contributor

I'd say we're good as-is, then.


if (videodatabase.SetDetailsForSeason(infos, artwork, infos.m_iIdShow, id) <= 0)
return InternalError;
@@ -1540,7 +1540,8 @@
"params": [
{ "name": "setid", "$ref": "Library.Id", "required": true },
{ "name": "title", "$ref": "Optional.String" },
{ "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null }
{ "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null },
{ "name": "plot", "$ref": "Optional.String" }
],
"returns": "string"
},
@@ -1586,7 +1587,8 @@
"params": [
{ "name": "seasonid", "$ref": "Library.Id", "required": true },
{ "name": "art", "type": [ "null", { "$ref": "Media.Artwork.Set", "required": true } ], "default": null },
{ "name": "userrating", "$ref": "Optional.Integer" }
{ "name": "userrating", "$ref": "Optional.Integer" },
{ "name": "title", "$ref": "Optional.String" }
],
"returns": "string"
},
@@ -689,7 +689,7 @@
"extends": "Item.Fields.Base",
"items": { "type": "string",
"enum": [ "season", "showtitle", "playcount", "episode", "fanart", "thumbnail", "tvshowid",
"watchedepisodes", "art", "userrating" ]
"watchedepisodes", "art", "userrating", "title" ]
}
},
"Video.Fields.Episode": {
@@ -884,7 +884,8 @@
"episode": { "type": "integer" },
"watchedepisodes": { "type": "integer" },
"tvshowid": { "$ref": "Library.Id" },
"userrating": { "type": "integer" }
"userrating": { "type": "integer" },
"title": { "type": "string" }
}
},
"Video.Details.Episode": {
@@ -1 +1 @@
JSONRPC_VERSION 9.6.1
JSONRPC_VERSION 9.7.0
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.