Add warning during playback if Plex token missing (#51853)
parent
0d40ba463e
commit
e929774481
|
@ -492,6 +492,10 @@ class PlexMediaPlayer(MediaPlayerEntity):
|
|||
"Client is not currently accepting playback controls: %s", self.name
|
||||
)
|
||||
return
|
||||
if not self.plex_server.has_token:
|
||||
_LOGGER.warning(
|
||||
"Plex integration configured without a token, playback may fail"
|
||||
)
|
||||
|
||||
src = json.loads(media_id)
|
||||
if isinstance(src, int):
|
||||
|
|
|
@ -537,6 +537,11 @@ class PlexServer:
|
|||
"""Return the plexapi PlexServer instance."""
|
||||
return self._plex_server
|
||||
|
||||
@property
|
||||
def has_token(self):
|
||||
"""Return if a token is used to connect to this Plex server."""
|
||||
return self._token is not None
|
||||
|
||||
@property
|
||||
def accounts(self):
|
||||
"""Return accounts associated with the Plex server."""
|
||||
|
|
Loading…
Reference in New Issue