(2013-05-18 17:39)Montellese Wrote:(2013-05-18 16:47)pieh Wrote:(2013-05-17 17:09)Bstrdsmkr Wrote: How would you handle plugins that don't have access to all movies that they can provide in a reasonable fashion? For example, some sites only list say 25 items at a time and don't have a full content listing on one page, so it would require a bunch of page requests to list everything so you can do the comparison.I must admit I didn't think of it earlier and assumed that plugin can get data in single call via some api.
There's nothing we can do about that - we will have to wait for plugin to gather all available media (this is needed to do proper housekeeping of stored items). What we can do is to allow plugins to insert items in batches - one for each page and it could enable media added in batch. And if there is no more media to add plugin might just state it and that would trigger cleaning up of outdated medias. This will be done in background so fact that it will take longer to gather media shouldn't affect browsing much - it won't block gui to import media!
IMO any plugin that can't list all the media items in a single call provides so many items that it wouldn't make sense to blindly add them all to the library. Nobody wants all the Youtube videos in their library but users might want to manually add a few ones when browsing in the youtube addon. For other plugins (like e.g. Netflix) however it makes sense that all the items are added to the library but those shouldn't have a problem to provide them all in one go.
That's pretty much what I was thinking, but when you're generalizing it like this you'd need some way to know that X plugin doesn't support full listing
On a similar topic, what about upper limits? For example if a plugin can provide 40,000 TV Shows all at once is the client going to crash and burn?