I've been trying to develop a plugin for mylifetime.com. One of the annyoing traits of mylifetime.com is very slow loading times of web pages.
Currently I have a directory structure like this:
Show --> Season --> (Full Episodes | Clips) --> Video
After I select "Full Episodes" on a TV Show that has say 14 videos, I currently am downloading and parsing two different web pages (the first has the first 12 episodes and the second has the last 2) and then MediaObjectsForURL is being called for all 14 videos. The MediaObjectsForURL has to do an HTML.ElementFromURL call and an XML.ElementFromURL call. So I am estimating that I am performing 2 + (2 * 14) = 30 page retrievals for this one button click.
So when I click the "Full Episodes" button, Plex brings up the "Plex Media Server - Waiting for response..." dialog box. If this is the first time I've pressed this button, then Plex will silently fail as if I hadn't pressed the button. If I press the "Full Episodes" button again, or maybe even a third time, the button will succeed and I'll see the list of episodes.
My guess of what is going on is that Plex timeouts any selection after a certain specified amount of time. However, during that time, it is caching many of the web lookups. So the next time it does the same lookup, it can do new portions of it. Eventually, Plex will fill in all of the entries and show all the episodes.
So my question is, is there anyway to increase the Plex default timeout time?
Or is there a more intelligent way to organize this so that delays are minimized? I was thinking of doing something like:
Show --> Season --> Full Episodes --> (Episode 1 | Episode 2 | ... | Episode N) --> Video
where the (Episode 1 | Episode 2 | ... | Episode N) is just a DirectoryObject that points to the real episodes individually. That way each menu button click only has to deal with a maximum of one video at a time, rather than 14.
Yep you want to minimize the amount of HTTP calls for sure, that's probably what is slowing you down. Ideally for the main show listings you would want to try and pull enough metadata from a single page (like a page that lists all the video details) and populate that way.]
It would be helpful if we could see your plugin code, then we may be able to tell you where it's bottlenecking.
Yep you want to minimize the amount of HTTP calls for sure, that's probably what is slowing you down. Ideally for the main show listings you would want to try and pull enough metadata from a single page (like a page that lists all the video details) and populate that way.]
It would be helpful if we could see your plugin code, then we may be able to tell you where it's bottlenecking.
Thanks for the offer to look at my code. I tried to avoid doing this because it's pretty rough/ugly at this point.