This commit is contained in:
2026-02-01 19:01:47 -08:00
parent 95748698fa
commit f0a82c2403
7 changed files with 113 additions and 50 deletions

View File

@@ -150,6 +150,22 @@ class Provider(ABC):
or self.__class__.__name__
).lower()
@property
def label(self) -> str:
"""Friendly display name for the provider."""
if hasattr(self, "NAME") and self.NAME:
name = str(self.NAME)
if name.lower() == "loc":
return "LoC"
if name.lower() == "openlibrary":
return "OpenLibrary"
if name.lower() == "internetarchive":
return "Internet Archive"
if name.lower() == "alldebrid":
return "AllDebrid"
return name[:1].upper() + name[1:]
return self.__class__.__name__
@property
def preserve_order(self) -> bool:
"""True if search result order is significant and should be preserved in displays."""