Flexget/Flexget

Improve exists_series efficiency

kolyagora asked for this feature about 2 years ago — 1 comment

kolyagora commented about 2 years ago

Currently, exists_series doesn't exit it's filesystem loop even after an entry was rejected and it was the only entry in series (or, in common, all entries were rejected). In fact, it keeps iterating over remaining files and dirs and matching it against already rejected entries. In case there are many files in specified directory it may significantly increase task execution time. I see a solution in excluding rejected entries from accepted_series[series] list and break the filesystem loop if accepted_series[series] is empty. But I don't know what is the right way to do it in Python.

Also it would be useful to have recursive and retrieve options like we have them in filesystem plugin.

https://github.com/Flexget/Flexget/issues/694

Join the discussion!

Sign-in with GitHub to comment