Skip to content

Commit 522d6af

Browse files
authored
Merge pull request #1951 from glensc/fix-unmatched-async
Fix: unmatched command async code calls
2 parents 93f8573 + 9b1da64 commit 522d6af

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

plextraktsync/commands/unmatched.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from plextraktsync.commands.login import ensure_login
2+
from plextraktsync.decorators.coro import coro
23
from plextraktsync.factory import factory
34

45

5-
def unmatched(no_progress_bar: bool, local: bool):
6+
@coro
7+
async def unmatched(no_progress_bar: bool, local: bool):
68
factory.run_config.update(progressbar=not no_progress_bar)
79
ensure_login()
810
plex = factory.plex_api
@@ -16,11 +18,11 @@ def unmatched(no_progress_bar: bool, local: bool):
1618

1719
failed = []
1820
if local:
19-
for pm in walker.get_plex_movies():
21+
async for pm in walker.get_plex_movies():
2022
if all(guid.local for guid in pm.guids):
2123
failed.append(pm)
2224
else:
23-
for pm in walker.get_plex_movies():
25+
async for pm in walker.get_plex_movies():
2426
movie = mf.resolve_any(pm)
2527
if not movie:
2628
failed.append(pm)

0 commit comments

Comments
 (0)