diff --git a/provider/mappers/tpdb_to_plex.py b/provider/mappers/tpdb_to_plex.py index ea2042f..28fb9cd 100644 --- a/provider/mappers/tpdb_to_plex.py +++ b/provider/mappers/tpdb_to_plex.py @@ -345,7 +345,7 @@ def map_scene_to_match(scene: dict[str, Any], score: int = 100, media_type: int if collections: match_result["Collection"] = collections - match_result["isAdult"] = 1 + match_result["isAdult"] = True guid_entries = _get_guid_entries(scene) if guid_entries: @@ -434,7 +434,7 @@ def map_scene_to_metadata(scene: dict[str, Any], media_type: int = 1) -> dict[st if collections: metadata["Collection"] = collections - metadata["isAdult"] = 1 + metadata["isAdult"] = True guid_entries = _get_guid_entries(scene) if guid_entries: diff --git a/tests/test_tpdb_enrichment.py b/tests/test_tpdb_enrichment.py index 544346f..fbd77ed 100644 --- a/tests/test_tpdb_enrichment.py +++ b/tests/test_tpdb_enrichment.py @@ -36,7 +36,7 @@ def test_metadata_uses_image_fallback_director_and_collection(self): metadata.get("Role"), [{"tag": "Performer", "id": "tpdb://performer/p1", "thumb": "https://img/p.jpg"}], ) - self.assertEqual(metadata.get("isAdult"), 1) + self.assertIs(metadata.get("isAdult"), True) self.assertEqual( metadata.get("Guid"), [{"id": "imdb://tt1234567"}, {"id": "tmdb://98765"}, {"id": "tpdb://123"}], @@ -57,7 +57,7 @@ def test_match_supports_nested_images(self): self.assertEqual(match.get("thumb"), "https://img/poster.jpg") self.assertEqual(match.get("art"), "https://img/bg.jpg") - self.assertEqual(match.get("isAdult"), 1) + self.assertIs(match.get("isAdult"), True) self.assertEqual(match.get("Guid"), [{"id": "tvdb://321"}, {"id": "tpdb://123"}]) def test_studio_added_to_match_collection_without_duplicates(self):