cjmanca / plex-credits-detect

Augments plex's built in intro detection, additionally detecting credits.
MIT License
114 stars 5 forks source link

Unhandled exception. System.ArgumentOutOfRangeException #24

Closed svennp closed 2 years ago

svennp commented 2 years ago

I'm getting this error when running it now. It scanned a bunch of episodes at first, then it just stopped. now i get this error when starting the program.

running on windows server 2019

Syncing newly added episodes from plex...

Unhandled exception. System.ArgumentOutOfRangeException: Not a valid Win32 FileTime. (Parameter 'fileTime')
   at System.DateTime.FromFileTimeUtc(Int64 fileTime)
   at plexCreditsDetect.Episode.ParseInfoFromPath(String path) in C:\Documents\projects\plex-credits-detect\plex-credits-detect\Episode.cs:line 319
   at plexCreditsDetect.Database.PlexDB.GetRecentPlexIntroTimingsSingleQuery(DateTime since) in C:\Documents\projects\plex-credits-detect\plex-credits-detect\Database\PlexDB.cs:line 446

   at plexCreditsDetect.Scanner.CheckForNewPlexIntros() in C:\Documents\projects\plex-credits-detect\plex-credits-detect\Scanner.cs:line 1398
   at plexCreditsDetect.Program.Main(String[] args) in C:\Documents\projects\plex-credits-detect\plex-credits-detect\Program.cs:line 98
cjmanca commented 2 years ago

That's... interesting. That implies that the file exists, but doesn't have a valid "LastWriteTime". I didn't think that was possible. I can add an extra catch there, but I'd suggest running a chkdsk to verify your filesystem indexes.

cjmanca commented 2 years ago

v1.0.15 is available which will handle the exception, and tell you which file it had problems with, which may help you decide which drive to scan for errors.

svennp commented 2 years ago

I just testet v1.0.15 and it now works.

The erroring files were some old avi files that do not have a modified timestamp in windows but the created timestamp still exist. The files are playable and it seems all that had happened were the lost modified timestamp on the files.