fix: raised the recursion limit in debug to 500
This commit is contained in:
@@ -34,6 +34,6 @@ class Lyrics(OuterProxy):
|
||||
@property
|
||||
def metadata(self) -> Metadata:
|
||||
return Metadata({
|
||||
id3Mapping.UNSYNCED_LYRICS: self.text.html
|
||||
id3Mapping.UNSYNCED_LYRICS: [self.text.html]
|
||||
})
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ from functools import lru_cache
|
||||
from typing import Optional, Dict, Tuple, List, Type, Generic, Any, TypeVar, Set
|
||||
|
||||
from .metadata import Metadata
|
||||
from ..utils import get_unix_time
|
||||
from ..utils import get_unix_time, object_trace
|
||||
from ..utils.config import logging_settings, main_settings
|
||||
from ..utils.shared import HIGHEST_ID
|
||||
from ..utils.hacking import MetaClass
|
||||
@@ -107,6 +107,7 @@ class OuterProxy:
|
||||
self._inner: InnerData = InnerData(type(self), **kwargs)
|
||||
self._inner._refers_to_instances.add(self)
|
||||
|
||||
object_trace(f"creating {type(self).__name__} [{self.title_string}]")
|
||||
self.__init_collections__()
|
||||
|
||||
for name, data_list in collection_data.items():
|
||||
@@ -182,6 +183,8 @@ class OuterProxy:
|
||||
if __other is None:
|
||||
return
|
||||
|
||||
object_trace(f"merging {type(self).__name__} [{self.title_string}] with {type(__other).__name__} [{__other.title_string}]")
|
||||
|
||||
a = self
|
||||
b = __other
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import defaultdict
|
||||
from enum import Enum
|
||||
from typing import List, Dict, Set, Tuple, Optional, Iterable
|
||||
@@ -103,12 +105,23 @@ class Source(OuterProxy):
|
||||
('audio_url', self.audio_url),
|
||||
]
|
||||
|
||||
def __merge__(self, __other: Source, override: bool = False):
|
||||
if override:
|
||||
self.audio_url = __other.audio_url
|
||||
|
||||
if self.audio_url is None or (override and __other.audio_url is not None):
|
||||
self.audio_url = __other.audio_url
|
||||
|
||||
def __str__(self):
|
||||
return self.__repr__()
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"Src({self.page_enum.value}: {self.url}, {self.audio_url})"
|
||||
|
||||
@property
|
||||
def title_string(self) -> str:
|
||||
return self.url
|
||||
|
||||
page_str = property(fget=lambda self: self.page_enum.value)
|
||||
type_str = property(fget=lambda self: self.type_enum.value)
|
||||
homepage = property(fget=lambda self: SourcePages.get_homepage(self.page_enum))
|
||||
|
||||
Reference in New Issue
Block a user