draft: improved debug even more
This commit is contained in:
parent
4510520db6
commit
be843f2c10
@ -50,7 +50,7 @@ class Collection(Generic[T]):
|
||||
self.extend(data)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"Collection({id(self)})"
|
||||
return f"Collection({' | '.join(self._collection_for.values())} {id(self)})"
|
||||
|
||||
def _map_element(self, __object: T, from_map: bool = False):
|
||||
self._unmap_element(__object.id)
|
||||
@ -111,6 +111,8 @@ class Collection(Generic[T]):
|
||||
if __object is None:
|
||||
return
|
||||
|
||||
object_trace(f"Appending {__object.option_string} {__object.id} to {self}")
|
||||
|
||||
existing_object, map_to = self._find_object(__object, no_push_to=kwargs.get("no_push_to", False))
|
||||
|
||||
if map_to is self:
|
||||
|
@ -243,6 +243,10 @@ class OuterProxy:
|
||||
|
||||
return r
|
||||
|
||||
@property
|
||||
def option_string(self) -> str:
|
||||
return self.title_string
|
||||
|
||||
INDEX_DEPENDS_ON: List[str] = []
|
||||
|
||||
@property
|
||||
|
@ -348,7 +348,7 @@ class Album(Base):
|
||||
|
||||
@property
|
||||
def option_string(self) -> str:
|
||||
r = OPTION_FOREGROUND.value + self.title + BColors.ENDC.value + OPTION_BACKGROUND.value
|
||||
r = OPTION_FOREGROUND.value + self.title_string + BColors.ENDC.value + OPTION_BACKGROUND.value
|
||||
r += get_collection_string(self.artist_collection, " by {}")
|
||||
r += get_collection_string(self.label_collection, " under {}")
|
||||
|
||||
|
@ -30,7 +30,7 @@ class Source:
|
||||
def __post_init__(self):
|
||||
self.referrer_page = self.referrer_page or self.page_enum
|
||||
|
||||
@cached_property
|
||||
@property
|
||||
def parsed_url(self) -> ParseResult:
|
||||
return urlparse(self.url)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user