Skip to content

Commit

Permalink
Merge pull request #1951 from glensc/fix-unmatched-async
Browse files Browse the repository at this point in the history
Fix: unmatched command async code calls
  • Loading branch information
glensc authored May 16, 2024
2 parents 93f8573 + 9b1da64 commit 522d6af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plextraktsync/commands/unmatched.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from plextraktsync.commands.login import ensure_login
from plextraktsync.decorators.coro import coro
from plextraktsync.factory import factory


def unmatched(no_progress_bar: bool, local: bool):
@coro
async def unmatched(no_progress_bar: bool, local: bool):
factory.run_config.update(progressbar=not no_progress_bar)
ensure_login()
plex = factory.plex_api
Expand All @@ -16,11 +18,11 @@ def unmatched(no_progress_bar: bool, local: bool):

failed = []
if local:
for pm in walker.get_plex_movies():
async for pm in walker.get_plex_movies():
if all(guid.local for guid in pm.guids):
failed.append(pm)
else:
for pm in walker.get_plex_movies():
async for pm in walker.get_plex_movies():
movie = mf.resolve_any(pm)
if not movie:
failed.append(pm)
Expand Down

0 comments on commit 522d6af

Please sign in to comment.