fix: wrong album region detection
Some checks failed
/ Build Windows (push) Has been cancelled

This commit is contained in:
世界观察日志
2025-06-25 11:51:21 +08:00
parent 726e74f155
commit 7baccab0b1
2 changed files with 6 additions and 5 deletions

View File

@@ -1,5 +1,4 @@
import asyncio
import logging
from io import BytesIO
from ssl import SSLError
from typing import Type
@@ -218,14 +217,14 @@ class WebAPI:
async def exist_on_storefront_by_song_id(self, song_id: str, storefront: str, check_storefront: str):
if storefront.upper() == check_storefront.upper():
return True
song = await self.song_exist(song_id, check_storefront)
return bool(song)
exist = await self.song_exist(song_id, check_storefront)
return exist
async def exist_on_storefront_by_album_id(self, album_id: str, storefront: str, check_storefront: str):
if storefront.upper() == check_storefront.upper():
return True
album = await self.album_exist(album_id, check_storefront)
return bool(album)
exist = await self.album_exist(album_id, check_storefront)
return exist
class APICreator(AbstractCreator):

View File

@@ -241,6 +241,8 @@ async def check_album_existence(album_id: str, region: str):
for m_region in (await it(WrapperManager).status()).regions:
try:
check = await it(WebAPI).exist_on_storefront_by_album_id(album_id, region, m_region)
if check:
break
except ValidationError:
pass
return check