mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 16:07:01 +08:00
fix:优化媒体服务器同步媒体库设置
This commit is contained in:
@@ -120,16 +120,15 @@ class MediaServerChain(ChainBase):
|
|||||||
continue
|
continue
|
||||||
server_name = mediaserver.name
|
server_name = mediaserver.name
|
||||||
sync_libraries = mediaserver.sync_libraries or []
|
sync_libraries = mediaserver.sync_libraries or []
|
||||||
if not sync_libraries:
|
|
||||||
logger.info(f"媒体服务器 {server_name} 的同步媒体库为空,跳过")
|
|
||||||
continue
|
|
||||||
logger.info(f"开始同步媒体服务器 {server_name} 的数据 ...")
|
logger.info(f"开始同步媒体服务器 {server_name} 的数据 ...")
|
||||||
libraries = self.librarys(server_name)
|
libraries = self.librarys(server_name)
|
||||||
if not libraries:
|
if not libraries:
|
||||||
logger.info(f"没有获取到媒体服务器 {server_name} 的媒体库,跳过")
|
logger.info(f"没有获取到媒体服务器 {server_name} 的媒体库,跳过")
|
||||||
continue
|
continue
|
||||||
for library in libraries:
|
for library in libraries:
|
||||||
if sync_libraries and library.id not in sync_libraries:
|
if sync_libraries \
|
||||||
|
and "all" not in sync_libraries \
|
||||||
|
and str(library.id) not in sync_libraries:
|
||||||
logger.info(f"{library.name} 未在 {server_name} 同步媒体库列表中,跳过")
|
logger.info(f"{library.name} 未在 {server_name} 同步媒体库列表中,跳过")
|
||||||
continue
|
continue
|
||||||
logger.info(f"正在同步 {server_name} 媒体库 {library.name} ...")
|
logger.info(f"正在同步 {server_name} 媒体库 {library.name} ...")
|
||||||
|
|||||||
Reference in New Issue
Block a user