You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Editing movie details sometimes does not work. The result is not being saved.
When using the "edit" form for a specific movie, sometimes the saving of edited movie details fails without a warning. It looks like the edit is saved, but actually the changed values are not being stored. I did observe that when editing genres for movies, because that is what I mostly do there, but other details are not saved either if changed. It seems to me that this happens mostly with movies scraped from www.themoviedb.org. I suspect (due to the error message in the debug log) that this has to do with missing fanart. The movie I did the debugging with had no fanart.
Expected Behavior
If editing movied details and hitting save, the changed details should be stored in the database.
Actual Behavior
The details remain as is in the database. Also no error is produced in the web UI, so for normal users this behaviour seems inexplicable.
Manual editing in the database leads to the expected result (of course). As a workaround I can also add a fanart (Edit -> Background -> URL) first, and then change other details. Saving works again then.
Possible Fix
The VideoLibrary.SetMovieDetails method optionally takes a Media.Artwork.Set as a parameter.
Judging from the Kodi API documentation, the value of the property fanart in the Media.Artwork.Set is also optional, but if left out has to be null. Otherwise it has to be a non-empty string.
The relevant entries are in lines 1263 and 1378 (I tried the action twice during that debug session). This is the relevant excerpt:
2022-03-08 20:54:28.170 T:1283 DEBUG <CWebserver[8080]>: request received for /jsonrpc?VideoLibrary.SetMovieDetails 2022-03-08 20:54:28.170 T:1283 DEBUG <general>: JSONRPC: Incoming request: [{"jsonrpc":"2.0","method":"VideoLibrary.SetMovieDetails","params":{"movieid":1417,"title":"Van Halen - Live: Right Here, Right Now","plotoutline":"","plot":"Live: Right Here, Right Now. is the one and only live album by American hard rock band Van Halen, released in 1993. The album combines songs performed over two nights in May 1992 at the Selland Arena in Fresno, CA. The bulk of the songs on this album were from the first night, such as the solos performed by Eddie Van Halen and Sammy Hagar.","studio":["Warner Bros. Records"],"year":1993,"mpaa":"","rating":7.5,"imdbnumber":"tt0275766","sorttitle":"","originaltitle":"Van Halen - Live: Right Here, Right Now","director":["Mitchell Sinoway"],"writer":[],"genre":["Documentary-Concert"],"country":[],"set":"","tag":[],"trailer":"","fanart":"","art":{"fanart":"","poster":"image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fxWbfFPmkKuzU3WBJ6XN2zapYh1B.jpg/"}},"id":6}] 2022-03-08 20:54:28.171 T:1283 DEBUG <general>: JSONRPC: Value does not meet minLength requirements in type Global.String.NotEmpty 2022-03-08 20:54:28.171 T:1283 DEBUG <general>: JSONRPC: Invalid property "fanart" in type Media.Artwork.Set
Your Environment
Used Operating system:
Used browser(s): Firefox 97.0.2
Operating system version/name: Windows 10
Kodi version and platform: 19.3 / LibreElec 10 / RPi 4
Chorus2 version: 19.x-2.4.8
The text was updated successfully, but these errors were encountered:
splintering
changed the title
Editing movie details does not work when no fanart is present due to a wrongly submitted Media.Artwork.Set
Editing movie details does not work when no fanart is present, due to a wrongly submitted Media.Artwork.Set
Mar 10, 2022
Bug report
Describe the bug
Editing movie details sometimes does not work. The result is not being saved.
When using the "edit" form for a specific movie, sometimes the saving of edited movie details fails without a warning. It looks like the edit is saved, but actually the changed values are not being stored. I did observe that when editing genres for movies, because that is what I mostly do there, but other details are not saved either if changed. It seems to me that this happens mostly with movies scraped from www.themoviedb.org. I suspect (due to the error message in the debug log) that this has to do with missing fanart. The movie I did the debugging with had no fanart.
Expected Behavior
If editing movied details and hitting save, the changed details should be stored in the database.
Actual Behavior
The details remain as is in the database. Also no error is produced in the web UI, so for normal users this behaviour seems inexplicable.
Manual editing in the database leads to the expected result (of course). As a workaround I can also add a fanart (Edit -> Background -> URL) first, and then change other details. Saving works again then.
Possible Fix
The VideoLibrary.SetMovieDetails method optionally takes a Media.Artwork.Set as a parameter.
https://kodi.wiki/view/JSON-RPC_API/v12#VideoLibrary.SetMovieDetails
Judging from the Kodi API documentation, the value of the property fanart in the Media.Artwork.Set is also optional, but if left out has to be null. Otherwise it has to be a non-empty string.
https://kodi.wiki/view/JSON-RPC_API/v12#Media.Artwork.Set
As can be seen in the debug log, Chorus2 sends an empty string instead of a null value, which triggers the error.
art":{"fanart":"","poster":"image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fxWbfFPmkKuzU3WBJ6XN2zapYh1B.jpg/"}
I guess that is an implementation bug.
To Reproduce
Steps to reproduce the behavior:
Debuglog
The full debuglog can be found here: https://paste.kodi.tv/axetijowom
The relevant entries are in lines 1263 and 1378 (I tried the action twice during that debug session). This is the relevant excerpt:
2022-03-08 20:54:28.170 T:1283 DEBUG <CWebserver[8080]>: request received for /jsonrpc?VideoLibrary.SetMovieDetails
2022-03-08 20:54:28.170 T:1283 DEBUG <general>: JSONRPC: Incoming request: [{"jsonrpc":"2.0","method":"VideoLibrary.SetMovieDetails","params":{"movieid":1417,"title":"Van Halen - Live: Right Here, Right Now","plotoutline":"","plot":"Live: Right Here, Right Now. is the one and only live album by American hard rock band Van Halen, released in 1993. The album combines songs performed over two nights in May 1992 at the Selland Arena in Fresno, CA. The bulk of the songs on this album were from the first night, such as the solos performed by Eddie Van Halen and Sammy Hagar.","studio":["Warner Bros. Records"],"year":1993,"mpaa":"","rating":7.5,"imdbnumber":"tt0275766","sorttitle":"","originaltitle":"Van Halen - Live: Right Here, Right Now","director":["Mitchell Sinoway"],"writer":[],"genre":["Documentary-Concert"],"country":[],"set":"","tag":[],"trailer":"","fanart":"","art":{"fanart":"","poster":"image://https%3a%2f%2fimage.tmdb.org%2ft%2fp%2foriginal%2fxWbfFPmkKuzU3WBJ6XN2zapYh1B.jpg/"}},"id":6}]
2022-03-08 20:54:28.171 T:1283 DEBUG <general>: JSONRPC: Value does not meet minLength requirements in type Global.String.NotEmpty
2022-03-08 20:54:28.171 T:1283 DEBUG <general>: JSONRPC: Invalid property "fanart" in type Media.Artwork.Set
Your Environment
Used Operating system:
The text was updated successfully, but these errors were encountered: