jdoggvt 4 Posted September 10, 2015 Share Posted September 10, 2015 (edited) Hello, I use Sonarr for episodes which upgrades qualities now and then but the upgraded episodes show up in my recently added list every time. I have Sonarr creating the metadata and it sets the file creation date (really the file modified date) to the air date of the episode. I know that Kodi builds the 'recently added' list by the modified date of the files so I can fix the recently added list by refreshing the entire series inluding episodes but it seems like that is an uncessary step. Is there a way to set this data in the Emby database properly the first time so the recently added list in Kodi is kept up to date? Is Emby maybe just looking at the creation date of the nfo file and not the modification date for the new files? Emby Version 3.0.5724.3 Edited September 10, 2015 by jdoggvt Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted September 10, 2015 Share Posted September 10, 2015 In your emby server dashboard > metadata > advanced > Date added behavior for new content and set it to date scanned into library. This way quality updates won't be treated as new items. In Kodi, we only import the date added once, when the item is first added to your Kodi database. If the server is set to use file creation to detect date added, then it will generate a new item instead of replacing existing entry, hence why it will always display quality updates in recently added in Kodi. However, from some research with another user, it seems the server sets date added as today's date, then reads the nfo but by the time it reads the nfo, the file is already added to Kodi so it never gets the nfo date added. We are looking to fix this issue eventually, but currently our priority is to push out the next stable build. Link to comment Share on other sites More sharing options...
jdoggvt 4 Posted September 10, 2015 Author Share Posted September 10, 2015 Thanks very much for the reply. I think I tried the 'first scanned' option but I was still seeing upgraded episodes in the recently added list. I'll mess with it a bit to double-check, but I do have Sonarr add the source/quality to the filename. Will that cause Emby to see the upgraded episode as brand new? For example, Original file: Show - S02E01 - EpisodeName (HDTV-720p) Upgraded file: Show - S02E01 - EpisodeName (HDTV-1080p) Also what would be the best way of importing older episodes so they don't pop up in the recently added list without having to do a resfresh of the show? I'll typicall add whole seasons at a time which just floods the list with every episode. While I suppose technically these would be the most recent media added, it wouldn' t necessarily reflect the newest episodes added. Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted September 10, 2015 Share Posted September 10, 2015 I am pretty sure Emby looks at the TVDB to determine if it's the same item (even if quality is changed). I do use Sonarr too and it's not been an issue for me. However I do not append the quality information to the filename. I would have to do more testing to see. Once you change the setting, then this will only affect onwards modifications. Also, are the items showing in the recently added section (even for a quick moment) in the web client when you have the setting enabled, or not? Link to comment Share on other sites More sharing options...
jdoggvt 4 Posted September 10, 2015 Author Share Posted September 10, 2015 I just upgraded a recent episode and it moved it to the top of the 'latest episodes' list of both Emby and Kodi. Metadata is set to 'scan date' and the filenames followed this scheme again: Original file: Show - S02E01 - EpisodeName (HDTV-720p)Upgraded file: Show - S02E01 - EpisodeName (HDTV-1080p) the dateadded and aired fields are what you'd expect: <dateadded>2015-09-10 16:20:03</dateadded> - matches 'creation date' of file <aired>2015-09-08</aired> - matches 'modified date' of file which Kodi sorts by I checked the local database entry for this episode and here is every field with a date: c05 (First Aired): 2015-9-8 (correct) dateAdded: 2015-09-10 (matche file creation) premiered: 2013-07-09 (series premier) What's interesting is that the dateAdded field in the database is reset when I refresh this episode in Kodi: c05 First Aired: 2015-9-8 (still correct)dateAdded: 2015-09-08 (updated to match air date)premiered: 2013-07-09 (series premier) The dateAdded field isn't updated when I refresh the episode in Emby, it's only changed and put in the correct sort order when I update it from Kodi. It seems like perhaps the 'default' intended behavior for populating the Kodi database is to use the dateadded field for the airdate value? Would this update populate back to the main Emby database at some point? 1 Link to comment Share on other sites More sharing options...
smidley 20 Posted September 10, 2015 Share Posted September 10, 2015 I have this same exact issue. Server is set to scanned date to library, but I still see upgraded quality getting listed as newly added items. 1 Link to comment Share on other sites More sharing options...
Luke 37253 Posted September 10, 2015 Share Posted September 10, 2015 if the filename changes then it becomes new content. if you're using sonarr then it adds the quality to the filename Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted September 10, 2015 Share Posted September 10, 2015 Oh, so it doesn't look at the final identified item? That seems to defeat the purpose of date added to library. Link to comment Share on other sites More sharing options...
Luke 37253 Posted September 10, 2015 Share Posted September 10, 2015 sure it does. it supports the added field in nfo as an override. Link to comment Share on other sites More sharing options...
smidley 20 Posted September 10, 2015 Share Posted September 10, 2015 sure it does. it supports the added field in nfo as an override. So you have to use NFO files or the feature won't work? I don't use NFO files Link to comment Share on other sites More sharing options...
Luke 37253 Posted September 10, 2015 Share Posted September 10, 2015 or xml but local metadata is the mechanism used to preserve data when the file path of content changes. Link to comment Share on other sites More sharing options...
smidley 20 Posted September 10, 2015 Share Posted September 10, 2015 I don't use XML files either. That explains the problem. Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted September 10, 2015 Share Posted September 10, 2015 Did you know Luke, the message of new item is sent thru the websocket before the server reads the nfo? We first get added item (today's date), then updated item (which contains the nfo info with correct date added). Link to comment Share on other sites More sharing options...
jdoggvt 4 Posted September 10, 2015 Author Share Posted September 10, 2015 I use NFO files for all of my media. Sonarr currently generates it initially with the Emby setting checked to save metadata, etc. to the media folders. I'm really just trying to get the add behavior to match what Kodi does natively. Kodi seems to put the aired date (for sorting purposes) in the dateAdded field. Emby either reads the generated nfo dateAdded field or looks at the file's creation date as opposed to Kodi which looks at the date modified tag (again for sorting).This would be useful for not only preventing old/upgraded episodes from showing up in the recently added list, but also for importing blocks of episodes while keeping the recently added list accurate. If Emby generated all of the metadata would that help? Link to comment Share on other sites More sharing options...
Luke 37253 Posted September 10, 2015 Share Posted September 10, 2015 Something to consider for the future. Link to comment Share on other sites More sharing options...
jdoggvt 4 Posted September 10, 2015 Author Share Posted September 10, 2015 Is there somewhere I can add a feature request? I'd really like to ditch MySQL but I would need for the library features, even though this is a minor one, to work the same between MYSQL/native Kodi and Emby. Link to comment Share on other sites More sharing options...
jdoggvt 4 Posted September 10, 2015 Author Share Posted September 10, 2015 So there are options for using date scanned or date created, I guess I'm curious as to why there couldn't be one for date aired? Especially since it seems like this would emulate how Kodi populates the database. Link to comment Share on other sites More sharing options...
Recommended Posts