Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions provider/mappers/tpdb_to_plex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_tpdb_enrichment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}],
Expand All @@ -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):
Expand Down