fix #68 修改TVDB模块以支持代理

This commit is contained in:
jxxghp 2023-08-25 11:34:41 +08:00
parent 76cd4048e3
commit cef33d370a
3 changed files with 1158 additions and 4 deletions

View File

@ -1,18 +1,21 @@
from typing import Optional, Tuple, Union from typing import Optional, Tuple, Union
import tvdb_api
from app.core.config import settings from app.core.config import settings
from app.log import logger from app.log import logger
from app.modules import _ModuleBase from app.modules import _ModuleBase
from app.modules.thetvdb import tvdbapi
class TheTvDbModule(_ModuleBase): class TheTvDbModule(_ModuleBase):
tvdb: tvdb_api.Tvdb = None tvdb: tvdbapi.Tvdb = None
def init_module(self) -> None: def init_module(self) -> None:
self.tvdb = tvdb_api.Tvdb(apikey=settings.TVDB_API_KEY, cache=False, select_first=True) self.tvdb = tvdbapi.Tvdb(apikey=settings.TVDB_API_KEY,
cache=False,
select_first=True,
proxies=settings.PROXY)
def stop(self): def stop(self):
pass pass

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,6 @@ chardet~=4.0.0
starlette~=0.27.0 starlette~=0.27.0
PyVirtualDisplay~=3.0 PyVirtualDisplay~=3.0
Cython~=0.29.35 Cython~=0.29.35
tvdb_api~=3.1
psutil~=5.9.4 psutil~=5.9.4
python_hosts~=1.0.3 python_hosts~=1.0.3
watchdog~=3.0.0 watchdog~=3.0.0