add flake.nix dev shell
This commit is contained in:
@@ -163,26 +163,6 @@ class BCFreeDownloader:
|
||||
os.remove(file_name)
|
||||
return glob.glob(os.path.join(dir_name, "*"))
|
||||
|
||||
# Tag downloaded audio file with url & comment
|
||||
@staticmethod
|
||||
def tag_file(file_name: str, head_data: Dict):
|
||||
try:
|
||||
f = mutagen.File(file_name)
|
||||
if f is None:
|
||||
return
|
||||
|
||||
f["website"] = head_data["@id"]
|
||||
if head_data.get("keywords"):
|
||||
f["genre"] = head_data["keywords"]
|
||||
comment = ""
|
||||
comment += head_data.get("description", "").strip()
|
||||
comment += "\n\n" + head_data.get("creditText", "")
|
||||
f["comment"] = comment.strip()
|
||||
f.save()
|
||||
except Exception:
|
||||
# only should happen if the file doesn't support tags
|
||||
pass
|
||||
|
||||
def _download_purchased_album(
|
||||
self, user_id: int, tralbum_data: Dict
|
||||
) -> DownloadRet:
|
||||
|
||||
Reference in New Issue
Block a user