mirror of https://github.com/vitiko98/qobuz-dl
Merge pull request #228 from Qamynn/master
Sanitize album and track attributes
This commit is contained in:
commit
8096e6cf65
|
@ -254,8 +254,8 @@ class Download:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_track_attr(meta, track_title, bit_depth, sampling_rate):
|
def _get_track_attr(meta, track_title, bit_depth, sampling_rate):
|
||||||
return {
|
return {
|
||||||
"album": meta["album"]["title"],
|
"album": sanitize_filename(meta["album"]["title"]),
|
||||||
"artist": meta["album"]["artist"]["name"],
|
"artist": sanitize_filename(meta["album"]["artist"]["name"]),
|
||||||
"tracktitle": track_title,
|
"tracktitle": track_title,
|
||||||
"year": meta["album"]["release_date_original"].split("-")[0],
|
"year": meta["album"]["release_date_original"].split("-")[0],
|
||||||
"bit_depth": bit_depth,
|
"bit_depth": bit_depth,
|
||||||
|
@ -265,8 +265,8 @@ class Download:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_album_attr(meta, album_title, file_format, bit_depth, sampling_rate):
|
def _get_album_attr(meta, album_title, file_format, bit_depth, sampling_rate):
|
||||||
return {
|
return {
|
||||||
"artist": meta["artist"]["name"],
|
"artist": sanitize_filename(meta["artist"]["name"]),
|
||||||
"album": album_title,
|
"album": sanitize_filename(album_title),
|
||||||
"year": meta["release_date_original"].split("-")[0],
|
"year": meta["release_date_original"].split("-")[0],
|
||||||
"format": file_format,
|
"format": file_format,
|
||||||
"bit_depth": bit_depth,
|
"bit_depth": bit_depth,
|
||||||
|
|
Loading…
Reference in New Issue