-
Notifications
You must be signed in to change notification settings - Fork 81
Add URL to ImageHash and use in issue window #735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Any issues with this? Seems like the easiest solution. |
The ImageHash is for making so we don't download the cover image, if a user needs it for manual matching we should instead give a link to the webpage for the comic. Also adding url to |
That's on the talker for being inconsistent
Why? |
The source may not provide hashes for alternatives (Metron being our only example currently) so it should be expected that alternatives may be a URL list and the cover is an
Otherwise the talker would have to make all cover image URL into a hash and then I guess have the hash value be Maybe it's something simple I'm missing here? |
Why would we download an image to hash it when we already have the hash? |
Download the image ImageHash(0, "", "https://image.jpg") Use the hash ImageHash(23456, "ahash", "") Use the hash ImageHash(23456, "ahash", "https://image.jpg") I don't understand how it would be interpreted any other way |
All talkers would need to be changed. I presumed this was the reason for having the The edge case of being able to use the cover image URL in the GUI but not for matching would be ignored? It might help to prevent confusion I suppose as if you see the cover in the GUI but then it won't match... I feel like other than the edge case there's something else but I can't think of it so maybe there isn't... |
Shall I do something like: class GenericMetadata:
def __setattr__(self, name: str, value: Any):
if name == "_cover_image" and isinstance(value, str):
self.__dict__["_cover_image"] = ImageHash(Hash=0, Kind="", URL=value)
else:
super().__setattr__(name, value) And rename |
No, plugins will need to update. |
…redundent or for HashImage.URL value
At the moment there is an image hash class for |
No that's going through a bunch of different changes right now |
Right now your tests are failing, but otherwise this looks good |
This allows to use of
ImageHash
and for the issue window to display covers.alt_images = [str(url) for url in issue._alternate_images]
I didn't roll into[str(issue._cover_image) or "", *alt_images]
for ease of reading.