NextPVR Forums

Full Version: CleanEPG - the sequel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
EDIT: I've pulled the download for this. If you use 0.95.11 or later the 'Complete EPG reload' option on the Capture Sources page in Config will have the same effect.

If you want to continue to use an older version of GB-PVR and would like a copy of CleanEPG then PM me. Original message below...



NOTE - For XMLTV users ONLY

I had a few responses to the first version and some feedback (mostly along the lines that it didn't work :o ). Hey! It worked fine for me but what can I say? Anyway, I'm still looking for testers (it's a new version).

What it does...

Checks Pending recordings in the GB-PVR database against XMLTV file sources and deletes them from the database if they don't match.

By default this runs in 'logging-only' mode. It won't delete from the database but you can check the CleanEPG.log file to make sure you agree with what would be deleted.

To use...

[INDENT]Unzip all files to your GB-PVR install folder

Open a command prompt, change directory to the GB-PVR folder and run...

CleanEPG

Check the logfile to see if you agree with what it thinks are invalid pending recordings
[/INDENT]
To delete the invalid pending recordings use...

CleanEPG -clean

You can also use -usestoptime to make it check that the end times of the pending recording are correct.

If you want to test it, use it WITHOUT the -clean switch first. If things don't look right then zip your CleanEPG.log file and your XMLTV file and email them to me.

Cheers,
Brian
Where does it get the source for the XML TV source file (i.e. the episode listings). Does it pull it from the GBPVR database or Config file (not sure where that information is actually stored.
KingArgyle Wrote:Where does it get the source for the XML TV source file (i.e. the episode listings). Does it pull it from the GBPVR database or Config file (not sure where that information is actually stored.
It enumerates the cap. sources from the DB. If a cap. source uses XMLTV, it uses the pathname to the XML file and checks pending recordings (for that cap. source only) against that file. It should work even if there are different XMLTV files for different cap. sources.
Well, I'll give it a whirl. I added it to my UpdateEpg.bat file. I'll keep an eye on the log file and see what it produces over the next couple of days. I'm using the XMLTV source for Zap2It, so should be a good test.
KingArgyle Wrote:Well, I'll give it a whirl. I added it to my UpdateEpg.bat file. I'll keep an eye on the log file and see what it produces over the next couple of days. I'm using the XMLTV source for Zap2It, so should be a good test.
I thought UpdateEPG.bat was a pre-processing batch file or have I lost touch?

You need to use it AFTER the EPG has been automatically updated. The idea is if the latest download of your XMLTV file has changes in, GB-PVR will import those as new programmes and if you have them as a Season Record they'll be scheduled.

CleanEPG is meant to identify the old invalid recordings as being no longer valid.
Okay, I'll switch it around.

I'll also need to start having GBPVR empty the episode guide....

So, If I'm using CDK Scheduler with this, I'll probably want to have CleanEPG run before the scheduler, that way it'll delete the recordings that are invalid now, and then CDK Scheduler can schedule the new corrected recordings.
bgowland Wrote:NOTE - For XMLTV users ONLY

What it does...

Checks Pending recordings in the GB-PVR database against XMLTV file sources and deletes them from the database if they don't match.

Brian

It seems to be working OK Smile

Would it be possible to add another function?
If for some scheduled recording there is same show, only with changed start time then if that start time is within some value (say 20 min.) scheduled recording will be updated instead of deleted?
Of course, there would be entry in log file to show that...
KingArgyle Wrote:I'll also need to start having GBPVR empty the episode guide....
Yes. To achieve the full effect. CleanEPG doesn't look for programmes that have been rescheduled unless they are set as Pending. I originally did get it to do this but my algorithm was VERY inefficient (parsing the XML file as flat text) and took 15mins at near 100% CPU time to process all programmes.

Quote:So, If I'm using CDK Scheduler with this, I'll probably want to have CleanEPG run before the scheduler, that way it'll delete the recordings that are invalid now, and then CDK Scheduler can schedule the new corrected recordings.
Yes I think so - I don't use CDK Scheduler but think that's how it should be done.
Fulir Wrote:It seems to be working OK Smile
Good news.

Quote:If for some scheduled recording there is same show, only with changed start time then if that start time is within some value (say 20 min.) scheduled recording will be updated instead of deleted?
The automated/daily GB-PVR EPG update process should produce the same effect. If a show gets rescheduled like this, GBPVR will create a new Pending recording and leave the previous (invalid) recording as it is. If you run CleanEPG immediately after the daily automated GBPVR EPG update, it will check both and remove the original one leaving the new (correct) recording alone. Or have I misunderstood what you mean?

Cheers,
Brian
I've updated the ZIP in the post at the start of this thread.

The only change is that it will now work OK if you have installed GB-PVR somewhere other than the default installation folder.
Pages: 1 2