Skip to content

XVicarious/file_hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file_hash

File hasing plugin for Flexget

Notes

  • While it may work on other versions, I only will support Python 3.6+
  • I have decided that as the depreciation of Python 2.7 is a little over a year away, I will not be bothering to support it.
  • I have plans to add support for asyncio
  • HEY, LISTEN: Even though stop and time are in the schema, they are not implemented yet.

Usage

  • The default hashing method depends on your python installation:
  • If you have Python 3.6+, it will use BLAKE2b
  • Otherwise, it will use MD5
  • The list of usable methods is determined by hashlib.algorithms_available
  • To use the default hashing method:
  • file_hash: yes
  • To use a custom hashing method (for example sha1):
  • file_hash: sha1
  • You may choose MAX 2 of the following options: size, start, stop.
  • Using all three of these together sets up a chance that the difference between start and stop could be either smaller or larger than size.
  • If the start position is larger than size of the file, one of two things will happen:
  1. If the size of the file is smaller than size, start is set to 0, OR
  2. If the size of the file is larger than size (but still smaller than start), start will be set to the size of the file minus size
  • To use advanced options, see below

Example

templates:
  
  file_hash_basic:
    <<: *any-file-input-plugin
    file_hash: yes
    
  file_hash_basic_extended: # These are the settings when you use "file_hash: yes"
    <<: *any-file-input-plugin
    file_hash:
      algorithm: blake2b # Or if your system doesn't have blake2b, this will be md5
      size: 25
      start: 50
    
  file_hash_algorithm:
    <<: *any-file-input-plugin
    file_hash: sha1
    
  file_hash_advanced:
    <<: *any-file-input-plugin
    file_hash:
      algorithm: sha256 # Optional, default will be chosen if this is not set
      size: 1 # Will hash 1MiB of the given file
      start: 25 # Will start at 25MiB into the file, see usage for how this applies to files smaller than this value

About

File hashing plugin for Flexget

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages