Page 1 of 1

Descriptive Metadata from nfo not updating library

PostPosted: Tue May 08, 2018 11:16 pm
by Alien003
Hi

I recently switched the descriptive metadata service from "Online Metadata Sources" to "XBMC .nfo files" (to solve a problem where animes didn't get added to series due to naming issues ..and really don't want to rename them to have a S01).

Since then I'm having a problem where I need to restart serviio to get the metadata updated. After a restart (not sure if had to click the rescan before shutting down) everything gets scanned and appears correctly.

It happens consistently on all the files and clicking "Rescan video metadata" doesn't do anything without restarting. In the log files the only lines after clicking that button are:
  Code:
2018-05-08 23:46:32,755 INFO  [LocalLibraryManager] Forcing metadata update for 'VIDEO' media files
2018-05-08 23:46:32,755 DEBUG [MediaItemDAOImpl] Marking MediaItems (type = VIDEO) as dirty



Attached is a log from when one file, the correspondent srt+nfo are added and the following minutes.
Note that I'm not 100% sure what is the delay between the creation of the nfo files and the video since It's Sickrage doing that, but in this example that I uploaded they are there seem to be placed there almost at the same time.

Edit: forgot to say that I'm using version 1.9.1

Re: Descriptive Metadata from nfo not updating library

PostPosted: Wed May 09, 2018 8:18 am
by zip
Can you try 1.9.2 in case it helps?

Apart from that, just so that I understand you, it looks like the mp4 was added, but the .nfo file was not (Serviio saw it but didn't process), right?

Re: Descriptive Metadata from nfo not updating library

PostPosted: Wed May 09, 2018 11:24 pm
by Alien003
Just tested with 1.9.2 and still has the same behavior.

Looks like a timing issue where the .nfo is only added to the folder a few seconds after the video, so it's still not present when the video file is processed.
The video gets added to the library and appears on the "Recent Unwatched", but shows just the filename instead of usual "Name (Season/Ep): Ep Name" format and does show on the Series folder.

Attached a new log sample that didn't work (now with 1.9.2).

In one of my tests the timing was better and all files were discovered at the beginning at the same time and were added correctly. Adding that log as well.


Edit: doing a Touch on the file is enough to get it instantly reprocessed and added correctly.

Re: Descriptive Metadata from nfo not updating library

PostPosted: Thu May 10, 2018 8:26 am
by zip

Re: Descriptive Metadata from nfo not updating library

PostPosted: Fri May 18, 2018 8:14 pm
by zip
I closed this ticket, this is the current behavior - the nfo file has to be there before, or at the same time as the video file. "Force refresh" should bring it to sync (without the need to restart)

Re: Descriptive Metadata from nfo not updating library

PostPosted: Sun May 20, 2018 12:25 pm
by DenyAll
As an improvement perhaps?... couldn't the file watcher (or poller), on detecting a .nfo file being added trigger a refresh of the metadata for the associated media file? Just a thought.

Re: Descriptive Metadata from nfo not updating library

PostPosted: Mon May 21, 2018 12:14 pm
by zip
there is a problem that it can be hard/weird to work out the media file name from the metadata file. if it's avatar.nfo then it can be avatar.(any video extension). If it's movie.nfo, than it applies potentially to all video files in the folder.

Re: Descriptive Metadata from nfo not updating library

PostPosted: Wed May 23, 2018 11:30 am
by DenyAll
Ok, but...

Would that not also be the case when doing a forced refresh? So when doing the forced refresh Serviio must somehow detect that movie.nfo now exists, read it and somehow work out what media file to apply the metadata to? or am I missing something?

If it is the case couldn't we then use the file watcher to detect that a new .nfo is added, and then trigger the same routine that is used in the force refresh case to work which actual media file to apply the metadata to?

ps. I don't use .nfo files so have no personal stake in this - just an idea....

Re: Descriptive Metadata from nfo not updating library

PostPosted: Wed May 23, 2018 1:41 pm
by zip
Force Refresh does it the other way around... find a media file and try to locate a valid metadata file.