mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix alipan
This commit is contained in:
@@ -69,8 +69,12 @@ class AliPan(StorageBase, metaclass=Singleton):
|
|||||||
|
|
||||||
refresh_token = self.__auth_params.get("refreshToken")
|
refresh_token = self.__auth_params.get("refreshToken")
|
||||||
if refresh_token:
|
if refresh_token:
|
||||||
|
try:
|
||||||
self.aligo = Aligo(refresh_token=refresh_token, show=show_qrcode, use_aria2=self._has_aria2c,
|
self.aligo = Aligo(refresh_token=refresh_token, show=show_qrcode, use_aria2=self._has_aria2c,
|
||||||
name="MoviePilot V2", level=logging.ERROR, re_login=False)
|
name="MoviePilot V2", level=logging.ERROR, re_login=False)
|
||||||
|
except Exception as err:
|
||||||
|
logger.error(f"初始化阿里云盘失败:{str(err)}")
|
||||||
|
self.__clear_params()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def __auth_params(self):
|
def __auth_params(self):
|
||||||
|
|||||||
@@ -40,20 +40,18 @@ class U115Pan(StorageBase, metaclass=Singleton):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self.init_storage()
|
self.init_storage()
|
||||||
|
|
||||||
def init_storage(self) -> bool:
|
def init_storage(self):
|
||||||
"""
|
"""
|
||||||
初始化Cloud
|
初始化Cloud
|
||||||
"""
|
"""
|
||||||
if not self.__credential:
|
if not self.__credential:
|
||||||
return False
|
return
|
||||||
try:
|
try:
|
||||||
self.client = P115Client(self.__credential, app="alipaymini",
|
self.client = P115Client(self.__credential, app="alipaymini",
|
||||||
check_for_relogin=True, console_qrcode=False)
|
check_for_relogin=True, console_qrcode=False)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
logger.error(f"115连接失败,请重新登录:{str(err)}")
|
logger.error(f"115连接失败,请重新登录:{str(err)}")
|
||||||
self.__clear_credential()
|
self.__clear_credential()
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def __credential(self) -> Optional[str]:
|
def __credential(self) -> Optional[str]:
|
||||||
|
|||||||
Reference in New Issue
Block a user