Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Plex-Plugin - API V1+V2] Plex NFO Importer
#1
Project Plex - The Sports Database - Plex NFO Importer

TheSportsDB-NFO.bundle

- Can access any Leagues/Seasons/Events/Teams/Players information. Access artwork online or locally.
- Only the appropriate folder structure, NFO files and video files are required. (Example files are available)
- Download: use the following link: TheSportsDB-NFO.bundle-0.9.1.zip https://tsdb.club/mydownloads.php?action...own&did=15
- Example files for naming.zip https://tsdb.club/mydownloads.php?action...own&did=16
- Use our NFO Export tool: https://tsdb.club/nfogenerator.php (Folder structure for sports series including NFO files in a zip package)
- Exchange NFO package in Discord channel!


=> In 5 minutes, the plugin is installed and demo files scraped: https://streamable.com/75i7qd


Documentation

- Download and installation
- Settings
- Display in Plex
- Example files
- NFO & Video file informations (An important section after the first test run with the demo files.)
- Information about this Project

Download and Installation

Installation:

1) Download TheSportsDB-NFO.bundle V.0.9.3.zip and extract it.
2) You get the folder "TheSportsDB-NFO.bundle". If the folder has another name, rename it to TheSportsDB-NFO.bundle.
3) Find the Plex Media Server data directory: https://support.plex.tv/articles/2029152...y-located/
4) Move the folder "TheSportsDB-NFO.bundle" into the "Plug-ins" folder:
  - Windows: %LOCALAPPDATA%\Plex Media Server\Plug-ins
  - macOS: ~/Library/Application Support/Plex Media Server/Plug-ins
  - Linux: /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins
  - Docker: <config folder>/Library/Application Support/Plex Media Server/Plug-ins
5) Restart Plex.


[Image: winfiles01.jpg]

[Image: winfiles02.jpg]

Download & Installation on ubuntu:

Installation on Linux (Ubuntu / Debian):
1) Copy the folder TheSportsDB-NFO.bundle to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins
2) Change the owner: sudo chown -R plex:plex "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/TheSportsDB-NFO.bundle"
3) Restart Plex: sudo systemctl restart plexmediaserver

Plex 1.43 and newer: show the legacy agents

Since Plex Media Server 1.43.0, legacy agents (like this one) are hidden when you create or edit a library.
Turn them on first: Settings -> Library -> "Show legacy agents during library setup", then reload the browser page (F5).
Libraries that already use the agent keep working without this setting.

Settings

- Settings - Plex server:

Server -> Settings -> Agents
Shows -> TheSportsDB-NFO: Local Media Assets (TV) -> Position 1, if not enabled, turn it on!
Shows -> TheSportsDB-NFO: TheSportsDB-NFO -> Position 2, if not enabled, turn it on!
=> Move with drag and drop to reach the desired position

[Image: plugin01.jpg]

- Settings - Create library:

Add Library -> Select type:

Type: TV Shows
Name: Video Library Names, as example: Sports
Language: English - Desired language, currently depending on the contents of the NFO file.

[Image: plugin02.jpg]

Add Library -> Add folders:

Path: In our example, the video and NFO files are located under the following path: C:\Plex-Demo-Files\Sports

[Image: plugin03.jpg]

Add Library -> Advanced:

Agent: Select agent TheSportsDB-NFO

[Image: plugin04.jpg]

Recommended agent settings:
- artwork location: "local" if your ZIP from the NFO Generator contains artwork ("Download artwork into the ZIP"),
  otherwise "link" (the images are loaded from thesportsdb.com). If one source has no image, the agent uses the other one.
- season assets in season folder: on or off, both work.
- create collections from tags: on (collections "Sport" and "Sport - Soccer").
- enable debug logging: only when you look for a problem.
- Scanner: "Plex Series Scanner", Agent: "TheSportsDB-NFO".

[Image: plugin05.jpg]

[Image: plugin06.jpg]

actor thumb location: Select link or local | link = get pictures from NFO file over internet, local = use artwork from filesystem

[Image: plugin07.jpg]

[Image: plugin08.jpg]

Display in Plex

Display in Plex - Plex Default Skin

Overview TV shows:
[Image: view01.jpg]

View TV show:
[Image: view02.jpg]

View Season:
[Image: view03.jpg]

View Episode:
[Image: view04.jpg]

View Episode editor:
[Image: view05.jpg]

Example files

Example files - for Plex NFO Importer

Sports folder: League/TV show folders
[Image: winfiles03.jpg]

