diff --git a/plugins/TPBDMarkers/TPDBMarkers.yml b/plugins/TPBDMarkers/TPDBMarkers.yml index f0b2807b..19b50be1 100644 --- a/plugins/TPBDMarkers/TPDBMarkers.yml +++ b/plugins/TPBDMarkers/TPDBMarkers.yml @@ -1,6 +1,6 @@ name: The Porn DB Markers -description: Sync Markers from The Porn DB aka metadataapi.net -version: 0.1 +description: Sync Markers from The Porn DB aka theporndb.net +version: 0.2 url: https://github.com/stashapp/CommunityScripts/ exec: - python @@ -8,7 +8,7 @@ exec: interface: raw hooks: - name: Add Marker to Scene - description: Makes Markers checking against The Porn DB aka metadataapi.net + description: Makes Markers checking against The Porn DB aka theporndb.net triggeredBy: - Scene.Update.Post @@ -19,6 +19,6 @@ settings: tasks: - name: "Sync" - description: Get markers for all scenes with a stashid from metadataapi.net and no markers + description: Get markers for all scenes with a stashid from theporndb.net and no markers defaultArgs: mode: processScene diff --git a/plugins/TPBDMarkers/tpdbMarkers.py b/plugins/TPBDMarkers/tpdbMarkers.py index dfa0ad1e..2e635223 100644 --- a/plugins/TPBDMarkers/tpdbMarkers.py +++ b/plugins/TPBDMarkers/tpdbMarkers.py @@ -13,10 +13,10 @@ def processScene(scene): for sid in scene["stash_ids"]: - if sid["endpoint"] == "https://metadataapi.net/graphql": + if sid["endpoint"] == "https://theporndb.net/graphql": log.debug("Scene has a TPDB stash id, looking up %s " % (sid["stash_id"],)) res = request_s.get( - "https://api.metadataapi.net/scenes/%s" % (sid["stash_id"],) + "https://api.theporndb.net/scenes/%s" % (sid["stash_id"],) ) if res.status_code == 200: if "data" in res.json(): @@ -46,7 +46,7 @@ def processAll(): count = stash.find_scenes( f={ "stash_id_endpoint": { - "endpoint": "https://metadataapi.net/graphql", + "endpoint": "https://theporndb.net/graphql", "modifier": "NOT_NULL", "stash_id": "", }, @@ -75,7 +75,7 @@ def processAll(): scenes = stash.find_scenes( f={ "stash_id_endpoint": { - "endpoint": "https://metadataapi.net/graphql", + "endpoint": "https://theporndb.net/graphql", "modifier": "NOT_NULL", "stash_id": "", }, @@ -104,11 +104,11 @@ def processAll(): log.debug("settings: %s " % (settings,)) # Set up the auth token for tpdb -if "https://metadataapi.net/graphql" in [ +if "https://theporndb.net/graphql" in [ x["endpoint"] for x in stash.get_configuration()["general"]["stashBoxes"] ]: for x in stash.get_configuration()["general"]["stashBoxes"]: - if x["endpoint"] == "https://metadataapi.net/graphql": + if x["endpoint"] == "https://theporndb.net/graphql": request_s.headers["Authorization"] = "Bearer %s" % (x["api_key"],) if "mode" in json_input["args"]: