-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SageTV is making too many celebrity requests on Schedules Direct #475
Comments
Can't we just change this so that it only queries for the URLs when it adds a new Person object to the DB? It looks like the current code requests this for every person in the downloaded EPG programs; even if they already exist in the DB. |
That's still going to be a huge number of images. If I recall (I could be wrong) it only checks if the person doesn't already have an image URL in the DB. |
So this looks like the code that's actually causing the URL fetch to occur that has all the images for a given person: sagetv/java/sage/epg/sd/SDRipper.java Line 2285 in aff35f9
That is looping over addedAliases which looks like a combination of all addedAlises and addedPeople: sagetv/java/sage/epg/sd/SDRipper.java Line 2206 in aff35f9
And those look like they come from every person that appears in a program or series info: sagetv/java/sage/epg/sd/SDRipper.java Line 1825 in aff35f9
and sagetv/java/sage/epg/sd/SDRipper.java Line 2165 in aff35f9
So my thinking is that if we just changed SDUtils.getPerson to return an Object[2] and the first entry is the Person object and the second one is a Boolean indicating if it was added or not, then we can avoid putting Persons into addedAliases/addedPeople if they were not newly added. This will then miss updates for images added later, but that's no big deal IMO (better than removing support outright). I would think this would satisfy Bob's request since we're only requesting it for newly added things which will be a massive reduction over requesting it for everything each time. |
Bob reached out to ask us to stop pulling URL's for every possible head shot of the cast for every show when we update the EPG. The way this should have originally been implemented was to do an API query on demand (I knew this during implementation and was asked to not make API query a part of getting these head shots). I propose we just comment out this code section until it can be implemented the way Schedules Direct requires.
The text was updated successfully, but these errors were encountered: