This commit is contained in:
jxxghp
2025-07-12 14:44:45 +08:00
parent b65ee75b3d
commit 955912b832

View File

@@ -154,7 +154,7 @@ class Plex:
type=library_type,
image_list=image_list,
link=f"{self._playhost or self._host}web/index.html#!/media/{self._plex.machineIdentifier}"
f"/com.plexapp.plugins.library?source={library.key}"
f"/com.plexapp.plugins.library?source={library.key}&X-Plex-Token={self._token}"
)
)
return libraries
@@ -387,6 +387,8 @@ class Plex:
for path, lib_key in result_dict.items():
logger.info(f"刷新媒体库:{lib_key} - {path}")
self._plex.query(f'/library/sections/{lib_key}/refresh?path={quote_plus(str(Path(path).parent))}')
return None
return None
@staticmethod
def __find_librarie(path: Path, libraries: List[Any]) -> Tuple[str, str]:
@@ -541,6 +543,7 @@ class Plex:
continue
except Exception as err:
logger.error(f"获取媒体库列表出错:{str(err)}")
return None
def get_webhook_message(self, form: any) -> Optional[schemas.WebhookEventInfo]:
"""
@@ -718,7 +721,7 @@ class Plex:
拼装媒体播放链接
:param item_id: 媒体的的ID
"""
return f'{self._playhost or self._host}web/index.html#!/server/{self._plex.machineIdentifier}/details?key={item_id}'
return f'{self._playhost or self._host}web/index.html#!/server/{self._plex.machineIdentifier}/details?key={item_id}&X-Plex-Token={self._token}'
def get_resume(self, num: Optional[int] = 12) -> Optional[List[schemas.MediaServerPlayItem]]:
"""