4481f1d998
The monitor's quality-upgrade path was inert: run_pipeline's intake short-circuit treated any existing LibraryItem as "done", so a monitor-driven upgrade job for a below-cutoff copy jumped straight to imported without downloading. Intake now checks whether the job is monitor-driven (Request.monitoredReleaseId IS NOT NULL) and, if so, only short-circuits when the existing copy already meets the quality cutoff; plain manual requests keep exact slice-1 behavior. Also drops an unused `field` import in browser.py. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
665 B
Python
29 lines
665 B
Python
from dataclasses import dataclass
|
|
from typing import Protocol
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class ArtistHit:
|
|
mbid: str
|
|
name: str
|
|
disambiguation: str = ""
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class ReleaseGroupInfo:
|
|
rg_mbid: str
|
|
title: str
|
|
primary_type: str = ""
|
|
secondary_types: tuple[str, ...] = ()
|
|
first_release_date: str = ""
|
|
|
|
|
|
class MbBrowser(Protocol):
|
|
def search_artist(self, name: str) -> list[ArtistHit]:
|
|
"""Artist name search → ranked hits (best first)."""
|
|
...
|
|
|
|
def browse_release_groups(self, artist_mbid: str) -> list[ReleaseGroupInfo]:
|
|
"""All official release-groups for an artist MBID."""
|
|
...
|