Fix small typo in tag parsing
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 22 Feb 2025 11:00:34 +0000 (12:00 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 22 Feb 2025 11:00:34 +0000 (12:00 +0100)
music_assistant/helpers/tags.py

index 590a1dc1904bc3d8e6ee9b9d1df12b09097b4657..f5f0fe640a559aa2aec69ecdb4aeaec172aea481 100644 (file)
@@ -533,10 +533,10 @@ def parse_tags_mutagen(input_file: str) -> dict[str, Any]:
             result["artistsort"] = tags["TSOP"].text
         if "TSO2" in tags:
             result["albumartistsort"] = tags["TSO2"].text
-        if "TSOT" in tags:
-            result["titlesort"] = tags["TSOT"].text
-        if "TSOA" in tags:
-            result["albumsort"] = tags["TSOA"].text
+        if tags.get("TSOT"):
+            result["titlesort"] = tags["TSOT"].text[0]
+        if tags.get("TSOA"):
+            result["albumsort"] = tags["TSOA"].text[0]
 
         del tags
         return result