2013-06-10, 10:18
Hello I'm Jandalf a very new Member, I would like to suggest a change to the JSON API because the actual SetMovieDetails request has very much overhead if you only want to update a single field in the movie table which has no relation to other tables (e.g. Rating). I can't code C++ and I know nearly nothing about Git and I don't know how you handle development here at XBMC but I'm now how to code in general and I would like to contribute to this great project.
I looked a bit into the json\videolibrary and the video\videodatabase class.
videolibrary handles the JSON requests and executes functions of videodatabase.
videodatabase executes direct SQL commands.
So the goal is to update single values the database tables without deleting anything.
So we may not update any linked fields, only fields with no relation to other tables
My suggestions:
for both a whitelist with fields that are not linked (and so do not the normal update process) is necessary.
Useful functions:
If everything is done all has to get adopted for tvshows and music.
And eventually do the same thing for other tables (e.g. watched flag in file table)
What do you think about it, is this idea useful and for which solution should I go?
Reference:
http://forum.xbmc.org/showthread.php?tid=166567
http://forum.xbmc.org/showthread.php?tid=162880
I looked a bit into the json\videolibrary and the video\videodatabase class.
videolibrary handles the JSON requests and executes functions of videodatabase.
videodatabase executes direct SQL commands.
So the goal is to update single values the database tables without deleting anything.
So we may not update any linked fields, only fields with no relation to other tables
My suggestions:
- add new UpdateMovieDetail to videolibrary
- change SetMovieDetails to update only single fields when useful
for both a whitelist with fields that are not linked (and so do not the normal update process) is necessary.
Useful functions:
- videodatabase.SetDetail (updates only one field)
- videodatabase.GetValueString (converts parameters to SQL)
- videodatabase.SetDetailsForMovie (last block)
If everything is done all has to get adopted for tvshows and music.
And eventually do the same thing for other tables (e.g. watched flag in file table)
What do you think about it, is this idea useful and for which solution should I go?
Reference:
http://forum.xbmc.org/showthread.php?tid=166567
http://forum.xbmc.org/showthread.php?tid=162880