mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 20:13:37 +01:00
Put all remote libs in a directory
This commit is contained in:
parent
17e81b6d6c
commit
538a99599e
1 changed files with 8 additions and 3 deletions
|
|
@ -118,9 +118,14 @@ class IPFSPlugin(BeetsPlugin):
|
|||
|
||||
def ipfs_import(self, lib, _hash):
|
||||
# TODO: should be able to tag libraries, for example by nicks
|
||||
subprocess.Popen(["ipfs", "get", _hash[0]])
|
||||
path = os.path.dirname(lib.path) + "/" + _hash[0] + ".db"
|
||||
shutil.move(_hash[0], path)
|
||||
# TODO: should create a special library for all remotes, merging all
|
||||
# entries
|
||||
lib_root = os.path.dirname(lib.path)
|
||||
remote_libs = lib_root + "/remotes"
|
||||
if not os.path.exists(remote_libs):
|
||||
os.makedirs(remote_libs)
|
||||
path = remote_libs + "/" + _hash[0] + ".db"
|
||||
subprocess.Popen(["ipfs", "get", _hash[0], "-o", path])
|
||||
def ipfs_added_albums(self, rlib, tmpname):
|
||||
""" Returns a new library with only albums/items added to ipfs
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue