Remove explicit tag (close #50)

This commit is contained in:
vitiko98 2021-01-08 18:08:05 -04:00
parent 7ef09f3c4a
commit e57cf32481
2 changed files with 1 additions and 8 deletions

View File

@ -71,19 +71,12 @@ def get_format(client, item_dict, quality, is_track_id=False, track_url_dict=Non
def get_title(item_dict): def get_title(item_dict):
album_title = item_dict["title"] album_title = item_dict["title"]
version = item_dict.get("version") version = item_dict.get("version")
is_explicit = item_dict.get("parental_warning")
if version: if version:
album_title = ( album_title = (
f"{album_title} ({version})" f"{album_title} ({version})"
if version.lower() not in album_title.lower() if version.lower() not in album_title.lower()
else album_title else album_title
) )
if is_explicit:
album_title = (
f"{album_title} (Explicit)"
if "explicit" not in album_title.lower()
else album_title
)
return album_title return album_title

View File

@ -13,7 +13,7 @@ requirements = read_file("requirements.txt").strip().split()
setup( setup(
name=pkg_name, name=pkg_name,
version="0.9.1", version="0.9.3",
author="Vitiko", author="Vitiko",
author_email="vhnz98@gmail.com", author_email="vhnz98@gmail.com",
description="The complete Lossless and Hi-Res music downloader for Qobuz", description="The complete Lossless and Hi-Res music downloader for Qobuz",