Problems with nfo files
Hi,
I already have a very large collection of movies together with detailed information about the movies in a self-made html file structure.
As Serviio can handle nfo xml files, I wrote a python script to convert my html files into nfo xml files so that I can use my already existing meta-data together with Serviio.
The import of this nfo files into Serviio seems to work well, even with german umlauts as long as I use utf-8 for encoding, but a few problems still remain:
* Some nice-to-have tags like 'Rating' or 'Original-Title' seem to be missing.
* For tags like 'Genre', 'Actor', 'Writer' and 'Title' (original and foreign ones) only the first one of each is used by Serviio. All other tags are ignored.
So from the following file:
<movie>
<title>Paul Blart: Mall Cop</title>
<title>Der Kaufhaus Cop</title>
<rating>5.2</rating>
<year>2009</year>
<runtime>91 min</runtime>
<quality>Perfect</quality>
<genre>Action</genre>
<genre>Comedy</genre>
<genre>Crime</genre>
<director>Steve Carr</director>
<actor>
<name>Kevin James</name>
<name>Keir O'Donnell</name>
<name>Jayma Mays</name>
<name>Raini Rodriguez</name>
...
</actor>
<credits>
<writer>Kevin James</writer>
<writer>Nick Bakay</writer>
</credits>
<thumb>Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].jpg</thumb>
</movie>
only the following data is extracted:
2012-03-22 13:15:46,182 DEBUG [LibraryManager] Metadata found via extractor EMBEDDED: VideoMetadata [title=Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2], filePath=/home/all/movies/unsorted/test/Paul Blart: Mall Cop [Der Kaufhaus Cop
] 2009 [5.2].ts, fileSize=4610359908, audioBitrate=384, audioCodec=AC3, audioStreamIndex=1, bitrate=6482, channels=2, container=MPEG2TS, contentType=UNKNOWN, coverImage=org.serviio.library.local.metadata.ImageDescriptor@34a45fc1, duratio
n=5689, episodeNumber=null, fps=23.976, frequency=48000, h264Level=4, h264Profile=HIGH, ftyp=null, height=1080, seasonNumber=null, seriesName=null, timestampType=NONE, videoBitrate=null, videoCodec=H264, videoStreamIndex=0, width=1920]
2012-03-22 13:15:46,183 DEBUG [XBMCExtractor] Checking if file 'Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].nfo' is a XBMC NFO file
2012-03-22 13:15:46,187 DEBUG [XBMCExtractor] File 'Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].nfo' is a valid XBMC file
2012-03-22 13:15:46,187 DEBUG [XBMCExtractor] Found XBMC NFO file Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].nfo. Will try to extract metadata from it.
2012-03-22 13:15:46,190 DEBUG [XBMCExtractor] Parsing NFO file for movie metadata
2012-03-22 13:15:46,193 DEBUG [LibraryManager] Metadata found via extractor XBMC: VideoMetadata [title=Paul Blart: Mall Cop, filePath=null, fileSize=0, audioBitrate=null, audioCodec=null, audioStreamIndex=null, bitrate=null, channels=nul
l, container=null, contentType=MOVIE, coverImage=null, duration=null, episodeNumber=null, fps=null, frequency=null, h264Level=null, h264Profile=null, ftyp=null, height=null, seasonNumber=null, seriesName=null, timestampType=null, videoBi
trate=null, videoCodec=null, videoStreamIndex=null, width=null]
2012-03-22 13:15:46,194 DEBUG [CoverImageInFolderExtractor] Found cover image Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].jpg
2012-03-22 13:15:46,194 DEBUG [LibraryManager] Metadata found via extractor COVER_IMAGE_IN_FOLDER: VideoMetadata [title=null, filePath=null, fileSize=0, audioBitrate=null, audioCodec=null, audioStreamIndex=null, bitrate=null, channels=nu
ll, container=null, contentType=null, coverImage=org.serviio.library.local.metadata.ImageDescriptor@138a92e7, duration=null, episodeNumber=null, fps=null, frequency=null, h264Level=null, h264Profile=null, ftyp=null, height=null, seasonNu
mber=null, seriesName=null, timestampType=null, videoBitrate=null, videoCodec=null, videoStreamIndex=null, width=null]
2012-03-22 13:15:46,194 DEBUG [VideoService] Updating video in database: Paul Blart: Mall Cop
2012-03-22 13:15:46,194 DEBUG [VideoDAOImpl] Reading a Video (id = 4)
2012-03-22 13:15:46,195 DEBUG [GenreDAOImpl] Reading a Genre (name = Action)
2012-03-22 13:15:46,195 DEBUG [GenreService] Genre Action found
2012-03-22 13:15:46,195 DEBUG [CoverImageService] Resizing and storing cover art image
2012-03-22 13:15:46,195 DEBUG [ImageUtils] Starting image resize, size = 6379 bytes
2012-03-22 13:15:46,201 DEBUG [ImageUtils] Returning resized image, size = 5551 bytes
2012-03-22 13:15:46,201 DEBUG [CoverImageService] Image successfully resized
2012-03-22 13:15:46,202 DEBUG [CoverImageDAOImpl] Creating a new ImageCover (length = 5551)
2012-03-22 13:15:46,227 DEBUG [VideoDAOImpl] Updating Video (id = 4)
2012-03-22 13:15:46,239 DEBUG [PersonDAOImpl] Adding a Person Steve Carr to media item 4 as DIRECTOR
2012-03-22 13:15:46,239 DEBUG [PersonDAOImpl] Reading a Person (name = Steve Carr)
2012-03-22 13:15:46,239 DEBUG [PersonDAOImpl] Checking if person 6 has a role DIRECTOR for media item 4
2012-03-22 13:15:46,240 DEBUG [PersonDAOImpl] Adding a Person Unknown to media item 4 as PRODUCER
2012-03-22 13:15:46,240 DEBUG [PersonDAOImpl] Reading a Person (name = Unknown)
2012-03-22 13:15:46,240 DEBUG [PersonDAOImpl] Checking if person 2 has a role PRODUCER for media item 4
2012-03-22 13:15:46,240 DEBUG [PersonDAOImpl] Adding a Person Kevin James to media item 4 as ACTOR
2012-03-22 13:15:46,240 DEBUG [PersonDAOImpl] Reading a Person (name = Kevin James)
2012-03-22 13:15:46,241 DEBUG [PersonDAOImpl] Checking if person 7 has a role ACTOR for media item 4
2012-03-22 13:15:46,241 DEBUG [MetadataDescriptorDAOImpl] Deleting all MetadataDescriptors for MediaItem (id = 4)
2012-03-22 13:15:46,249 DEBUG [MetadataDescriptorDAOImpl] Creating a new MetadataDescriptor (type = COVER_IMAGE_IN_FOLDER, mediaItemId = 4)
2012-03-22 13:15:46,261 DEBUG [MetadataDescriptorDAOImpl] Creating a new MetadataDescriptor (type = XBMC, mediaItemId = 4)
2012-03-22 13:15:46,272 DEBUG [MetadataDescriptorDAOImpl] Creating a new MetadataDescriptor (type = EMBEDDED, mediaItemId = 4)
2012-03-22 13:15:46,283 DEBUG [GenreDAOImpl] Getting number of media items for genre 2
2012-03-22 13:15:46,284 DEBUG [CoverImageDAOImpl] Deleting a CoverImage (id = 16)
2012-03-22 13:15:46,294 INFO [LibraryUpdatesCheckerThread] Updated 'Paul Blart: Mall Cop' (/home/all/movies/unsorted/test/Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].ts) in Library
The question is: Is it possible to extract more data from the nfo files or with some other metadata-filetype?
I already have a very large collection of movies together with detailed information about the movies in a self-made html file structure.
As Serviio can handle nfo xml files, I wrote a python script to convert my html files into nfo xml files so that I can use my already existing meta-data together with Serviio.
The import of this nfo files into Serviio seems to work well, even with german umlauts as long as I use utf-8 for encoding, but a few problems still remain:
* Some nice-to-have tags like 'Rating' or 'Original-Title' seem to be missing.
* For tags like 'Genre', 'Actor', 'Writer' and 'Title' (original and foreign ones) only the first one of each is used by Serviio. All other tags are ignored.
So from the following file:
<movie>
<title>Paul Blart: Mall Cop</title>
<title>Der Kaufhaus Cop</title>
<rating>5.2</rating>
<year>2009</year>
<runtime>91 min</runtime>
<quality>Perfect</quality>
<genre>Action</genre>
<genre>Comedy</genre>
<genre>Crime</genre>
<director>Steve Carr</director>
<actor>
<name>Kevin James</name>
<name>Keir O'Donnell</name>
<name>Jayma Mays</name>
<name>Raini Rodriguez</name>
...
</actor>
<credits>
<writer>Kevin James</writer>
<writer>Nick Bakay</writer>
</credits>
<thumb>Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].jpg</thumb>
</movie>
only the following data is extracted:
2012-03-22 13:15:46,182 DEBUG [LibraryManager] Metadata found via extractor EMBEDDED: VideoMetadata [title=Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2], filePath=/home/all/movies/unsorted/test/Paul Blart: Mall Cop [Der Kaufhaus Cop
] 2009 [5.2].ts, fileSize=4610359908, audioBitrate=384, audioCodec=AC3, audioStreamIndex=1, bitrate=6482, channels=2, container=MPEG2TS, contentType=UNKNOWN, coverImage=org.serviio.library.local.metadata.ImageDescriptor@34a45fc1, duratio
n=5689, episodeNumber=null, fps=23.976, frequency=48000, h264Level=4, h264Profile=HIGH, ftyp=null, height=1080, seasonNumber=null, seriesName=null, timestampType=NONE, videoBitrate=null, videoCodec=H264, videoStreamIndex=0, width=1920]
2012-03-22 13:15:46,183 DEBUG [XBMCExtractor] Checking if file 'Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].nfo' is a XBMC NFO file
2012-03-22 13:15:46,187 DEBUG [XBMCExtractor] File 'Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].nfo' is a valid XBMC file
2012-03-22 13:15:46,187 DEBUG [XBMCExtractor] Found XBMC NFO file Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].nfo. Will try to extract metadata from it.
2012-03-22 13:15:46,190 DEBUG [XBMCExtractor] Parsing NFO file for movie metadata
2012-03-22 13:15:46,193 DEBUG [LibraryManager] Metadata found via extractor XBMC: VideoMetadata [title=Paul Blart: Mall Cop, filePath=null, fileSize=0, audioBitrate=null, audioCodec=null, audioStreamIndex=null, bitrate=null, channels=nul
l, container=null, contentType=MOVIE, coverImage=null, duration=null, episodeNumber=null, fps=null, frequency=null, h264Level=null, h264Profile=null, ftyp=null, height=null, seasonNumber=null, seriesName=null, timestampType=null, videoBi
trate=null, videoCodec=null, videoStreamIndex=null, width=null]
2012-03-22 13:15:46,194 DEBUG [CoverImageInFolderExtractor] Found cover image Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].jpg
2012-03-22 13:15:46,194 DEBUG [LibraryManager] Metadata found via extractor COVER_IMAGE_IN_FOLDER: VideoMetadata [title=null, filePath=null, fileSize=0, audioBitrate=null, audioCodec=null, audioStreamIndex=null, bitrate=null, channels=nu
ll, container=null, contentType=null, coverImage=org.serviio.library.local.metadata.ImageDescriptor@138a92e7, duration=null, episodeNumber=null, fps=null, frequency=null, h264Level=null, h264Profile=null, ftyp=null, height=null, seasonNu
mber=null, seriesName=null, timestampType=null, videoBitrate=null, videoCodec=null, videoStreamIndex=null, width=null]
2012-03-22 13:15:46,194 DEBUG [VideoService] Updating video in database: Paul Blart: Mall Cop
2012-03-22 13:15:46,194 DEBUG [VideoDAOImpl] Reading a Video (id = 4)
2012-03-22 13:15:46,195 DEBUG [GenreDAOImpl] Reading a Genre (name = Action)
2012-03-22 13:15:46,195 DEBUG [GenreService] Genre Action found
2012-03-22 13:15:46,195 DEBUG [CoverImageService] Resizing and storing cover art image
2012-03-22 13:15:46,195 DEBUG [ImageUtils] Starting image resize, size = 6379 bytes
2012-03-22 13:15:46,201 DEBUG [ImageUtils] Returning resized image, size = 5551 bytes
2012-03-22 13:15:46,201 DEBUG [CoverImageService] Image successfully resized
2012-03-22 13:15:46,202 DEBUG [CoverImageDAOImpl] Creating a new ImageCover (length = 5551)
2012-03-22 13:15:46,227 DEBUG [VideoDAOImpl] Updating Video (id = 4)
2012-03-22 13:15:46,239 DEBUG [PersonDAOImpl] Adding a Person Steve Carr to media item 4 as DIRECTOR
2012-03-22 13:15:46,239 DEBUG [PersonDAOImpl] Reading a Person (name = Steve Carr)
2012-03-22 13:15:46,239 DEBUG [PersonDAOImpl] Checking if person 6 has a role DIRECTOR for media item 4
2012-03-22 13:15:46,240 DEBUG [PersonDAOImpl] Adding a Person Unknown to media item 4 as PRODUCER
2012-03-22 13:15:46,240 DEBUG [PersonDAOImpl] Reading a Person (name = Unknown)
2012-03-22 13:15:46,240 DEBUG [PersonDAOImpl] Checking if person 2 has a role PRODUCER for media item 4
2012-03-22 13:15:46,240 DEBUG [PersonDAOImpl] Adding a Person Kevin James to media item 4 as ACTOR
2012-03-22 13:15:46,240 DEBUG [PersonDAOImpl] Reading a Person (name = Kevin James)
2012-03-22 13:15:46,241 DEBUG [PersonDAOImpl] Checking if person 7 has a role ACTOR for media item 4
2012-03-22 13:15:46,241 DEBUG [MetadataDescriptorDAOImpl] Deleting all MetadataDescriptors for MediaItem (id = 4)
2012-03-22 13:15:46,249 DEBUG [MetadataDescriptorDAOImpl] Creating a new MetadataDescriptor (type = COVER_IMAGE_IN_FOLDER, mediaItemId = 4)
2012-03-22 13:15:46,261 DEBUG [MetadataDescriptorDAOImpl] Creating a new MetadataDescriptor (type = XBMC, mediaItemId = 4)
2012-03-22 13:15:46,272 DEBUG [MetadataDescriptorDAOImpl] Creating a new MetadataDescriptor (type = EMBEDDED, mediaItemId = 4)
2012-03-22 13:15:46,283 DEBUG [GenreDAOImpl] Getting number of media items for genre 2
2012-03-22 13:15:46,284 DEBUG [CoverImageDAOImpl] Deleting a CoverImage (id = 16)
2012-03-22 13:15:46,294 INFO [LibraryUpdatesCheckerThread] Updated 'Paul Blart: Mall Cop' (/home/all/movies/unsorted/test/Paul Blart: Mall Cop [Der Kaufhaus Cop] 2009 [5.2].ts) in Library
The question is: Is it possible to extract more data from the nfo files or with some other metadata-filetype?