Jump to content

Metadata issue


kpate77

Recommended Posts

kpate77

Server Version 3.0.5572.0

 

I'm having an issue with my TV Series metadata and Sonarr.

 

When Sonarr downloads a new episode Emby sees it and downloads the metadata properly.  However, a few hours/days later Sonarr finds a better quality episode and replaces the existing file.  Emby is not carrying over the exiting metadata, downloading new, refreshing it (not sure what the correct procedure is).  This has been happening for about 2-3 weeks, but I don't know if that coincides with a server update or not.  

 

If a existing file is replaced, I'm left with almost no metadata.  The only items left seem to be the episode name (no episode number, description, picture, etc).  It is also not carrying over the watched status, if I happen to have watched the episode before it was replaced.  To fix this I have to go into Metadata Manager and manually refresh the episode and then also update the watched status, if applicable.

 

Is anyone else experiencing this problem, or is it isolated to something on my end?
Link to comment
Share on other sites

Sounds to me like you have Sonarr also moving a blank nfo file in with the new media...

Link to comment
Share on other sites

thefirstofthe300

I actually have what I believe to be a form of this issue. I have Sonarr naming the files with the episodes quality. When Sonarr downloads the new episode and deletes the old one, I am left with old nfo and jpg files that are named with the old quality.

 

Would it be possible for Emby to delete or rename the old nfo files?

Link to comment
Share on other sites

inzombyac

I think I may also have the same problem and have been experiencing it for a few weeks now. I use the quality replacement, but I do not use the episode quality in the file name however.  I've been trying a few different things to try to resolve it with no luck.  At this point I have turned off the metadata options in Sonarr so that no metadata is created.  Emby server recognizes the files and adds them during a library scan.  Sometimes it adds all the metadata.  Sometimes I get just the title, season and episode number.  In other cases, it just gets the title and season.  It only seems to happen for newly aired episodes.  If I add an episode to a show in Sonarr that has been around for a while, I get all the metadata fine.  Perhaps this is related to the quality replacement.  I'll keep an eye on that and post a log the next time it happens.

Link to comment
Share on other sites

kpate77
@@inzombyac - I have never had Sonarr set to handle metadata, so I don't think turning it off is going to help you.  

 

I did find and move the metadata reader priority for Emby xml ahead of nfo, but that didn't help either.

 

Something had to have changed either on the Emby side or Sonarr side recently.  I have not adjusted any settings on either side in several months.  
Link to comment
Share on other sites

inzombyac

 

@@inzombyac - I have never had Sonarr set to handle metadata, so I don't think turning it off is going to help you.  
 
I did find and move the metadata reader priority for Emby xml ahead of nfo, but that didn't help either.
 
Something had to have changed either on the Emby side or Sonarr side recently.  I have not adjusted any settings on either side in several months.  

 

 

I did this recently as well.  However, I had deleted all nfo's and turned off the settings to generate nfo's as well.  This had no effect.  I did notice in the metadata settings for series that the priority for The Open Movie Database was higher than TheTVDB.  I just changed that to see if it will help.  Looking at my logs, I am seeing a lot of these types of entries:

 

 

2015-04-10 07:09:45.8656 Info - App: Queueing task RefreshMediaLibraryTask
2015-04-10 07:09:45.8656 Info - App: Executing Scan media library
2015-04-10 07:09:46.0996 Info - App: Validating media library
2015-04-10 07:10:16.2852 Info - App: HttpClientManager GET: http://api.themoviedb.org/3/movie/248483?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=casts,releases,images,keywords,trailers&language=en&include_image_language=en,null
2015-04-10 07:10:16.4100 Error - App: Error getting response from http://api.themoviedb.org/3/movie/248483?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=casts,releases,images,keywords,trailers&language=en&include_image_language=en,null
*** Error Report ***
Version: 3.0.5572.0
Command line: C:\Users\John\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1
Processor count: 4
64-Bit OS: True
64-Bit Process: False
Program data path: C:\Users\John\AppData\Roaming\MediaBrowser-Server
Application Path: C:\Users\John\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
The remote server returned an error: (404) Not Found.
System.Net.WebException
  at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
  at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)

Not sure if it is related

Link to comment
Share on other sites

You have a movie with a TmdbId of 248483 and there is no movie on Tmdb with that id.

Link to comment
Share on other sites

inzombyac

@Luke: Thanks I was able to find the movie and fix it.  It is not related to this problem

 

Also, Sonarr grabbed a new episode in a series that usually has this issue.  So far so good.  Will check back in if the episode is replaced with a higher quality.

Link to comment
Share on other sites

inzombyac

And it just happened to me last yesterday.  12 Monkeys.S01E02.Mentally Divergent.mkv (old episode) was replaced. Prior to then the entire series had proper metadata. Now the episode only has the title and thumbnail.  Here's the log entry related to when the file was replaced:

2015-04-12 07:15:19.3709 Info - LibraryMonitor: \\FENIX\Videos\John\12 Monkeys reports change.
2015-04-12 07:15:19.3709 Info - LibraryMonitor: \\FENIX\Videos\John\12 Monkeys\Season 01\12 Monkeys.S01E02.Mentally Divergent.mkv reports change.
2015-04-12 07:15:19.3709 Info - LibraryMonitor: \\FENIX\Videos\John\12 Monkeys\Season 01 reports change.
2015-04-12 07:15:19.3709 Info - LibraryMonitor: \\FENIX\Videos\John\12 Monkeys\Season 01\metadata\12 Monkeys.S01E02.Mentally Divergent.xml reports change.
2015-04-12 07:15:19.3709 Info - LibraryMonitor: \\FENIX\Videos\John\12 Monkeys\Season 01\metadata\12 Monkeys.S01E02.Mentally Divergent.jpg reports change.
2015-04-12 07:15:19.4021 Info - App: Queueing task RefreshMediaLibraryTask
2015-04-12 07:15:19.4021 Info - App: Executing Scan media library
2015-04-12 07:15:19.7141 Info - App: Validating media library

