nostrenz / hatate-iqdb-tagger

Search and tag images using IQDB or SauceNAO to be imported into Hydrus.
77 stars 2 forks source link

Test URL is valid before sending to Hydrus #27

Open reiuwu opened 1 year ago

reiuwu commented 1 year ago

This isn't technically a bug, but sometimes SauceNAO will return a URL to a post that has been deleted, or replaced with a newer file. Is it possible for Hatate to test URLs for this before sending the URL to Hydrus?

nostrenz commented 1 year ago

For deleted file there's already something in place but only for some sources (such as Danbooru or Pixiv). When sending to Hydrus, rows for deleted post are ignored (the rows turns orange in the list) as otherwise Hydrus's downloader would skip it. If you encounter a deleted post still being sent to Hydrus, I'll be iterested in the post's URL so I can implement it as well.

There is however nothing for files with a parent-child relationship, and I've also encountered some cases where IQDB/SauceNAO return the child post instead of the parent, which can be the same image but better. Maybe I could try doing something to compare those and determine which one is the best, but in doing that there's also a risk of selecting an image which might not exactly be the same as the input one.