Fix path/title join

This commit is contained in:
Zoe Roux 2024-04-28 22:18:36 +02:00
parent 08bb1ccbf2
commit d9d7fd5000
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -45,10 +45,11 @@ if __name__ == "__main__":
async with ClientSession() as client:
xem = TheXemClient(client)
advanced = any(x == "-a" for x in sys.argv)
ret = guessit(
sys.argv[1],
xem_titles=await xem.get_expected_titles(),
# extra_flags={"advanced": True},
extra_flags={"advanced": advanced},
)
print(json.dumps(ret, cls=GuessitEncoder, indent=4))

View File

@ -54,7 +54,7 @@ class UnlistTitles(Rule):
consequence = [RemoveMatch, AppendMatch]
def when(self, matches: Matches, context) -> Any:
titles: List[Match] = matches.named("title") # type: ignore
titles: List[Match] = matches.named("title", lambda x: x.tagged("title")) # type: ignore
if not titles or len(titles) <= 1:
return