bubonic / TGC.bundle

The Great Courses Agent for Plex
42 stars 7 forks source link

Multiple courses with no listing causes hang when adding new courses #12

Closed bubonic closed 3 years ago

bubonic commented 3 years ago

When you've reached the point that two or more courses were not found and have no metadata in your library; upon adding new courses the agent gets stuck in a wait loop. As it scans your library files courses with no listings those courses may get added somewhere in between the data retrieval throwing off the TABCOUNT and causing the wait_until() to run until it dies out and exits.

Possible solution: having the wait function only wait based on a TABCOUNT multiple of 10 minutes. If it becomes exhausted open a new tab anyway, switch to that tab and try to get metadata.

in progress

bubonic commented 3 years ago

Fixed. Cause was not updating a global variable that the wait function depends on. Added some extra checks as well.