This commit is contained in:
jxxghp
2023-10-07 05:29:23 -07:00
parent 5a7062c699
commit 6c4307c918

View File

@ -473,8 +473,8 @@ class Emby(metaclass=Singleton):
return None return None
# 查找需要刷新的媒体库ID # 查找需要刷新的媒体库ID
item_path = Path(item.target_path) item_path = Path(item.target_path)
# 匹配子目录
for folder in self.folders: for folder in self.folders:
# 匹配子目录
for subfolder in folder.get("SubFolders"): for subfolder in folder.get("SubFolders"):
try: try:
# 匹配子目录 # 匹配子目录
@ -483,7 +483,8 @@ class Emby(metaclass=Singleton):
return folder.get("Id") return folder.get("Id")
except Exception as err: except Exception as err:
print(str(err)) print(str(err))
# 如果找不到,只要路径中有分类目录名就命中 # 如果找不到,只要路径中有分类目录名就命中
for folder in self.folders:
for subfolder in folder.get("SubFolders"): for subfolder in folder.get("SubFolders"):
if subfolder.get("Path") and re.search(r"[/\\]%s" % item.category, if subfolder.get("Path") and re.search(r"[/\\]%s" % item.category,
subfolder.get("Path")): subfolder.get("Path")):