mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
IPFS plugin: Add note to check hashes carefully
In the future, just checking that a hash begins with "Qm" and has length 46 will likely not be sufficient.
This commit is contained in:
parent
ca8c557840
commit
c5319274ca
1 changed files with 2 additions and 0 deletions
|
|
@ -147,6 +147,8 @@ class IPFSPlugin(BeetsPlugin):
|
|||
def ipfs_get(self, lib, query):
|
||||
query = query[0]
|
||||
# Check if query is a hash
|
||||
# TODO: generalize to other hashes; probably use a multihash
|
||||
# implementation
|
||||
if query.startswith("Qm") and len(query) == 46:
|
||||
self.ipfs_get_from_hash(lib, query)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue