mirror of
https://github.com/beetbox/beets.git
synced 2026-02-08 08:25:23 +01:00
Remove album_url, track_url
This commit is contained in:
parent
2b9bad71c5
commit
2d44c3133b
1 changed files with 2 additions and 10 deletions
|
|
@ -148,10 +148,6 @@ def _preferred_alias(
|
|||
return next(matches, None)
|
||||
|
||||
|
||||
def track_url(trackid: str) -> str:
|
||||
return urljoin(BASE_URL, f"recording/{trackid}")
|
||||
|
||||
|
||||
def _get_related_artist_names(
|
||||
relations: list[ArtistRelation], relation_type: ArtistRelationType
|
||||
) -> str:
|
||||
|
|
@ -161,10 +157,6 @@ def _get_related_artist_names(
|
|||
)
|
||||
|
||||
|
||||
def album_url(albumid: str) -> str:
|
||||
return urljoin(BASE_URL, f"release/{albumid}")
|
||||
|
||||
|
||||
def _preferred_release_event(release: Release) -> tuple[str | None, str | None]:
|
||||
"""Given a release, select and return the user's preferred release
|
||||
event as a tuple of (country, release_date). Fall back to the
|
||||
|
|
@ -365,7 +357,7 @@ class MusicBrainzPlugin(MusicBrainzAPIMixin, MetadataSourcePlugin):
|
|||
medium_index=medium_index,
|
||||
medium_total=medium_total,
|
||||
data_source=self.data_source,
|
||||
data_url=track_url(recording["id"]),
|
||||
data_url=urljoin(BASE_URL, f"recording/{recording['id']}"),
|
||||
length=(
|
||||
int(length) / 1000.0
|
||||
if (length := recording["length"])
|
||||
|
|
@ -506,7 +498,7 @@ class MusicBrainzPlugin(MusicBrainzAPIMixin, MetadataSourcePlugin):
|
|||
tracks=track_infos,
|
||||
mediums=len(release["media"]),
|
||||
data_source=self.data_source,
|
||||
data_url=album_url(release["id"]),
|
||||
data_url=urljoin(BASE_URL, f"release/{release['id']}"),
|
||||
barcode=release.get("barcode"),
|
||||
)
|
||||
info.va = info.artist_id == VARIOUS_ARTISTS_ID
|
||||
|
|
|
|||
Loading…
Reference in a new issue