PlexSportScanner

PlexSportScanner - SportScanner

This project is not active!

Project Plex: https://github.com/Project-Plex/ Project Kodi: https://github.com/Project-Kodi/

Join the chat at Discord Join us at Discord: TheDataDB

Information about this Project

##

[!TIP] Please use our Example Video Demo Files after Installation - Sport Mediathek : Example files for naming-PlexSportScanner.zip

Installation

Plex main folder location:

* '%LOCALAPPDATA%\Plex Media Server\'                                        # Windows Vista/7/8
* '%USERPROFILE%\Local Settings\Application Data\Plex Media Server\'         # Windows XP, 2003, Home Server
* '$HOME/Library/Application Support/Plex Media Server/'                     # Mac OS
* '$PLEX_HOME/Library/Application Support/Plex Media Server/',               # Linux
* '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/', # Debian,Fedora,CentOS,Ubuntu
* '/usr/local/plexdata/Plex Media Server/',                                  # FreeBSD
* '/usr/pbi/plexmediaserver-amd64/plexdata/Plex Media Server/',              # FreeNAS
* '${JAIL_ROOT}/var/db/plexdata/Plex Media Server/',                         # FreeNAS
* '/c/.plex/Library/Application Support/Plex Media Server/',                 # ReadyNAS
* '/share/MD0_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/',        # QNAP
* '/volume1/Plex/Library/Application Support/Plex Media Server/',            # Synology, Asustor
* '/raid0/data/module/Plex/sys/Plex Media Server/',                          # Thecus
* '/raid0/data/PLEX_CONFIG/Plex Media Server/'                               # Thecus Plex community

Media Format

The SportScanner scanner requires one of two folder structures to work correctly, the first of which matches Plex’s standard folder structure.

Follow the Plex standards for folder structure - TV Show\Season<files>. For SportScanner, TV Shows = League Name. For example for 2015/2016 NHL you would do something like the following:

In this scenario you still need all the information in the file name, I aim to remove that requirement down the line. The only information that comes only from the folder structure is the season.

Alternative naming standard

You can also choose to ignore the season directory and have the scanner work it out with a folder structure like so:

THERE IS A DOWN SIDE TO THIS! For this to work you must include a file in each league directory called “SportScanner.txt” that contains information about how the seasons work for this sport. The first line in the file will always be “XXXX” or “XXYY”. “XXXX” means that the seasons happens within one calendar year and will therefore be named “2015” of “1999” for example. “XXYY” means that a season occurs across two seasons and will take the format “1516” or “9899” for example. When you define the season as “XXYY” you MUST then on the next line write the integer values of a month and a day in the form “month,day”. This should be a a month and a day somewhere in the off-season for that sport. This tells the scanner when one season has finished and the next one is beginning to ensure that it puts files in the correct season based off the date the event happened. As an example, if you are trying to add NHL you would create a file at the following path:

In this instance the contents of this file would be as follows, saying that seasons should be in “XXYY” format and a date in the middle of the off-season is 1st July:

XXYY 7,1

SportScanner does not actually pay attention to the name of the League directory when it comes to matching events - all info has to be in the filename. This means that you can still group all sports together and as long as they share a season format you can create a SportScanner.txt file as outlined above and everything will work.

This is rubbish, it kind of accidentally works, I don’t recommend it as I will cut it out as part of improvement works in future.

Known Issues

Additional Metadata

The presence of a .SportScanner metadata file can be used to append additional text to the title of the event as well as override a portion of the episode number. Normally the episode number is of the form YYMMDDHHHH where YY is the year, MM is the month, DD is the day, and HHHH is based on a hash. If the first line of the .SportScanner file is a number it will be used in place of the hash. The second line of the .SportScanner file will be appended to the title of the event.

In the above example, the Formula 1 2019-06-30 Austrian Grand Prix - 03 Post-Race Analysis.SportScanner file contains the following text:

3
(Post-Race Analysis)

The resulting episode number is 1906300003 and the resulting title is Austrian Grand Prix (Post-Race Analysis)

API Key

if you have your own API key for thesportsdb.com and want to use it, create a file in the SportScanner data directory. On Linux, this directory is

/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.sportscanner

Create a plain text file named ‘SportScanner.ini’ in that directory (case sensitive if your OS is) and enter

[thesportsdb.com]
apikey=<your api key>

Please use our demo files, you will save yourself a lot of time!

[!WARNING] Please use our Example Video Demo Files after Installation - Sport Mediathek : Example files for naming-PlexSportScanner.zip