Scheduled Direct duplicate program requests
- Dominant language
- Java
- Stars
- 287
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
It has come to my attention that a SageTV client may get blocked temporarily for making multiple requests for the same program from Schedules Direct within a 24 hour period. While we do compare MD5 hashes to make sure we are not re-downloading program data we already have, we do re-query programs directly from Schedules Direct for some data we don't store in the Wizard database to fill in data such as series info that is not consistently available from Schedules Direct. We also do this when we are trying to generate recommendations.
I have written and am currently testing code that will add a folder to the SageTV folder named epgcache that will export the JSON from every program into files with the extension .program. When one of these files already exists and the MD5 hash is current, the file will be used instead of querying Schedules Direct. The files in this folder older than 14 days will also be regularly cleaned out so disk space usage doesn't get out of hand.
So far it looks like for a full cable lineup, you can expect 50,000-80,000 .program files consuming about 200-300MB of actual disk space (due to filesystem cluster sizes). I am open to suggestions if anyone finds this kind of disk usage outrageous or if anyone would like to point me to something already in SageTV that would consolidate this data better. I think that the data we're re-querying wouldn't be appropriately stored by expanding the Wizard database as we're only using parts of it to attempt to fill in some blanks and generate recommendations.
Contributor guide
Assessment
This issue has not been assessed yet.