Potential EPG123 "Next scheduled recording" bug

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html
Post Reply
Space

Posts: 2839
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

Potential EPG123 "Next scheduled recording" bug

#1

Post by Space » Sat Jan 21, 2023 2:41 am

Gary,

Today, my WMC machine was supposed to record two scheduled programs that were both starting at 8pm, however it did not start recording either of them. I noticed that nothing was recording at around 8:15pm and saw that WMC garbage cleanup was running. I am guessing that this is what prevented the two recordings from starting. I rebooted the system and after the system restarted, the two programs began to record.

Here is the EPG123 log:

Code: Select all

[1/20/2023 7:41:11 PM] ===============================================================================
[1/20/2023 7:41:11 PM]  Beginning epg123 client execution. version 1.7.3.0
[1/20/2023 7:41:11 PM] ===============================================================================
[1/20/2023 7:41:11 PM] *** Windows 7 Ultimate, 64-bit [Version: 6.1.7601.24544] ***
[1/20/2023 7:41:11 PM] *** Windows Media Center [Version: 6.1.7600.16385] is installed. ***
[1/20/2023 7:41:11 PM] [ INFO] Import: True , Match: True , NoLogo: False , Force: False , ShowProgress: False , NoGC: False , NoVerify: False , Verbose: False
[1/20/2023 7:41:51 PM] [ INFO] There is a recording in progress or the next scheduled recording is within 60 minutes. Delaying garbage collection and/or import.
[1/20/2023 7:56:27 PM] Entering PerformGarbageCleanup().
As you can see, it knew that there were upcoming recordings, but then about 15 minutes later, it started the garbage cleanup process anyway.

I'm wondering if there might be a bug in EPG123 that causes it to not see the upcoming recordings? Perhaps it fails to get the list of recordings and instead of recognizing that the query failed, it just assumes there are no recordings? Or perhaps some other bug is preventing it from properly detecting that there are upcoming recordings?

EDIT: I just remembered one thing, I use Remote Potato, and I've noticed that if you refresh the list of upcoming recordings in this program, it will not list any programs that are within 5 minutes of starting to record. I've always assumed this was because the "status" of the scheduled recording is changed 5 minutes before it is about to record (something like changing the status from "scheduled" to "about to record" or something like that). I'm wondering if that is the issue here, since the garbage cleanup started less than 5 minutes from when the recording was supposed to start and I assume you are checking the status of the scheduled recordings right before this.

User avatar
garyan2

Posts: 7476
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#2

Post by garyan2 » Sat Jan 21, 2023 5:41 am

Yah, it looks like the check for recordings fell in a hole. The enumeration for a recording state is None, Scheduled, Initializing, Recording, Recorded, and Deleted. The client checks for the recording states Initializing and Recording, as well as checking the registry for the next scheduled recording. If not initializing, recording, or next scheduled recording is more than 60 minutes away, then it will proceed with the garbage cleanup. It does this check every minute.

If there is a moment in time while WMC is changing recording states and updating the registry for next scheduled recording that can cause a false detection, I wasn't aware of it but that is the only thing I can think of to allow the garbage collection to proceed while a recording is imminent.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

Space

Posts: 2839
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#3

Post by Space » Sat Jan 21, 2023 12:15 pm

Perhaps if a check indicates it's OK to proceed, it should wait a bit (maybe 5-10 seconds) and check again to make sure? It would only proceed if both checks indicate that it is OK. Another option is to just have the 1-minute interval check maintain a counter that increments each time the check indicates it is OK to proceed and only proceed once the counter >= 2, this method would delay the update/gc by a minute instead of just 5-10 seconds, however.

I've had a few instances of recordings not recording over the past few months, but I've not caught it while it was happening until now. I did not think to check the event viewer to see if the garbage cleanup was running during the time the recordings should have taken place, so I suppose this may have affected me in the past as well, although I don't know how rare this condition is. I assume it might be more prevalent on a more busy system, and my dedicated HTPC is still dead, so I am using another system that is doing multiple other things, so it may be much busier than a dedicated system might be and certain actions may take longer than they would normally.
Last edited by Space on Sat Jan 21, 2023 3:09 pm, edited 1 time in total.

User avatar
alhaunts

Posts: 66
Joined: Wed Jan 01, 2020 5:45 pm
Location:

HTPC Specs: Show details

#4

Post by alhaunts » Sat Jan 21, 2023 1:05 pm

I have the EPG123 Scheduled Task set to run in the wee hours of the morning where I'm very unlikely to be recording anything.

User avatar
IT Troll

Posts: 1184
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#5

Post by IT Troll » Sun Jan 22, 2023 9:51 am

Yep, scheduling the task for the wee hours is the simplest and most robust solution.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

Space

Posts: 2839
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#6

Post by Space » Mon Jan 23, 2023 2:43 am

I like to run the guide update as close to prime-time as possible, that way I get any last-minute updates for all my recordings that are primarily during prime time.

On my main HTPC, I had split the guide update and garbage cleanup in to separate tasks, and did run the garbage cleanup during a time that was less likely to conflict with recordings.

However, my main HTPC is currently dead, so I had to move over the WMC function to my other PC, which is not dedicated to DVR functionality. I didn't really have time to set up this PC with the separate guide update and garbage cleanup tasks, so that is why it was running this way.

I have now separated the tasks once again, so should not have this problem anymore, but I still think it would be a good idea to try to remediate this problem in EPG123, as it does cause recordings to fail, which is one of the worst things that can happen to a DVR :D.

User avatar
garyan2

Posts: 7476
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#7

Post by garyan2 » Tue Jan 24, 2023 12:49 am

With Schedules Direct only updating their data twice a day from Gracenote, the likelihood of capturing a sudden change in your guide for any of your scheduled recordings is mighty slim. I understand what you are trying to accomplish/mitigate, but it seems this operating procedure can cause more problems than it is worth. The risk is much higher than the reward.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

Space

Posts: 2839
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#8

Post by Space » Tue Jan 24, 2023 1:57 am

Up until now, I didn't know there was any risk.

SchedulesDirect may only update twice per day, but I am unaware of a specific schedule or if that schedule in consistent, so without any other information, updating as late as possible seems the most prudent if your goal is to have the most updated listings possible when your recordings are supposed to start.

Also, Schedules Direct was going to move their JSON service from PHP to Python last year which would have resulted in more frequent updates, but they had to back out of that move for technical reasons. It appears that this move is still in the plans, but there is no timeline, but when it does eventually occur, updating as close to prime time (or whenever the bulk of your recordings take place) would make even more sense.

I've been running the EPG123 update close to prime time for years now, and have had very little problems, so I don't think there is much of a risk (especially now that I've move the garbage cleanup task to another time). I have no statistics on how successful this method has been, but hypothetically, it is more likely to catch those late schedule changes (such as the President announcing a speech that will be broadcast on all networks the next day) so that WMC will not think you've recorded a program and it really has not (and instead recorded the President).

Post Reply