League/TV show folder from: English Premiere League
[Image: winfiles04.jpg]

Season folder from: English Premiere League Season 2021-2022
[Image: winfiles05.jpg]

NFO & Video file informations
[Image: nfofile01.jpg]

The following information must be present in the NFO file.

- The correct season number, no letters or hyphens
- The correct episode number, no letters or hyphens

The following information are important for file naming.

NFO File: The NFO file must have the same name as the episode video file
Video File: Must contain the correct season and episode number
Example 1: Formula 1 => Season 2024: https://www.thesportsdb.com/season/4370-Formula-1/2024 / Episode: https://www.thesportsdb.com/event/196374...Practice-1

- 2024
- Formula 1 2024-03-22 Australian Grand Prix Practice 1.S2024E14.mkv

[Image: sportsdb01.jpg]

Note: Some leagues use the rounds multiple times and are therefore not usable. The episode number can only be determined by counting in this examle, or use our NFO Export tool: https://tsdb.club/nfogenerator.php (Folder structure for sports series including NFO files in a zip package)

Example 2: Formula E => Season 2021-2022: https://www.thesportsdb.com/season/4371-.../2021-2022 / Episode: https://www.thesportsdb.com/event/1392214-Monaco-E-Prix

- 2021 => Do not use 2021-2022 or 2022, only 2021! Always the lower. In Filesystem, you can use /Season 2021-2022/ as folders.
- Formula E 2021-04-30 Monaco E Prix.S2021E6.mkv not Formula E 2021-04-30 Monaco E Prix.S2021-2022E6.mkv (Always the lower)

[Image: sportsdb02.jpg]

=> In 5 minutes, the plex plugin is installed and demo files are scraped: https://streamable.com/75i7qd

Problems?
Turn on "enable debug logging", refresh the library and post the log file here or on Discord:
Plex Media Server/Logs/PMS Plugin Logs/com.plexapp.agents.thesportsdbnfo.log

---------- ---------- ---------- ----------

If you are already using the plugin and want to update it, please create a backup of your library first!

TheSportsDB-NFO.bundle V.0.9.3 - update

Download: TheSportsDB-NFO.bundle V.0.9.3.zip [LINK]

What is new:
- Fixed: the agent could not be loaded in some versions (Python error).
- Fixed: every season gets its own poster. Before, with "All seasons" exports, a season could show the poster of the season before.
- New: season title (e.g. "Season 2023-2024") and season description.
- Fixed: the episode image is now the landscape thumb, not the portrait poster.
- Fixed: the background image (fanart) of the league is loaded.
- Fixed: with artwork location "local", the league and season images are loaded.
- New: if a local image is missing, the image from the NFO link is used (and the other way round).
- Fixed: folder and file names with umlauts / accents (e.g. "Fußball", "Atlético").
- Fixed: no wrong "0.0" ratings and no runtime "0" any more.
- The agent has its own id now. It can be installed next to XBMCnfoTVImporter.
- More artwork: episodes get the thumb as main image and the fanart / map images as alternatives (Edit > Poster).
- Seasons get banner and background images.
- If an image is missing locally, the image from the NFO link is used (and the other way round) - for every image type.
- Country of the league is shown (if your Plex version supports it).

IMPORTANT - you have to create your library again:
Because of the new agent id, Plex can not update the items that are already in your library.
Changing the agent of an existing library only affects new items, so please create a new library.

1) Close Plex Web. Delete the old folder "TheSportsDB-NFO.bundle" in the Plex "Plug-ins" folder.
2) Extract TheSportsDB-NFO.bundle V.0.9.3.zip and copy the new folder "TheSportsDB-NFO.bundle" into the "Plug-ins" folder.
3) Restart Plex.
4) Plex 1.43 or newer: Settings -> Library -> turn on "Show legacy agents during library setup", then reload the browser page (F5).
5) Add Library -> TV Shows -> same folders as your old sports library.
  Advanced: Scanner "Plex Series Scanner", Agent "TheSportsDB-NFO".
6) Set the agent settings again (they start with the default values).
7) Wait until the new library is complete, then delete the old library.

Note: the watched status of the old library is not taken over to the new library.

Log file name (for problems): com.plexapp.agents.thesportsdbnfo.log
Feedback: here in the thread or on Discord.
Reply
#2
Hello,
thanks for the job. The extraction of the nfo with the generator of "Fifa World Cup" doesn't work. Is it possible to fix it?
Thank you in advance
Reply
#3
fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)