diff --git a/media_servers/alist.py b/media_servers/alist.py index 5b5620e..0f4f4fb 100644 --- a/media_servers/alist.py +++ b/media_servers/alist.py @@ -39,10 +39,9 @@ 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 + return False def refresh(self, path, force_refresh=True): url = f"{self.url}/api/fs/list" @@ -74,10 +73,9 @@ 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 + return False def _normalize_path(self, path): """标准化路径格式""" diff --git a/media_servers/emby.py b/media_servers/emby.py index 056aeab..460a088 100644 --- a/media_servers/emby.py +++ b/media_servers/emby.py @@ -42,10 +42,9 @@ class Emby: return True else: print(f"Emby媒体库: 连接失败❌ {response.text}") - return False except requests.exceptions.RequestException as e: print(f"获取Emby媒体库信息出错: {e}") - return False + return False def refresh(self, emby_id): if not emby_id: @@ -68,10 +67,9 @@ class Emby: return True else: print(f"🎞️ 刷新Emby媒体库:{response.text}❌") - return False except requests.exceptions.RequestException as e: print(f"刷新Emby媒体库出错: {e}") - return False + return False def search(self, media_name): if not media_name: @@ -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 + return False