Remove 'show all controls' option for Plex (#32391)
This commit is contained in:
1 parent
0e436ac80e
commit
dd7d8d4792
6 files changed
+9
-75
No files matched your search
@@ -17,7 +17,6 @@ from homeassistant.components.media_player.const import (
|
||||
SUPPORT_PLAY_MEDIA,
|
||||
SUPPORT_PREVIOUS_TRACK,
|
||||
SUPPORT_STOP,
|
||||
SUPPORT_TURN_OFF,
|
||||
SUPPORT_VOLUME_MUTE,
|
||||
SUPPORT_VOLUME_SET,
|
||||
)
|
||||
@@ -481,46 +480,6 @@ class PlexMediaPlayer(MediaPlayerDevice):
|
||||
@property
|
||||
def supported_features(self):
|
||||
"""Flag media player features that are supported."""
|
||||
# force show all controls
|
||||
if self.plex_server.option_show_all_controls:
|
||||
return (
|
||||
SUPPORT_PAUSE
|
||||
| SUPPORT_PREVIOUS_TRACK
|
||||
| SUPPORT_NEXT_TRACK
|
||||
| SUPPORT_STOP
|
||||
| SUPPORT_VOLUME_SET
|
||||
| SUPPORT_PLAY
|
||||
| SUPPORT_PLAY_MEDIA
|
||||
| SUPPORT_TURN_OFF
|
||||
| SUPPORT_VOLUME_MUTE
|
||||
)
|
||||
|
||||
# no mute support
|
||||
if self.make.lower() == "shield android tv":
|
||||
_LOGGER.debug(
|
||||
"Shield Android TV client detected, disabling mute controls: %s",
|
||||
self.name,
|
||||
)
|
||||
return (
|
||||
SUPPORT_PAUSE
|
||||
| SUPPORT_PREVIOUS_TRACK
|
||||
| SUPPORT_NEXT_TRACK
|
||||
| SUPPORT_STOP
|
||||
| SUPPORT_VOLUME_SET
|
||||
| SUPPORT_PLAY
|
||||
| SUPPORT_PLAY_MEDIA
|
||||
| SUPPORT_TURN_OFF
|
||||
)
|
||||
|
||||
# Only supports play,pause,stop (and off which really is stop)
|
||||
if self.make.lower().startswith("tivo"):
|
||||
_LOGGER.debug(
|
||||
"Tivo client detected, only enabling pause, play, "
|
||||
"stop, and off controls: %s",
|
||||
self.name,
|
||||
)
|
||||
return SUPPORT_PAUSE | SUPPORT_PLAY | SUPPORT_STOP | SUPPORT_TURN_OFF
|
||||
|
||||
if self.device and "playback" in self._device_protocol_capabilities:
|
||||
return (
|
||||
SUPPORT_PAUSE
|
||||
@@ -530,7 +489,6 @@ class PlexMediaPlayer(MediaPlayerDevice):
|
||||
| SUPPORT_VOLUME_SET
|
||||
| SUPPORT_PLAY
|
||||
| SUPPORT_PLAY_MEDIA
|
||||
| SUPPORT_TURN_OFF
|
||||
| SUPPORT_VOLUME_MUTE
|
||||
)
|
||||
|
||||
@@ -594,11 +552,6 @@ class PlexMediaPlayer(MediaPlayerDevice):
|
||||
self.device.stop(self._active_media_plexapi_type)
|
||||
self.plex_server.update_platforms()
|
||||
|
||||
def turn_off(self):
|
||||
"""Turn the client off."""
|
||||
# Fake it since we can't turn the client off
|
||||
self.media_stop()
|
||||
|
||||
def media_next_track(self):
|
||||
"""Send next track command."""
|
||||
if self.device and "playback" in self._device_protocol_capabilities:
|
||||
|
||||
Reference in new issue
Block a user