2022-05-11, 18:12
With a little urging, I've created a Python version of the TV show scraper for TheSportsDB called TheSportsDB TV Shows. This is available in the Kodi Nexus add-on repo. This is a Nexus (and later) only scraper, as the only way to uniquely name games for leagues where there are multiple games in a day was to use some features only available in Nexus.
Features:
File Naming
File have to be named in a format Kodi recognizes as a TV Show episode and in a way that will uniquely identify them. For more specific information on file naming, please see:
https://kodi.wiki/view/Naming_video_file...sode_Files
Using Dates
Kodi recognizes files that have the date in a few specific formats. You can only use this option if the sport only has one game on a given day. For example:
Formula.1.2022-03-20.Bahrain.Grand.Prix.mp4
Using Game Name
Starting with Kodi 20 (Nexus), Kodi will use the filename to try and match the title of an epsiode if the name ends with .special before the file extension. Because this is most likely to be used for sports that have multiple games in a day and teams could play each other multiple times, you need to include the date. But it needs to be numbers only, or Kodi will use the date matching above, which will cause problems. In this case the entire file name is used as a match, so it must be in the format of <league>.<date>.<name>.special.ext. For example:
English Premier League.20210813.Brentford.vs.Arsenal.special.mp4
Kodi will do fuzzy searching, so you can use periods or underscores instead of spaces, although you should still separate the items with a period. Whens scraper, Kodi will only display the actual game name (i.e. Brentford vs Arsenal). The rest of the file is just used for matching purposes.
Using Season/Episode Numbers
Kodi reconizes files with the SxxExx format. The season has to be a number, so for seasons on The SportsDB that are multi-year (i.e. 2020-2021) use the first year. The SportsDB doesn't provide episode numbers, so the scraper numbers each event in a season as it loads them. To find the episode number you'll have to count from the first game in the season (starting at 1). The file name can contain any other information you want, but Kodi will only match on the season and epsiode number. For example:
NFL.S2021E02.Atlanta.Falcons.vs.Philadelphia.Eagles.mp4
Parsing NFO Files for Leagues
This scraper does support parsing nfo files to identify a league even if the folder name does not match the league name. For more specific information on parsing nfo files, please see:
NFO_files/Parsing (wiki)
The SportsDB TV Show scraper uses the URL for the league page as the parsing URL. So, for instance, the parsing URL for MLS (American Major League Soccer) would be:
https://www.thesportsdb.com/league/4346-...gue-Soccer
or
https://www.thesportsdb.com/league/4346
Features:
- brings in Leagues on theSportsDB as a TV show and then adds the games/matches/events for that league broken down by season and episode. See below for naming conventions for leagues that have more than one game in a day.
- Includes fanart and thumbs for leagues and games.
- For team sports, the team members of both the home and away team are listed as cast for each episode.
- Includes the option to select the default language for the league and game descriptions. Falls back to English if the language isn't available for a given league or game.
- The network broadcasting the league is listed as the TV studio
File Naming
File have to be named in a format Kodi recognizes as a TV Show episode and in a way that will uniquely identify them. For more specific information on file naming, please see:
https://kodi.wiki/view/Naming_video_file...sode_Files
Using Dates
Kodi recognizes files that have the date in a few specific formats. You can only use this option if the sport only has one game on a given day. For example:
Formula.1.2022-03-20.Bahrain.Grand.Prix.mp4
Using Game Name
Starting with Kodi 20 (Nexus), Kodi will use the filename to try and match the title of an epsiode if the name ends with .special before the file extension. Because this is most likely to be used for sports that have multiple games in a day and teams could play each other multiple times, you need to include the date. But it needs to be numbers only, or Kodi will use the date matching above, which will cause problems. In this case the entire file name is used as a match, so it must be in the format of <league>.<date>.<name>.special.ext. For example:
English Premier League.20210813.Brentford.vs.Arsenal.special.mp4
Kodi will do fuzzy searching, so you can use periods or underscores instead of spaces, although you should still separate the items with a period. Whens scraper, Kodi will only display the actual game name (i.e. Brentford vs Arsenal). The rest of the file is just used for matching purposes.
Using Season/Episode Numbers
Kodi reconizes files with the SxxExx format. The season has to be a number, so for seasons on The SportsDB that are multi-year (i.e. 2020-2021) use the first year. The SportsDB doesn't provide episode numbers, so the scraper numbers each event in a season as it loads them. To find the episode number you'll have to count from the first game in the season (starting at 1). The file name can contain any other information you want, but Kodi will only match on the season and epsiode number. For example:
NFL.S2021E02.Atlanta.Falcons.vs.Philadelphia.Eagles.mp4
Parsing NFO Files for Leagues
This scraper does support parsing nfo files to identify a league even if the folder name does not match the league name. For more specific information on parsing nfo files, please see:
NFO_files/Parsing (wiki)
The SportsDB TV Show scraper uses the URL for the league page as the parsing URL. So, for instance, the parsing URL for MLS (American Major League Soccer) would be:
https://www.thesportsdb.com/league/4346-...gue-Soccer
or
https://www.thesportsdb.com/league/4346