Posts: 101
Joined: Sep 2012
Reputation:
0
I have a question about the way XBMC does updates. Say I have a file of a tv episode that is a 720 web-dl and I replace it with a 1080p blu ray rip. Is it possible to update the XBMC library to see that as the same episode? Because the only way I can see to do it is to remove the old one from the library and add the new one, but that gets rid of other attributes like watched status and the like in the process. A remove and add is not the same as an update. When using media manager programs that replace files with better quality ones in bulk this can become an even bigger issue. Is there a way to accomplish this through the API? I have a script that will do this flawlessly through a SQL query but doing so through the API will make it much better for other programs. If not, can the API, hypothetically, be expanded to accomplish this?
Posts: 101
Joined: Sep 2012
Reputation:
0
yes, i am aware of trakt but that does not do what i need.
Posts: 418
Joined: Oct 2010
Reputation:
13
As long as your old and new files are named the same i.e.
Show Name S0XE0X Description.ext
and not
Show Name S0XE0X Description Quality.ext
XBMC will recognize the old and new as the same as far as watched status.
I know that is ghetto compared to a real DB update but will save your watched status if that is your main concern.
Posts: 101
Joined: Sep 2012
Reputation:
0
yes, but then all of the info will be incorrect and it doesnt actually update anything. and it is not just the watched status, that is just an example of one of the symptoms of the problem.
the actual problem is that, unless i am overlooking something, there is no mechanism for xbmc to update a file record in it's database, only remove and add. so media managers like sickbeard or nzbdrone have to delete a record and add a new one instead of just updating the current one which leads to issues like lost watched status, bookmarks, and other attributes associated with a file.
i just wanted to check here first but maybe i should submit a feature request.
Posts: 5,174
Joined: Jan 2010
Reputation:
97
Kib
Team-Kodi Member
Posts: 5,174
Do you want to automate it or just do it manually occasionally?
Posts: 19,982
Joined: May 2009
Reputation:
451
nickr
Retired Team-Kodi Member
Posts: 19,982
Change the filename in the db
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Posts: 19,982
Joined: May 2009
Reputation:
451
nickr
Retired Team-Kodi Member
Posts: 19,982
I am not sure that an SQL query is any harder or easier than a JSON-RPC call, but an API function would (hopefully) survive a change in db structure from version to version.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)