Wiki Navigation
- Loading...
Overview
The NfoSeriesMetadataExtractor extracts metadata from
nfo-files
for series. It is one of currently two NfoMetadataExtractors. This wiki page describes particularities of the NfoSeriesMetadataExtractor. General information applicable to all NfoMetadataExtractors can be found here.
Properties
Property Name | Property Value |
---|---|
metadataExtractorId | 45070E52-7CA1-473C-AE10-B08FB8243CC3 |
name | Nfo series metadata extractor |
metadataExtractorPriority | MetadataExtractorPriority.Extended |
processesNonFiles; | true |
shareCategories | Series |
extractedAspectTypes | MediaAspect , VideoAspect , SeriesAspect , ThumbnailLargeAspect |
Note: The
metadataExtractorPriority
is intentionally (and incorrectly) set to
Extended
although, depending on the content of the
nfo-file
, it may download thumbs from the internet (and should therefore be
External
. This is a temporary workaround for performance purposes. It ensures that this MetadataExtractor is applied before the VideoThumbnailer (which is intentionally and incorrectly set to
External
although it only uses local files). Creating thumbs with the VideoThumbnailer takes longer than downloading them from the internet.
Settings
Besides the general settings available for all NfoMetadataExtractors, the NfoSeriesMetadataExtractor has the following settings:
Name | Type | Default Value(s) | Explanation |
---|---|---|---|
SeriesNfoFileNames | HasSet<string> | tvshow | File name that is used (in combination with any of the NfoFileNameExtensions ) to identify a series nfo-file for a particular Resource |
The settings file name for the NfoSeriesMetadataExtractor is
MediaPortal.Extensions.MetadataExtractors.NfoMetadataExtractors.Settings.NfoSeriesMetadataExtractorSettings.xml
Requirements
Besides the general requirements applicable to all NfoMetadataExtractors the NfoSeriesMetadataExtractor has the following requirements to be able to extract metadata:
Other MetadataExtractors
The NfoSeriesMetadataExtractor can only extract metadata for video
Resources
. It will therefore only try to extract metadata if any MetadataExtractor applied before the NfoSeriesMetadataExtractor (i.e. having
MetadataExtractorPriority.Core
) has recognized the
Resource
as a video and added a
VideoAspect
. This is typically done by the VideoMetadataExtractor. If no
VideoAspect
is present when the NfoSeriesMetadataExtractor is called, the NfoSeriesMetadataExtractor will do noting.
Directory and File Name Structure
For series there are two
nfo-files
that may contain information for a particular episode:
The
episode nfo-file
, which contains information on the particular episode of a series.
The
series nfo-file
, which contains information on the whole series; and
The
episode nfo-file
is required. If it is not present, the NfoSeriesMetadataExtractor will do nothing (and not even try to find a
series nfo-file
. The
series nfo-file
is optional. If it is not present, the NfoSeriesMetadataExtractor will only extract metadata from the
episode nfo-file
.
Episode nfo-file
To be identified as
episode nfo-file
, the
nfo-file
needs to be located in the
parent directory
of the
Resource
.
If the
Resource
is a file, the
parent directory
is the directory in which the file is located.
Episode nfo-files
for episode video files must therefore be located in the same directory as the episode video file.
If the
Resource
is the root directory of a
ChainedResourceProvider
(such as in case of a DVD iso file), the
parent directory
is the directory in which the file that was unfolded by the
ChainedResourceProvider
is located.
Nfo-files
e.g. for series iso files must therefore be located in the same directory as the series iso file.
If the
Resource
is a directory (such as in case of a directory, to which the content of a DVD was copied), the
parent directory
is the directory containing that
Resource
directory.
The file name of the
episode nfo-file
must be the
ResourceName
.
If the
Resource
is a file, the
ResourceName
is the file name of the
Resource
(without file name extension).
If the
Resource
is the root directory of a
ChainedResourceProvider
(such as in case of a DVD iso file), the
ResourceName
is the file name of the file that was unfolded by the
ChainedResourceProvider
(without file name extension).
If the
Resource
is a directory (such as in case of a directory, to which the content of a DVD was copied), the
ResourceName
is the name of that directory.
The file name extension of the
episode nfo-file
must be any of the values contained in the
NfoFileNameExtensions
settings.
Example:
Assuming you have default settings and the
Resource
is:
D:\Series\Castle\Season 01\Flowers for Your Grave.mkv
In this case, the NfoSeriesMetadataExtractor would look for the following files to identify an
episode nfo-file
:
D:\Series\Castle\Season 01\Flowers for Your Grave.nfo
D:\Series\Castle\Season 01\Flowers for Your Grave.xml
D:\Series\Castle\Season 01\Flowers for Your Grave.txt
The file names (and file name extensions) are not case sensitive.
Series nfo-file
To be identified as
series nfo-file
, the
nfo-file
needs to be located
either in the same directory as the
episode nfo-file
; this is typically the case when you store all episodes of all seasons of a series in one directory;
or in the
parent directory
(see above) of the directory in which the
episode nfo-file
is located; this is typically the case when you have a series directory with season sub-directories, in which you store the episodes of one season of a series, each.
The file name of the
series nfo-file
must be any of the values of the
SeriesNfoFileNames
setting.
The file name extension of the
series nfo-file
must be any of the values contained in the
NfoFileNameExtensions
settings.
Example:
Assuming you have default settings and the
Resource
is:
D:\Series\Castle\Season 01\Flowers for Your Grave.mkv
In this case, the NfoSeriesMetadataExtractor would look for the following files to identify a
series nfo-file
:
D:\Series\Castle\Season 01\tvshow.nfo
D:\Series\Castle\Season 01\tvshow.xml
D:\Series\Castle\Season 01\tvshow.txt
D:\Series\Castle\tvshow.nfo
D:\Series\Castle\tvshow.xml
D:\Series\Castle\tvshow.txt
The file names (and file name extensions) are not case sensitive.
Content of the Nfo-File
The
RootElementName
required for the NfoSeriesMetadataExtractor is
episodedetails
in the
episode nfo-file
and
tvshow
in the
series nfo-file
. for details on the
RootElementName
please see the general section on the content of
nfo-files
.
The NfoSeriesMetadataExtractor has (in the NfoSeriesEpisodeReader class for
episode nfo-files
and in the NfoSeriesReader class for
series nfo-files
) a separate TryReadXyz method for every child element it can read, where Xyz is the child element name (despite the casing which in the
nfo-file
is always lower case). At the beginning of each TryReadXyz method in the source code of the NfoSeriesEpisodeReader class and the NfoSeriesReader class there is a comment showing an example on how the content of this child element must be structured so that the NfoSeriesMetadataExtractor can understand it.
Imported Attributes
The following table contains the applied mapping of XML elements to
Attributes
in various
MediaItemAspects
.
XML elements contained in the
series nfo-file
are in the "imported XML element" column below prepended with
{s}
, whereas XML elements contained in the
episode nfo-file
are prepended with
{e}
.
If there are multiple XML elements in the "Imported XML Element" column separated by [priority 1], [priority 2], etc., then the value(s) of the XML element(s) under [priority 2] is/are only taken if there is no XML elemet present in the
nfo-file
that is listed under [piority 1] or there is no valid value for the XML element under [priority 1], etc.
If there are multiple XML elements in the "Imported XML Element" column not separated by [piority x] the behavior depends on whether or not the MediaLibrary can store multiple values for the respective
Attribute
. If so, all values are taken. If not, a random one is taken, unless specified otherwise in the table below.
Currenty, if a valid value was found for an XML element listed in the "Imported XML Element" column, any value that was stored in the respective
Attribute
by a MetadataExtractor applied before the NfoSeriesMetadataExtractor is overwritten. If no valid value was found or there is no XML Element listed in the "Imported XML Element" column, the
Attribute
is not touched.
MedaItemAspect | Attribute | Imported XML Element |
---|---|---|
MediaAspect | Title | String in the format "{SeriesName} S{Season}E{Episode(s)} - {EpisodeName}" where {SeriesName}, {Season}, {Episode(s)} and {EpisodeName} are the Attributes below. {Season} has always two digits (prepended with "0", if necessary, such as "01"). {Episode(s)} has the same format as {Season}; if a media file contains multiple episodes, the respective two digit strings are joined with ", " as separator. This Attribute is only imported, if the nfo-files contain valid values for {SeriesName}, {Season}, {Episode(s)} and {EpisodeName} as described below. |
MediaAspect | MimeType |
|
MediaAspect | Size |
|
MediaAspect | RecordingTime |
|
MediaAspect | Rating |
|
MediaAspect | Comment |
|
MediaAspect | PlayCount | [priority 1] {e}<playcount>3</playcount> [priority 2] {e}<watched>true</watched> {e}<watched>false</watched> If true, a vaue of 1 is imported. If false, a value of 0 is imported. |
MediaAspect | LastPlayed | {e}<lastplayed>2013-10-08 21:46</lastplayed> |
VideoAspect | Genres | {s}<genre>Horror</genre> {s}<genre>Horror / Trash</genre> {s}<genres> {s} <genre>Horror</genre> {s} <genre>Horror / Trash</genre> {s}</genres> |
VideoAspect | Duration |
|
VideoAspect | AudioStreamCount |
|
VideoAspect | AudioEncoding |
|
VideoAspect | AudioBitRate |
|
VideoAspect | AudioLanguages |
|
VideoAspect | VideoEncoding |
|
VideoAspect | VideoBitRate |
|
VideoAspect | Width |
|
VideoAspect | Height |
|
VideoAspect | AspectRatio |
|
VideoAspect | FPS |
|
VideoAspect | Actors | {e}<actor> {e} <name>John Pyper-Ferguson</name> {e}</actor> {s}<actor> {s} <name>John Pyper-Ferguson</name> {s}</actor> [Not yet in Summer Release 2015 - Note: If there are multiple <episodedetails> elements in one episode nfo-file we import all (distinct) <name> child elements from all episodes because we assume that the media file contains multiple episodes.] |
VideoAspect | Directors | {e}<director>Dennis Dugan</director> [Not yet in Summer Release 2015 - Note: If there are multiple <episodedetails> elements in one episode nfo-file we import all (distinct) <director> child elements from all episodes because we assume that the media file contains multiple episodes.] |
VideoAspect | Writers | {e}<credits>Adam Sandler</credits> {e}<credits>Adam Sandler / Steve Koren</credits> [Not yet in Summer Release 2015 - Note: If there are multiple <episodedetails> elements in one episode nfo-file we import all (distinct) <credits> child elements from all episodes because we assume that the media file contains multiple episodes.] |
VideoAspect | IsDVD |
|
VideoAspect | StoryPlot | [priority 1] {e}<plot>This episode tells a story about...</plot> [priority 2] {e}<outline>This episode tells a story about...</outline> [priority 3] {s}<plot>This series tells a story about...</plot> [priority 4] {s}<outline>This series tells a story about...</outline> [Not yet in Summer Release 2015 - Note: If there are multiple <episodedetails> elements in one episode nfo-file we import all <plot> (or <outline>, respectiely) child elements in the form "{EpisodeNumber}) {StoryPlot}" joined with two newlines because we assume that the media file contains multiple episodes. The question whether <plot> or <outline> is taken depends on the first <episodedetails> element in the episode nfo-file.] |
SeriesAspect | IMDBID |
|
SeriesAspect | TVDBID | [priority 1] {e}<id>158661</id> [priority 2] {s}<id>158661</id> Note: This is in both cases the series-ID (not the episode-ID) |
SeriesAspect | SeriesName | [priority 1] {e}<showtitle>Haven</showtitle> [priority 2] {s}<showtitle>Haven</showtitle> |
SeriesAspect | Season | [priority 1] {e}<season>1</season> [priority 2] {e}<displayseason>2</displayseason> |
SeriesAspect | SeriesSeason | String in the format "{SeriesName} S{Season}" where {SeriesName} and {Season} are the Attributes above. {Season} has always two digits (prepended with "0", if necessary, such as "01"). This Attribute is only imported, if the nfo-files contain valid values for {SeriesName} and {Season} as described above. |
SeriesAspect | Episode | {e}<episode>2</episode> Note: if there are multiple <episodedetails> elements in one episode nfo-file we import all episode numbers because we assume that the media file contains multiple episodes. |
SeriesAspect | DVDEpisode | {e}<displayepisode>3</displayepisode> Note: If there are multiple <episodedetails> elements in one episode nfo-file we import all episode numbers because we assume that the media file contains multiple episodes. |
SeriesAspect | EpisodeName | {e}<title>Willkommen in Haven</title> [Not yet in Summer Release 2015 - Note: If there are multiple <episodedetails> elements in one episode nfo-file we import all <title> child elements joined with "; " because we assume that the media file contains multiple episodes.] |
SeriesAspect | FirstAired | {e}<aired>2013-02-01</aired> |
SeriesAspect | TotalRating | [priority 1] {e}<rating>8.1</rating> [priority 2] {s}<rating>8.1</rating> [Not yet in Summer Release 2015 - Note: If there are multiple <episodedetails> elements in one episode nfo-file, in priority 1 we import the average of all values because we assume that the media file contains multiple episodes.] |
SeriesAspect | RatingCount | [priority 1] {e}<votes>123</votes> This value is only imported if a valid {e}<rating> value was imported [priority 2] {s}<votes>123</votes> This value is only imported if a valid {s}<rating> value was imported |
ThumbnailLargeAspect | Thumbnail | {e}<thumb>name.jpg</thumb> The file must be located in the same directory as the episode nfo-file. {e}<thumb>extrafanart\name.jpg</thumb> {e}<thumb>..\thumbs\name.jpg</thumb> The path must be relative to the parent directory of the episode nfo-file. {e}<thumb>http://thetvdb.com/banners/episodes/83462/398671.jpg</thumb> |
This page has no comments.