feat 媒体服务器同步黑名单
This commit is contained in:
parent
cab4055315
commit
52bdfa7f9a
@ -145,6 +145,7 @@ docker pull jxxghp/moviepilot:latest
|
|||||||
- **PLEX_TOKEN:** Plex网页Url中的`X-Plex-Token`,通过浏览器F12->网络从请求URL中获取
|
- **PLEX_TOKEN:** Plex网页Url中的`X-Plex-Token`,通过浏览器F12->网络从请求URL中获取
|
||||||
|
|
||||||
- **MEDIASERVER_SYNC_INTERVAL:** 媒体服务器同步间隔(小时),默认`6`,留空则不同步
|
- **MEDIASERVER_SYNC_INTERVAL:** 媒体服务器同步间隔(小时),默认`6`,留空则不同步
|
||||||
|
- **MEDIASERVER_SYNC_BLACKLIST:** 媒体服务器同步黑名单,多个媒体库名称使用,分割
|
||||||
|
|
||||||
|
|
||||||
### 2. **用户认证**
|
### 2. **用户认证**
|
||||||
|
@ -64,7 +64,13 @@ class MediaServerChain(ChainBase):
|
|||||||
total_count = 0
|
total_count = 0
|
||||||
# 清空登记薄
|
# 清空登记薄
|
||||||
_dbOper.empty(server=settings.MEDIASERVER)
|
_dbOper.empty(server=settings.MEDIASERVER)
|
||||||
|
# 同步黑名单
|
||||||
|
sync_blacklist = settings.MEDIASERVER_SYNC_BLACKLIST.split(
|
||||||
|
",") if settings.MEDIASERVER_SYNC_BLACKLIST else []
|
||||||
for library in self.librarys():
|
for library in self.librarys():
|
||||||
|
if library.name in sync_blacklist:
|
||||||
|
# 同步黑名单 跳过
|
||||||
|
continue
|
||||||
logger.info(f"正在同步媒体库 {library.name} ...")
|
logger.info(f"正在同步媒体库 {library.name} ...")
|
||||||
library_count = 0
|
library_count = 0
|
||||||
for item in self.items(library.id):
|
for item in self.items(library.id):
|
||||||
|
@ -144,6 +144,8 @@ class Settings(BaseSettings):
|
|||||||
REFRESH_MEDIASERVER: bool = True
|
REFRESH_MEDIASERVER: bool = True
|
||||||
# 媒体服务器同步间隔(小时)
|
# 媒体服务器同步间隔(小时)
|
||||||
MEDIASERVER_SYNC_INTERVAL: int = 6
|
MEDIASERVER_SYNC_INTERVAL: int = 6
|
||||||
|
# 媒体服务器同步黑名单,多个媒体库名称,分割
|
||||||
|
MEDIASERVER_SYNC_BLACKLIST: str = None
|
||||||
# EMBY服务器地址,IP:PORT
|
# EMBY服务器地址,IP:PORT
|
||||||
EMBY_HOST: str = None
|
EMBY_HOST: str = None
|
||||||
# EMBY Api Key
|
# EMBY Api Key
|
||||||
|
Loading…
x
Reference in New Issue
Block a user