mirror of
https://github.com/Wojtek242/qobuz-dl.git
synced 2024-11-22 11:05:25 +01:00
fix error with slashes #1
This commit is contained in:
parent
b98ffa3960
commit
a6ad33ad7d
@ -1,6 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
from qo_utils import metadata
|
from qo_utils import metadata
|
||||||
|
from pathvalidate import sanitize_filename
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
|
|
||||||
@ -58,7 +59,8 @@ def iterateIDs(client, id, path, quality, album=False):
|
|||||||
dirT = (meta['artist']['name'],
|
dirT = (meta['artist']['name'],
|
||||||
meta['title'],
|
meta['title'],
|
||||||
meta['release_date_original'].split('-')[0])
|
meta['release_date_original'].split('-')[0])
|
||||||
dirn = path + '{} - {} [{}]'.format(*dirT)
|
sanitized_title = sanitize_filename('{} - {} [{}]'.format(*dirT))
|
||||||
|
dirn = path + sanitized_title
|
||||||
mkDir(dirn)
|
mkDir(dirn)
|
||||||
getCover(meta['image']['large'], dirn)
|
getCover(meta['image']['large'], dirn)
|
||||||
for i in meta['tracks']['items']:
|
for i in meta['tracks']['items']:
|
||||||
@ -84,7 +86,8 @@ def iterateIDs(client, id, path, quality, album=False):
|
|||||||
dirT = (meta['album']['artist']['name'],
|
dirT = (meta['album']['artist']['name'],
|
||||||
meta['title'],
|
meta['title'],
|
||||||
meta['album']['release_date_original'].split('-')[0])
|
meta['album']['release_date_original'].split('-')[0])
|
||||||
dirn = path + '{} - {} [{}]'.format(*dirT)
|
sanitized_title = sanitize_filename('{} - {} [{}]'.format(*dirT))
|
||||||
|
dirn = path + sanitized_title
|
||||||
mkDir(dirn)
|
mkDir(dirn)
|
||||||
getCover(meta['album']['image']['large'], dirn)
|
getCover(meta['album']['image']['large'], dirn)
|
||||||
if int(quality) == 5:
|
if int(quality) == 5:
|
||||||
|
Loading…
Reference in New Issue
Block a user