airdcpp / airdcpp-windows

http://www.airdcpp.net
GNU General Public License v3.0
80 stars 19 forks source link

Ignore files by hash #109

Open ljestep opened 7 months ago

ljestep commented 7 months ago

Prerequisites

Is your proposal related to a problem?

No.

Describe the solution you would like

I would like to see the ability to create a Do Not Download list, by hash, filename or extension.

I've run across a variety of files that seem to crop up over and over ... trojans, extreme pornography, and files that simply claim to be one thing but are something else. For files like this I would like to be able to add the hashes to a list of files to ignore when downloading.

It would also be nice to do this by filename. Some examples would be desktop.ini, Thumbs.db, __MACOSX, .DS_Store, and @eadir.

Finally, there are some filename extensions I would like to be able to ignore. Specifically .qb! and .part Both are incomplete files.

Describe alternatives you have considered

I have these filtered so I do not share and propagate these files. I also have a program I wrote to scan my share periodically and remove these files. It would be so much nicer if they never showed up to begin with.

Screenshot(s)

No response

Additional information

No response

ljestep commented 7 months ago

Just realized that the ability to block based on filename is already there and I am actually using it. Duh....

Still, I believe being able to block based on hash would be a very useful utility.

ryehamstrawberry commented 7 months ago

The skiplist can easily exclude said filetypes.

maksis commented 4 months ago

There's an existing API hook that allows extensions to reject files from being queued: https://airdcpp.docs.apiary.io/#reference/queue/validation-hooks/add-bundle-file

If this is about rejecting harmful/junk files, it might be an even better idea to write an extension that manages a list of bad file names/hashes. Possibly the extension could even keep the harmful file database up-to-date automatically.

It's also possible to write an extension with a configurable list of skipped file hashes (it's even possible to add a context menu item for ignoring files from search/filelists).