remove slashes from album titles
This commit is contained in:
parent
aa97ff994f
commit
9c4ece45d2
1 changed files with 5 additions and 2 deletions
|
@ -7,6 +7,7 @@ import sys
|
||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
import re
|
||||||
from Crypto.Cipher import AES
|
from Crypto.Cipher import AES
|
||||||
from Crypto.Util import Counter
|
from Crypto.Util import Counter
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
@ -77,8 +78,10 @@ def download_track(
|
||||||
partSize: int = 1048576,
|
partSize: int = 1048576,
|
||||||
) -> Tuple[bool, str]:
|
) -> Tuple[bool, str]:
|
||||||
try:
|
try:
|
||||||
dl_path = f"{DL_PATH}/{track.album.name}/{track.name}.part" # type: ignore[reportOptionalMemberAccess]
|
album_name = re.sub('/', ' ', track.album.name) # type: ignore[reportOptionalMemberAccess]
|
||||||
dest_path = f"{DEST_PATH}/{track.album.name}/{track.name}" # type: ignore[reportOptionalMemberAccess]
|
track_name = re.sub('/', ' ', track.name) # type: ignore[reportOptionalMemberAccess]
|
||||||
|
dl_path = f"{DL_PATH}/{album_name}/{track_name}.part" # type: ignore[reportOptionalMemberAccess]
|
||||||
|
dest_path = f"{DEST_PATH}/{album_name}/{track_name}" # type: ignore[reportOptionalMemberAccess]
|
||||||
|
|
||||||
if os.path.exists(dest_path) and SKIP_DOWNLOADED:
|
if os.path.exists(dest_path) and SKIP_DOWNLOADED:
|
||||||
print(dest_path + " exists!")
|
print(dest_path + " exists!")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue