Merge pull request #228 from Qamynn/master

Sanitize album and track attributes
This commit is contained in:
Vitiko 2023-08-21 18:36:43 -04:00 committed by GitHub
commit 8096e6cf65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -254,8 +254,8 @@ class Download:
@staticmethod
def _get_track_attr(meta, track_title, bit_depth, sampling_rate):
return {
"album": meta["album"]["title"],
"artist": meta["album"]["artist"]["name"],
"album": sanitize_filename(meta["album"]["title"]),
"artist": sanitize_filename(meta["album"]["artist"]["name"]),
"tracktitle": track_title,
"year": meta["album"]["release_date_original"].split("-")[0],
"bit_depth": bit_depth,
@ -265,8 +265,8 @@ class Download:
@staticmethod
def _get_album_attr(meta, album_title, file_format, bit_depth, sampling_rate):
return {
"artist": meta["artist"]["name"],
"album": album_title,
"artist": sanitize_filename(meta["artist"]["name"]),
"album": sanitize_filename(album_title),
"year": meta["release_date_original"].split("-")[0],
"format": file_format,
"bit_depth": bit_depth,