A couple more ignored article fixes
This commit is contained in:
@@ -642,12 +642,14 @@ class SubsonicAdapter(Adapter):
|
||||
try:
|
||||
# If we already got the ignored articles from the get_artists, do that here.
|
||||
with open(self.ignored_articles_cache_file, "rb+") as f:
|
||||
ignored_articles = pickle.load(f)
|
||||
if ia := pickle.load(f):
|
||||
ignored_articles = ia
|
||||
except Exception:
|
||||
try:
|
||||
# Whatever the exception, fall back on getting from the server.
|
||||
if artists := self._get_json(self._make_url("getArtists")).artists:
|
||||
ignored_articles = artists.ignored_articles
|
||||
if ia := artists.ignored_articles:
|
||||
ignored_articles = ia
|
||||
except Exception:
|
||||
# Use the default ignored articles.
|
||||
pass
|
||||
|
@@ -284,7 +284,7 @@ class IndexID3:
|
||||
@dataclass_json(letter_case=LetterCase.CAMEL)
|
||||
@dataclass
|
||||
class ArtistsID3:
|
||||
ignored_articles: str
|
||||
ignored_articles: Optional[str] = None
|
||||
index: List[IndexID3] = field(default_factory=list)
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ class Genres:
|
||||
@dataclass_json(letter_case=LetterCase.CAMEL)
|
||||
@dataclass
|
||||
class Indexes:
|
||||
ignored_articles: str
|
||||
ignored_articles: Optional[str] = None
|
||||
index: List[Index] = field(default_factory=list)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user