I took a look at the folder where the series metadata is stored. It looks like when Emby deletes the thumbnail and xml files when a file changes.  The update created a thumbnail dated as of 4/12/15 7:20AM.  However there is no .xml file. If I run a library scan nothing is populated.  If I refresh I xml is created for the episode.  Any ideas on how to get the metadata to automatically be generated (or to prevent the deletion)?

Edited by inzombyac
Link to comment
Share on other sites

Happy2Play

LibraryMonitor: \\FENIX\Videos\John\12 Monkeys

What is your library structure?

Link to comment
Share on other sites

inzombyac

@@Happy2Play I have multiple libraries under \\SERVER\Videos, one for each user's content as well as a shared one.  The folder referenced is added as TV type.

@@Luke Sorry, I will post an issue properly once I can determine what is actually occurring. I don't want to steal the OP's post.

 

I'm still debugging this but I am leaning towards an issue on the Sonarr side. I have changed the file naming convention to use quality now.  I had this off before because historically, Emby would mark the higher quality files as unwatched. That no longer seems to be the case. I also turning off every single metadata option that is listed under metadata settings.  Before I had just set the top level to "Not Enabled" for each metadata type but under Wdtv and Roksbox, some of the sub-options were still turned on.  

 

With this setup, Sonarr deletes the lower quality video file, and creates a new one.  Emby sees this as a new video file and creates both the thumb and xml files. The original metadata files are left alone (which is fine by me).  I'll add more info to this topic if I can determine the root cause, but if it works in this configuration, I'm leaving everything as it is.  I think the key thing is to make sure that all of Sonarr's metadata settings are off.

Link to comment
Share on other sites

kpate77

@@inzombyac - please don't worry about stealing my post.  I was glad you chimed in, as I think you have more advanced knowledge than me on this and could better explain what was happening.  Sounds like we are having the exact same issue, so anything you can post to get it resolved is much appreciated.

 

I turned off the sub metadata settings in Sonarr as you suggested but I'm still getting the same result. While not disagreeing with you, I'm curious to know why you are leaning towards this being a Sonarr problem.  Sonarr is not creating a nfo file or editing Emby xml data.  To my knowledge,  all Sonarr is doing is dropping a renamed filed in a folder and Emby should handle it from there.  Per your logs and mine, Emby is recognizing that the file changed. However, it is not retaining (nor refreshing) the metadata.

 

I'm attaching the full Emby server log and screenshot below.  The Following S03E06 was originally at 720, but was replaced a few minutes ago (should be toward the bottom of the log) with a 1080 file - I do not have quality in the name, so both files had the same name.   The metadata was fine with the 720 file, but now it is missing info, including the episode number which causes the sorting to be disordered.  I still have a .jpg of The Following.S03E06 in the Emby server metadata folder, so as @@Luke stated it is not deleting the original file. I do not know how to locate the xml file to see if it still exists or what it now looks like.

 

 

 

552cef7075d48_Capture.png

 

 

server-63564566400.txt

Link to comment
Share on other sites

inzombyac

I turned off the quality setting in the rename settings in Sonarr again to test this again.  The error occurred again this morning (7:35AM) when the Flash was replaced.  Log file attached.

 

Application version: 3.0.5572.0

Server Windows 7 SP1

Look for The Flash (2014).S01E18.All-Star Team Up.mkv

 

server-63564679354.txt

Edited by inzombyac
Link to comment
Share on other sites

inzombyac

FYI...  I cross-posted this in the Sonarr forums: https://forums.sonarr.tv/t/are-metadata-files-deleted-when-an-episode-is-replaced-with-higher-quality/5228.  From the answer I received, Sonarr will attempt to cleanup metadata files when replacing an episode file (hence the Emby xml's are deleted).  My logs show that the Emby sees the XML's  and JPG's are deleted so this seems to confirm the behavior.  My guess is that Sonarr might have a file lock preventing the new XML from being generated. However, the jpg's are always generated so I don't understand that part.

 

I'm checking with Sonarr to see if the metadata files can be preserved.  In that case, this should allow everything to play nicely together.  Otherwise, I'm setting Sonarr to use the quality in the file name which seems to be a workaround for me.

 

Another option to consider is to have Emby store the metadata elsewhere (Advanced tab of Metadata settings).  Hopefully Sonarr won't be aware of the files in this location and I won't have to worry about deletes.  

Link to comment
Share on other sites

inzombyac

Looks like we can't prevent Sonarr from deleting the metadata unless it is stored in another location.  I've put in an Emby suggestion to look for missing metadata files on library scans.  I'm going to stick with the quality in the file name setting of Sonarr since that works for me. @@kpate77 Are you using Media Browser XML under Metadata Savers for episodes (Dashboard > Metadata > Services and select Episodes on the Media Type: dropdown)?  If you are, there should be a .xml file where your jpg's are.  If you switch to the quality in the file name setting in Sonarr and write the episode metadata, it should help.

Link to comment
Share on other sites

  • 2 weeks later...
kpate77

@@inzombyac - Thanks for your reply and suggestions!  I was on vacation for a week, then trying to catch up at work so I didn't have a change to look at it yet.

 

I saw that @@Luke posted on another thread that this might be addressed in the next server release. I think it will wait and see how that goes before further changing anything on my end.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...