fix 对接Library/VirtualFolders接口参数
This commit is contained in:
parent
27d2d01a20
commit
e7d94f7f70
@ -68,11 +68,11 @@ class Jellyfin:
|
|||||||
"""
|
"""
|
||||||
if not self._host or not self._apikey:
|
if not self._host or not self._apikey:
|
||||||
return []
|
return []
|
||||||
req_url = "%sLibrary/VirtualFolders/Query?api_key=%s" % (self._host, self._apikey)
|
req_url = "%sLibrary/VirtualFolders?api_key=%s" % (self._host, self._apikey)
|
||||||
try:
|
try:
|
||||||
res = RequestUtils().get_res(req_url)
|
res = RequestUtils().get_res(req_url)
|
||||||
if res:
|
if res:
|
||||||
library_items = res.json().get("Items")
|
library_items = res.json()
|
||||||
librarys = []
|
librarys = []
|
||||||
for library_item in library_items:
|
for library_item in library_items:
|
||||||
library_name = library_item.get('Name')
|
library_name = library_item.get('Name')
|
||||||
@ -91,10 +91,10 @@ class Jellyfin:
|
|||||||
})
|
})
|
||||||
return librarys
|
return librarys
|
||||||
else:
|
else:
|
||||||
logger.error(f"Library/VirtualFolders/Query 未获取到返回数据")
|
logger.error(f"Library/VirtualFolders 未获取到返回数据")
|
||||||
return []
|
return []
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"连接Library/VirtualFolders/Query 出错:" + str(e))
|
logger.error(f"连接Library/VirtualFolders 出错:" + str(e))
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def __get_jellyfin_librarys(self, username: str = None) -> List[dict]:
|
def __get_jellyfin_librarys(self, username: str = None) -> List[dict]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user