How would you go about doing that?
I imagine a solution using global variables would simply save n = [Episode], then, for the next file, compare [Episode] to n + 1. But it occurred to me there may be an easier solution—using IsMissing() to determine if the previous episode file exists. This, of course, relies on consistent filenames so the [Filename] of the expected previous (or next) episode can be determined from the current episode. This expression...
If(IsEqual([File Type], log), ,
If(IsEqual(Right(RemoveRight([Filename], 6), 1), -), double,
If(IsMissing(RemoveRight([Filename], 6)PadNumber(Math([Episode] - 1), 2).avi),
If(IsMissing(RemoveRight([Filename], 6)PadNumber(Math([Episode] - 1), 2).mkv),
If(IsMissing(RemoveRight([Filename], 6)PadNumber(Math([Episode] - 1), 2).mp4),
next, ), ), )))
...works in my circumstances, but could be adapted for others. First, I test for and exclude my 'log' files (used to display series info). Others who don't 'watch and delete' as I do might do the same with episodes #1—so they are not flagged. The expression then checks for the existence of a previous episode—for each [File Type] that might exist. If there isn't one, then it's either the
next available episode, or the previous episode is missing. I decided that in an episode list, it would be fine to flag the first available episode as the
next up, and any subsequent episode would indicate a missing episode (obviously, there can't be two 'next' episodes). The only other exception that occurs in my circumstance is the double episode. If that's detected (based on the filename including a pattern like 'S02E09-10'), then that episode is flagged as a
double.
The screenshot illustrates how this might be used. I use a single red dot to indicate the
next episode (which, since I watch and delete, is always the first). Episode 5 is missing, so Episode 6 is also flagged. In this case, it's evident the flag means "Stop. An episode is missing." (The solution is not perfect. If I do nothing about this, the flag will disappear after I've watched and deleted episodes 1 through 4.) Episode 9 is a
double (Episodes 9 & 10), as indicated with two red dots.
The bottom problem is Sickbeard, yes.
I don't want to belabour the point, but I was trying to point out using Sick Beard's
Episode Status Management feature makes it impossible not to notice 'wanted' episodes. That list includes only episodes just released and not yet acquired, or older ones 'missing' for some other reason.