fix: Use tolerant XML parser for TMDB ID detection in NFO files
Local Docker Build (Dev) / build-dev (push) Successful in 20s
Local Docker Build (Dev) / build-dev (push) Successful in 20s
- Replace ET.parse() with _parse_nfo_with_tolerance() in parse_imdb_from_nfo - Handles NFO files with URLs appended after </movie> tag - Should resolve For the One (2024) TMDB ID detection issue - NFO had TMDB ID 1339758 but trailing URLs prevented XML parsing
This commit is contained in:
+1
-2
@@ -56,8 +56,7 @@ class NFOManager:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
tree = ET.parse(nfo_path)
|
root = self._parse_nfo_with_tolerance(nfo_path)
|
||||||
root = tree.getroot()
|
|
||||||
|
|
||||||
# Check for <uniqueid type="imdb">ttXXXXXX</uniqueid>
|
# Check for <uniqueid type="imdb">ttXXXXXX</uniqueid>
|
||||||
imdb_uniqueid = root.find('.//uniqueid[@type="imdb"]')
|
imdb_uniqueid = root.find('.//uniqueid[@type="imdb"]')
|
||||||
|
|||||||
Reference in New Issue
Block a user