Files
musicseerr/backend/models/artist.py
T
Harvey 343bafd7f4 feat: Requests / Add to Library Rework - Unmonitored album default + … (#25)
* feat: Requests / Add to Library Rework - Unmonitored album default + Resilience

* checking for source + refresh album logic

* artist monitoring + auto downloading + various request fixes

* synchronous album requests

* format
2026-04-06 23:08:58 +01:00

62 lines
1.7 KiB
Python

from infrastructure.msgspec_fastapi import AppStruct
class ExternalLink(AppStruct):
type: str
url: str
label: str | list[str]
category: str = "other"
def __post_init__(self) -> None:
if isinstance(self.label, list):
object.__setattr__(self, "label", self.label[0] if self.label else self.type)
class LifeSpan(AppStruct):
begin: str | None = None
end: str | None = None
ended: str | None = None
class ReleaseItem(AppStruct):
id: str | None = None
title: str | None = None
type: str | None = None
first_release_date: str | None = None
year: int | None = None
in_library: bool = False
requested: bool = False
class ArtistInfo(AppStruct):
name: str
musicbrainz_id: str
disambiguation: str | None = None
type: str | None = None
country: str | None = None
life_span: LifeSpan | None = None
description: str | None = None
image: str | None = None
fanart_url: str | None = None
banner_url: str | None = None
thumb_url: str | None = None
fanart_url_2: str | None = None
fanart_url_3: str | None = None
fanart_url_4: str | None = None
wide_thumb_url: str | None = None
logo_url: str | None = None
clearart_url: str | None = None
cutout_url: str | None = None
tags: list[str] = []
aliases: list[str] = []
external_links: list[ExternalLink] = []
in_library: bool = False
in_lidarr: bool = False
monitored: bool = False
auto_download: bool = False
albums: list[ReleaseItem] = []
singles: list[ReleaseItem] = []
eps: list[ReleaseItem] = []
release_group_count: int = 0
service_status: dict[str, str] | None = None