fix: NCM metadata parse
This commit is contained in:
parent
6fa250c99f
commit
b66d74ecb3
@ -87,12 +87,18 @@ class Lrc:
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
key: str = data["c"][0]["tx"]
|
match len(data["c"]):
|
||||||
value: str = data["c"][1]["tx"]
|
case 1:
|
||||||
except KeyError:
|
key, value = data["c"][0]["tx"].replace(":", ":").split(":")
|
||||||
|
case 2:
|
||||||
|
key = data["c"][0]["tx"]
|
||||||
|
value = data["c"][1]["tx"]
|
||||||
|
case _:
|
||||||
|
return
|
||||||
|
except (KeyError, ValueError):
|
||||||
return
|
return
|
||||||
|
|
||||||
key = key.strip(" :")
|
key = key.strip(" ::")
|
||||||
value = value.strip()
|
value = value.strip()
|
||||||
|
|
||||||
self.specials["metadata"].append((LrcMetaType.Author, f"{key}/{value}"))
|
self.specials["metadata"].append((LrcMetaType.Author, f"{key}/{value}"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user