8 Jun 2017

Removing stubborn shows from Kodi

I love Kodi for all my media watching needs, but I have on occasion ended up with a TV show that appears in the GUI but which has been removed from the library.


Initially, I thought the only fix was to go into the database and remove the entry from there, however I have found the following method to be easier and safer.
  1. Make sure you have deleted the directory of the show you want to remove.
    If the directory exists, Kodi will re-add the show next time it scans for new material.
  2. Find the ID of the show you want to remove.
    There are many ways of doing this, but the RPC call keeps us consistent with the next step. http://kodi in the example should be replaced with your Kodi URL.

    curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "id": 1 }' -H 'content-type: application/json;' http://kodi/jsonrpc
  3. Delete the offending entry - TV show ID 68 in this example.

    curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.RemoveTVShow", "id": 1, "params": { "tvshowid": 68 } }' -H 'content-type: application/json;' http://kodi/jsonrpc

If all went well, Kodi should respond with something like


content-type: application/json;' http://kodi/jsonrpc   
{
       "id": 1,
       "jsonrpc": "2.0",
       "result": "OK"
}