Skip to content

Commit

Permalink
[phashDuplicateTagger] use metadata_generate() instead of custom gene…
Browse files Browse the repository at this point in the history
…rate_phash() (#276)
  • Loading branch information
stg-annon authored Mar 11, 2024
1 parent f1f1a40 commit 4287579
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions plugins/phashDuplicateTagger/phashDuplicateTagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
date
tags { id }
files {
size
path
width
height
bit_rate
created_at
duration
frame_rate
video_codec
size
path
width
height
bit_rate
created_at
duration
frame_rate
video_codec
}
"""

Expand All @@ -59,7 +59,7 @@ def main():
if MODE == "clean_scenes":
clean_scenes()
if MODE == "generate_phash":
generate_phash()
stash.metadata_generate({"phashes": True})

log.exit("Plugin exited normally.")

Expand Down Expand Up @@ -277,15 +277,6 @@ def get_managed_tags(fragment="id name"):
tags.append(tag)
return tags


def generate_phash():
query = """mutation MetadataGenerate($input: GenerateMetadataInput!) {
metadataGenerate(input: $input)
}"""
variables = {"phashes": True}
stash._callGraphQL(query, variables)


if __name__ == "__main__":
for name, func in getmembers(config, isfunction):
if re.match(r"^compare_", name):
Expand Down

0 comments on commit 4287579

Please sign in to comment.