fix/bandcamp #12

Merged
Hazel merged 22 commits from fix/bandcamp into experimental 2024-04-23 10:04:52 +00:00
Showing only changes of commit 1e62d371cd - Show all commits

View File

@ -22,6 +22,7 @@ from ..objects import (
)
from ..connection import Connection
from ..utils.support_classes.download_result import DownloadResult
from ..utils.string_processing import clean_song_title
from ..utils.config import main_settings, logging_settings
from ..utils.shared import DEBUG
@ -114,7 +115,7 @@ class Bandcamp(Page):
if object_type is BandcampTypes.SONG:
return Song(
title=name.strip(),
title=clean_song_title(name, artist_name=data["band_name"]),
source_list=source_list,
main_artist_list=[
Artist(
@ -254,7 +255,7 @@ class Bandcamp(Page):
def _parse_track_element(self, track: dict) -> Optional[Song]:
return Song(
title=track["item"]["name"].strip(),
title=clean_song_title(track["item"]["name"]),
source_list=[Source(self.SOURCE_TYPE, track["item"]["mainEntityOfPage"])],
tracksort=int(track["position"])
)
@ -337,7 +338,7 @@ class Bandcamp(Page):
mp3_url = value
song = Song(
title=data["name"].strip(),
title=clean_song_title(data["name"], artist_name=artist_data["name"]),
source_list=[Source(self.SOURCE_TYPE, data.get("mainEntityOfPage", data["@id"]), audio_url=mp3_url)],
album_list=[Album(
title=album_data["name"].strip(),