ok, I realize this may not count as a bug, since you probably had no intention of handling this any differently now. But the act of "Archiving" a show kinda implies the user is trying to keep it! So having it count the archived episodes against the "Keep X number of recordings" count, and then delete an episode from the archive location rather defeats the purpose.
2012-08-05 22:00:03.984 [DEBUG] Started recording (177820:8:F:\Recordings\Monk\Monk_20120805_22002300.ts)
2012-08-05 22:00:04.048 [DEBUG] Starting: C:\Users\Public\NPVR\Scripts\ParallelProcessing.bat "F:\Recordings\Monk\Monk_20120805_22002300.ts" 8 177820 1532
2012-08-05 22:00:04.062 [DEBUG] - deleting extra recording: C:\Archive\Monk\Monk_20120729_22002300.ts (7/30/2012 5:00:00 AM)
2012-08-05 22:00:04.404 [DEBUG] -removing: C:\Archive\Monk\Monk_20120729_22002300.txt
2012-08-05 22:00:04.404 [DEBUG] -removing: C:\Archive\Monk\Monk_20120729_22002300.log
2012-08-05 22:00:04.406 [DEBUG] -removing: C:\Archive\Monk\Monk_20120729_22002300.edl
2012-08-05 22:00:04.411 [DEBUG] -removing: C:\Archive\Monk\Monk_20120729_22002300.logo.txt
I suggest two rules in your code when processing the "Keep X number of recordings" logic:
1. Count only the recordings which are currently stored in the current target recording path for that recurring recording.
2. Only delete the oldest show in the current target recording path for that recurring recording.
edit: also, while I've not tested it recently, I'm pretty sure there's still another bug in the auto-deletion logic that might be worth fixing:
if I am watching the oldest episode of a show when a new recording starts, it will try to delete the show I am watching and of course fail because it's open. but it will still remove the recording from the database, thus leaving the recording file 'orphaned' on the disk. After a few months, these orphans add up to many gigabytes of lost disk space, and I have to go hunting around and clean them up by hand. If the file delete fails, just leave the show in the database and go on... catch it next time.