This commit is contained in:
jxxghp
2024-09-12 08:24:55 +08:00
parent f9895b2edd
commit e2436ba94f
8 changed files with 25 additions and 14 deletions
+3 -1
View File
@@ -128,7 +128,7 @@ class Emby:
logger.error(f"连接User/Views 出错:" + str(e))
return []
def get_librarys(self, username: str = None) -> List[schemas.MediaServerLibrary]:
def get_librarys(self, username: str = None, hidden: bool = False) -> List[schemas.MediaServerLibrary]:
"""
获取媒体服务器所有媒体库列表
"""
@@ -136,6 +136,8 @@ class Emby:
return []
libraries = []
for library in self.__get_emby_librarys(username) or []:
if hidden and self._sync_libraries and library.get("Id") not in self._sync_libraries:
continue
match library.get("CollectionType"):
case "movies":
library_type = MediaType.MOVIE.value