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

Editing movie details does not work when no fanart is present, due to a wrongly submitted Media.Artwork.Set #457

Open
splintering opened this issue Mar 10, 2022 · 0 comments
Labels

Comments

@splintering
Copy link

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:

  1. Go to a specific movie which has no fanart stored.
  2. Hit "Edit", change any text details like genre or description.
  3. Hit "Save". The movie page seems to be updated accordingly, but that happens only locally in the browser.
  4. Reload the movie page and observe how the changed value changes back to the original value.

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:

  • 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
@splintering 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
@malard malard added the bug label Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants