2017-11-05, 11:56
Why have you done this?
In November 2017 the TVDB updated it's API to v2.0. Kodi needed to update the TVDB scraper to continue to access their database.
Do I need to refresh my library?
Short answer, YES. The reason for this is because Kodi stores an <episodeguide> URL from TVDB for each show, which it uses when adding new episodes. This stored URL is now wrong.
The exception to this requirement is if you have complete TV Shows to which no more episodes will be added, there is no need to refresh as the shows are not affected.
How do I refresh?
1. To Refresh individual shows...
2. To refresh the entire library...
What if I'm using NFO files?
Full NFO Files - From Media Managers or Kodi Export
If you scraped before Nov 2017 using an External media manager or used Kodi to scrape and exported to NFO Files, you most likely have the wrong <episodeguide> URL.
1. Check your tvshow.nfo file and see which <episodeguide> URL is in use.
3. Refresh the TV Show from your NFO Files. No need to refresh the episodes.
Parsing NFO Files
If you're just using URL NFO files (Parsing NFO) (that is, they only contain the TVDB website URL of the TV show), you still need to refresh as the wrong API is stored in the database.
What if I really don't want to refresh my library?
Warning: This is not a recommended procedure for the novice user. Undertaking this procedure is at your own risk.
It may be possible to manually update the database to directly replace the old episodeguide URLs with the new.
The old URLs look like:
The new URLs look like:
These are located in the C10 column of the tvshow table of MyVideosXXX.db (where XXX is the highest number in your database directory).
This will require a SQLite browser/editor (or MySQL) and knowledge of SQL. It can't be done with a text editor.
It may also be possible to do this with a Python script via the JSON-RPC API, although someone with more knowledge on that would have to comment.
Caution (and back-ups) should be taken before attempting any direct manipulation of the database.
Will my artwork change?
If you don't have locally saved artwork, then refreshing may indeed pull different artwork from the TVDB.
This has to do with the fact that the scraper pulls the art with the highest voted-on average. Averages can change as more people vote; what was popular when you originally added the show to your library may no longer be so.
This would be just as true if you refreshed with the old scraper, and has little to do with the change in API.
If you manually chose a different artwork than the one pulled by the scraper then refreshing WILL undo that.
TVDB- No Longer the Default Scraper
In Nov 2018, Kodi's default scraper for TV Shows was changed from TVDB to TheMovieDB-TV Shows.
Note: The original content of this post by scudlee has been rewritten and updated numerous times by Karellen.
In November 2017 the TVDB updated it's API to v2.0. Kodi needed to update the TVDB scraper to continue to access their database.
Do I need to refresh my library?
Short answer, YES. The reason for this is because Kodi stores an <episodeguide> URL from TVDB for each show, which it uses when adding new episodes. This stored URL is now wrong.
The exception to this requirement is if you have complete TV Shows to which no more episodes will be added, there is no need to refresh as the shows are not affected.
Note: If you have exported your library, and at a later stage decide to rebuild a fresh library, those exports will still hold the v1.0 guides, and you will need to refresh them. You can...
a. Use one of the methods described below, or
b. Before importing your new library, open the tvshow.nfo file and delete the <episodeguide>...</episodeguide> tags, and everything in-between those two tags. Save the nfo file and import. Useful if you want to preserve any personalised information as well as playcounts, resume points and watched status. The drawback with this method is you can no longer add new episodes to the show, so use this method on complete shows only.
b. Before importing your new library, open the tvshow.nfo file and delete the <episodeguide>...</episodeguide> tags, and everything in-between those two tags. Save the nfo file and import. Useful if you want to preserve any personalised information as well as playcounts, resume points and watched status. The drawback with this method is you can no longer add new episodes to the show, so use this method on complete shows only.
How do I refresh?
1. To Refresh individual shows...
- Highlight the tvshow
- Press 'i' to bring up the info screen
- Select the Refresh button
2. To refresh the entire library...
- Go to your source folder(s), bring up the context menu ('c' or long-press enter)
- Select Change content.
- Change the content type to 'None' and agree to remove the contents from the library when prompted. You will not lose watched/unwatched status on the files!
- Repeat, but this time setting the content back to TV Shows. Make sure the information provider is The TVDB, and check the settings!
- If you are not using English as your default language you may need to turn on the new Fallback language setting.
What if I'm using NFO files?
Full NFO Files - From Media Managers or Kodi Export
If you scraped before Nov 2017 using an External media manager or used Kodi to scrape and exported to NFO Files, you most likely have the wrong <episodeguide> URL.
1. Check your tvshow.nfo file and see which <episodeguide> URL is in use.
The v1.0 guide looks like this... <url cache="((ID)).xml">http://www.thetvdb.com/api/1D62F2F90030C444/series/80379/all/en.zip</url>
The v2.0 guide looks like this... <url post="yes" cache="auth.json">https://api.thetvdb.com/login?{"apikey":"439DFEBA9D3059C6","id":80379}|Content-Type=application/json</url>
2. If the tvshow.nfo file has the v1.0 API, they will no longer scan into the library. Simply replace the v1.0 guide with the v2.0 guide by copying the above line, ensuring you replace the TV Show ID with the correct ID as shown in red above.The v2.0 guide looks like this... <url post="yes" cache="auth.json">https://api.thetvdb.com/login?{"apikey":"439DFEBA9D3059C6","id":80379}|Content-Type=application/json</url>
3. Refresh the TV Show from your NFO Files. No need to refresh the episodes.
Parsing NFO Files
If you're just using URL NFO files (Parsing NFO) (that is, they only contain the TVDB website URL of the TV show), you still need to refresh as the wrong API is stored in the database.
What if I really don't want to refresh my library?
Warning: This is not a recommended procedure for the novice user. Undertaking this procedure is at your own risk.
It may be possible to manually update the database to directly replace the old episodeguide URLs with the new.
The old URLs look like:
Code:
<episodeguide><url cache="((ID)).xml">http://www.thetvdb.com/api/((API-KEY))/series/((ID))/all/en.zip</url></episodeguide>
The new URLs look like:
Code:
<episodeguide><url post="yes" cache="auth.json">https://api.thetvdb.com/login?{"apikey":"((API-KEY))","id":((ID))}|Content-Type=application/json</url></episodeguide>
These are located in the C10 column of the tvshow table of MyVideosXXX.db (where XXX is the highest number in your database directory).
This will require a SQLite browser/editor (or MySQL) and knowledge of SQL. It can't be done with a text editor.
It may also be possible to do this with a Python script via the JSON-RPC API, although someone with more knowledge on that would have to comment.
Caution (and back-ups) should be taken before attempting any direct manipulation of the database.
Will my artwork change?
If you don't have locally saved artwork, then refreshing may indeed pull different artwork from the TVDB.
This has to do with the fact that the scraper pulls the art with the highest voted-on average. Averages can change as more people vote; what was popular when you originally added the show to your library may no longer be so.
This would be just as true if you refreshed with the old scraper, and has little to do with the change in API.
If you manually chose a different artwork than the one pulled by the scraper then refreshing WILL undo that.
TVDB- No Longer the Default Scraper
In Nov 2018, Kodi's default scraper for TV Shows was changed from TVDB to TheMovieDB-TV Shows.
- For established libraries there will be no difference.
- If you are rebuilding your library from NFO Files which were exported from Kodi, and these TV Shows were scraped with the original TVDB scraper, then you will need to change the active scraper back to TVDB for Kodi to recognise the exported NFO Files. This will also be required if your media manager uses TVDB to create your NFO Files.
Note: The original content of this post by scudlee has been rewritten and updated numerous times by Karellen.