Sorting recordings by Date Added not working as expected

It doesn't appear to be working that way.

I have 166 'TV Show' files imported.
This one should be #131/166 when sorted ascending (oldest on top) by either created date or last modified date.
And should be #37/166 when sorted descending (newest on top) by either created date or last modified date.

Since the web UI only displays 50 shows, if I sort by descending Date Added it should be #37, but it doesn't appear anywhere in the 50 shows displayed.

I typo'd (fingers too fast on numeric keypad) in my earlier post and corrected it, file was recorded 2019-07-19, not 2019-01-19.

So, I looked at the 37th entry to see what the dates were on that file.

Imported file 'Specials/Track Me if You Can (2010-11-10).mpg'

Channels DVR on Synology NAS
stat 'Specials/Track Me if You Can (2010-11-10).mpg'
Access: 2021-02-23 12:17:00.997198000 -0800
Modify: 2016-08-29 17:31:44.499902300 -0700
Change: 2016-08-29 17:31:44.499902300 -0700
Birth: -

Windows file properties (accessed via SMB)
Created: Sunday, March 03, 2019, 3:28:07 AM
Modified: Monday, August 29, 2016, 5:31:44 PM

Channels DVR files json (File 1172)
"CreatedAt": 1600625568 Sunday, September 20, 2020 11:12:48 AM GMT-07:00 DST
"ImportedAt": 1600625568411 Sunday, September 20, 2020 11:12:48 AM GMT-07:00 DST
"UpdatedAt": 1610909884028 Sunday, January 17, 2021 10:58:04 AM GMT-08:00

Guess I shouldn't be using this web UI view to check on my new imports.

When importing shows, it actually uses the creation date of the folder it’s in. So if you drag an existing folder in, it will respect the date you originally set up the show on disk.

If you create a new folder and drag in the episodes, it should use today’s date.

So there’s some background to help inform you.

1 Like

Can you post the same details for the newly imported file that you're not seeing sorted correctly? What area the CreatedAt and the smb vs nas file timestamps?

Imported file 'Specials/8 Days To the Moon and Back (2019-07-17)_cut.ts'

Channels DVR on Synology NAS
stat 'Specials/8 Days To the Moon and Back (2019-07-17)_cut.ts'
Access: 2021-02-22 18:42:01.389659400 -0800
Modify: 2019-07-19 18:50:35.927890500 -0700
Change: 2019-07-19 18:50:35.927890500 -0700
Birth: -

Windows file properties (accessed via SMB)
Created: Friday, July 19, 2019, 6:51:12 PM
Modified: Friday, July 19, 2019, 6:50:35 PM

Channels DVR files json (File 1988)
"CreatedAt": 1563587435 Friday, July 19, 2019 6:50:35 PM GMT-07:00 DST
"ImportedAt": 1614048121293 Monday, February 22, 2021 6:42:01 PM GMT-08:00
"UpdatedAt": 1614048121420 Monday, February 22, 2021 6:42:01 PM GMT-08:00

Some files, like my earlier example, show Created date more recent than Modified date when viewing on Windows, so I referred to my notes on this peculiar behaviour.

When copying files to another storage media, Microsoft Windows uses the date of copying as the new file Created date and not the original creation date of the file being copied. Therefore, the Created date can be more recent than the Modified date.

Looks like that one imported in correctly, with CreatedAt set to the original Change date.

The DVR only started using Change/Modified date from the file recently, so I think those older imports from Sep 2020 were using old code.

1 Like

Ahh, something that finally makes sense!
Any way to quick fix them, or would I have to re-import and re-match them?

With the next prerelease (v2021.02.24.0129), try clicking Refresh Metadata for an import and it should fix the CreatedAt.

Ooof, the classic early adoption of media center features bug!

1 Like

Wish I could, but we still need that missing Options button to get to Refresh Metadata...


Try new prerelease

1 Like

Thanks! Pre-release 2021.02.24.1640 now shows Options dropdown and Refresh Metadata updates file 1172 CreatedAt to the correct date now.
"CreatedAt": 1472517104 Monday, August 29, 2016 5:31:44 PM GMT-07:00 DST
Ref (Sorting recordings by Date Added not working as expected)

Will Refresh Metadata on my 165 other Imports later.

The latest has Refresh Metadata in the Actions box so you can batch it.

Thanks, but looks like I'll need to re-import them all since I have to move them to read-only mounts.

After making all my Imports read-only, I was able to keep what I had Imported, so tried what you said.

I'm assuming things here, like 'The lastest' meant 2021.02.24.1705 which is what I used.

Clicking Select All and choosing Refresh Metadata did not update all Show Imports. Only updated 42 (maybe only did what appears on the page, 50 I think?). So again I'm assuming that Select All really doesn't mean All?

I ended up going through them all (175, including 8 movies) one by one and doing the Refresh Metadata which did update the CreatedAt date on all of them.

It means everything you see in the list. It selects all of the items.

OK, appears that's what it did.

Since there is no way to really view All from there, it's not a good solution for what I was doing since I had more than 50 and just wrongly assumed that All really meant All, not just All visible on the page.

I should probably have figured out a curl command and walked through my files in a script.
If I could select all Shows or all Movies in the Library view, that would have worked.
Anyways, water under the bridge.

Thanks, my database is now updated!

P.S. Wanted to add the fact that this started because I thought Date Added meant the date that I Imported the Special/Episode/Movie and didn't realize you used the last modified date of the file.

I was wondering why when I slected all I only saw a few recordings not all. I thought all means all lol apparently not.

Related question about sorting by date added. I'm trying to adjust the sorting by date added of recorded movies by changing the "date modified" or "creation date" of some movie files in the \movies folder. Per the above discussion I executed an "refresh metadata" command but nothing has changed. Is there a way to manually get movies to the front of the sort by date added library page?

I believe those file times are only used during initial import and not by refresh meta