fix personmeta
This commit is contained in:
@ -880,7 +880,7 @@ class Emby(metaclass=Singleton):
|
||||
logger.error(f"连接Emby出错:" + str(e))
|
||||
return None
|
||||
|
||||
def post_data(self, url: str, data: str = None):
|
||||
def post_data(self, url: str, data: str = None) -> Optional[Response]:
|
||||
"""
|
||||
自定义URL从媒体服务器获取数据,其中[HOST]、[APIKEY]、[USER]会被替换成实际的值
|
||||
:param url: 请求地址
|
||||
@ -892,7 +892,11 @@ class Emby(metaclass=Singleton):
|
||||
.replace("[APIKEY]", self._apikey) \
|
||||
.replace("[USER]", self.user)
|
||||
try:
|
||||
return RequestUtils(content_type="application/json").post_res(url=url, data=data)
|
||||
return RequestUtils(
|
||||
headers={
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
).post_res(url=url, data=data)
|
||||
except Exception as e:
|
||||
logger.error(f"连接Emby出错:" + str(e))
|
||||
return None
|
||||
|
Reference in New Issue
Block a user