fix #68 修改TVDB模块以支持代理
This commit is contained in:
parent
76cd4048e3
commit
cef33d370a
@ -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
|
||||||
|
1152
app/modules/thetvdb/tvdbapi.py
Normal file
1152
app/modules/thetvdb/tvdbapi.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user