️ 优化Alist和Emby模块错误处理逻辑

This commit is contained in:
Cp0204 2024-11-14 02:13:30 +08:00
parent 0faf3ec569
commit bdc9068f3d
2 changed files with 5 additions and 10 deletions

View File

@ -39,7 +39,6 @@ class Alist:
return True
else:
print(f"Alist: 连接失败❌ {response.get('message')}")
return False
except requests.exceptions.RequestException as e:
print(f"获取Alist信息出错: {e}")
return False
@ -74,7 +73,6 @@ class Alist:
return self.refresh(parent_path)
else:
print(f"📁 刷新Alist目录失败❌ {response.get('message')}")
return False
except requests.exceptions.RequestException as e:
print(f"刷新Alist目录出错: {e}")
return False

View File

@ -42,7 +42,6 @@ class Emby:
return True
else:
print(f"Emby媒体库: 连接失败❌ {response.text}")
return False
except requests.exceptions.RequestException as e:
print(f"获取Emby媒体库信息出错: {e}")
return False
@ -68,7 +67,6 @@ class Emby:
return True
else:
print(f"🎞️ 刷新Emby媒体库{response.text}")
return False
except requests.exceptions.RequestException as e:
print(f"刷新Emby媒体库出错: {e}")
return False
@ -102,7 +100,6 @@ class Emby:
return item["Id"]
else:
print(f"🎞️ 搜索Emby媒体库{response.text}")
return False
except requests.exceptions.RequestException as e:
print(f"搜索Emby媒体库出错: {e}")
return False