Bump plexapi to 3.4.0, remove workarounds (#34395)
This commit is contained in:
parent
608a7578fc
commit
21e85ba9c5
5 changed files with 4 additions and 15 deletions
|
@ -39,6 +39,3 @@ X_PLEX_DEVICE_NAME = "Home Assistant"
|
||||||
X_PLEX_PLATFORM = "Home Assistant"
|
X_PLEX_PLATFORM = "Home Assistant"
|
||||||
X_PLEX_PRODUCT = "Home Assistant"
|
X_PLEX_PRODUCT = "Home Assistant"
|
||||||
X_PLEX_VERSION = __version__
|
X_PLEX_VERSION = __version__
|
||||||
|
|
||||||
COMMAND_MEDIA_TYPE_MUSIC = "music"
|
|
||||||
COMMAND_MEDIA_TYPE_VIDEO = "video"
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "Plex Media Server",
|
"name": "Plex Media Server",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/plex",
|
"documentation": "https://www.home-assistant.io/integrations/plex",
|
||||||
"requirements": ["plexapi==3.3.0", "plexauth==0.0.5", "plexwebsocket==0.0.7"],
|
"requirements": ["plexapi==3.4.0", "plexauth==0.0.5", "plexwebsocket==0.0.7"],
|
||||||
"dependencies": ["http"],
|
"dependencies": ["http"],
|
||||||
"codeowners": ["@jjlawren"]
|
"codeowners": ["@jjlawren"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""Support to interface with the Plex API."""
|
"""Support to interface with the Plex API."""
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from xml.etree.ElementTree import ParseError
|
|
||||||
|
|
||||||
import plexapi.exceptions
|
import plexapi.exceptions
|
||||||
import requests.exceptions
|
import requests.exceptions
|
||||||
|
@ -27,8 +26,6 @@ from homeassistant.helpers.entity_registry import async_get_registry
|
||||||
from homeassistant.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
COMMAND_MEDIA_TYPE_MUSIC,
|
|
||||||
COMMAND_MEDIA_TYPE_VIDEO,
|
|
||||||
COMMON_PLAYERS,
|
COMMON_PLAYERS,
|
||||||
CONF_SERVER_IDENTIFIER,
|
CONF_SERVER_IDENTIFIER,
|
||||||
DISPATCHERS,
|
DISPATCHERS,
|
||||||
|
@ -563,11 +560,9 @@ class PlexMediaPlayer(MediaPlayerDevice):
|
||||||
shuffle = src.get("shuffle", 0)
|
shuffle = src.get("shuffle", 0)
|
||||||
|
|
||||||
media = None
|
media = None
|
||||||
command_media_type = COMMAND_MEDIA_TYPE_VIDEO
|
|
||||||
|
|
||||||
if media_type == "MUSIC":
|
if media_type == "MUSIC":
|
||||||
media = self._get_music_media(library, src)
|
media = self._get_music_media(library, src)
|
||||||
command_media_type = COMMAND_MEDIA_TYPE_MUSIC
|
|
||||||
elif media_type == "EPISODE":
|
elif media_type == "EPISODE":
|
||||||
media = self._get_tv_media(library, src)
|
media = self._get_tv_media(library, src)
|
||||||
elif media_type == "PLAYLIST":
|
elif media_type == "PLAYLIST":
|
||||||
|
@ -581,10 +576,7 @@ class PlexMediaPlayer(MediaPlayerDevice):
|
||||||
|
|
||||||
playqueue = self.plex_server.create_playqueue(media, shuffle=shuffle)
|
playqueue = self.plex_server.create_playqueue(media, shuffle=shuffle)
|
||||||
try:
|
try:
|
||||||
self.device.playMedia(playqueue, type=command_media_type)
|
self.device.playMedia(playqueue)
|
||||||
except ParseError:
|
|
||||||
# Temporary workaround for Plexamp / plexapi issue
|
|
||||||
pass
|
|
||||||
except requests.exceptions.ConnectTimeout:
|
except requests.exceptions.ConnectTimeout:
|
||||||
_LOGGER.error("Timed out playing on %s", self.name)
|
_LOGGER.error("Timed out playing on %s", self.name)
|
||||||
|
|
||||||
|
|
|
@ -1044,7 +1044,7 @@ pillow==7.1.1
|
||||||
pizzapi==0.0.3
|
pizzapi==0.0.3
|
||||||
|
|
||||||
# homeassistant.components.plex
|
# homeassistant.components.plex
|
||||||
plexapi==3.3.0
|
plexapi==3.4.0
|
||||||
|
|
||||||
# homeassistant.components.plex
|
# homeassistant.components.plex
|
||||||
plexauth==0.0.5
|
plexauth==0.0.5
|
||||||
|
|
|
@ -404,7 +404,7 @@ pilight==0.1.1
|
||||||
pillow==7.1.1
|
pillow==7.1.1
|
||||||
|
|
||||||
# homeassistant.components.plex
|
# homeassistant.components.plex
|
||||||
plexapi==3.3.0
|
plexapi==3.4.0
|
||||||
|
|
||||||
# homeassistant.components.plex
|
# homeassistant.components.plex
|
||||||
plexauth==0.0.5
|
plexauth==0.0.5
|
||||||
|
|
Loading…
Add table
Reference in a new issue