mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-09 22:43:44 +08:00
fix api
This commit is contained in:
@@ -161,13 +161,14 @@ class EmbyModule(_ModuleBase, _MediaServerBase):
|
||||
return media_statistics
|
||||
|
||||
def mediaserver_librarys(self, server: str,
|
||||
username: str = None) -> Optional[List[schemas.MediaServerLibrary]]:
|
||||
username: str = None,
|
||||
hidden: bool = False) -> Optional[List[schemas.MediaServerLibrary]]:
|
||||
"""
|
||||
媒体库列表
|
||||
"""
|
||||
server: Emby = self.get_server(server)
|
||||
if server:
|
||||
return server.get_librarys(username)
|
||||
return server.get_librarys(username=username, hidden=hidden)
|
||||
return None
|
||||
|
||||
def mediaserver_items(self, server: str, library_id: str) -> Optional[Generator]:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user