mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Fix path/title join
This commit is contained in:
parent
08bb1ccbf2
commit
d9d7fd5000
@ -45,10 +45,11 @@ if __name__ == "__main__":
|
|||||||
async with ClientSession() as client:
|
async with ClientSession() as client:
|
||||||
xem = TheXemClient(client)
|
xem = TheXemClient(client)
|
||||||
|
|
||||||
|
advanced = any(x == "-a" for x in sys.argv)
|
||||||
ret = guessit(
|
ret = guessit(
|
||||||
sys.argv[1],
|
sys.argv[1],
|
||||||
xem_titles=await xem.get_expected_titles(),
|
xem_titles=await xem.get_expected_titles(),
|
||||||
# extra_flags={"advanced": True},
|
extra_flags={"advanced": advanced},
|
||||||
)
|
)
|
||||||
print(json.dumps(ret, cls=GuessitEncoder, indent=4))
|
print(json.dumps(ret, cls=GuessitEncoder, indent=4))
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class UnlistTitles(Rule):
|
|||||||
consequence = [RemoveMatch, AppendMatch]
|
consequence = [RemoveMatch, AppendMatch]
|
||||||
|
|
||||||
def when(self, matches: Matches, context) -> Any:
|
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:
|
if not titles or len(titles) <= 1:
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user