Bump plexapi to 3.4.0, remove workarounds (#34395)

This commit is contained in:
jjlawren authored and GitHub committed 2020-04-18 21:06:05 -05:00
1 parent 608a7578fc
commit 21e85ba9c5
5 files changed
+4 -15

No files matched your search

-3
View File
@@ -39,6 +39,3 @@ X_PLEX_DEVICE_NAME = "Home Assistant"
X_PLEX_PLATFORM = "Home Assistant"
X_PLEX_PRODUCT = "Home Assistant"
X_PLEX_VERSION = __version__
COMMAND_MEDIA_TYPE_MUSIC = "music"
COMMAND_MEDIA_TYPE_VIDEO = "video"
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "Plex Media Server",
"config_flow": true,
"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"],
"codeowners": ["@jjlawren"]
}
@@ -1,7 +1,6 @@
"""Support to interface with the Plex API."""
import json
import logging
from xml.etree.ElementTree import ParseError
import plexapi.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 .const import (
COMMAND_MEDIA_TYPE_MUSIC,
COMMAND_MEDIA_TYPE_VIDEO,
COMMON_PLAYERS,
CONF_SERVER_IDENTIFIER,
DISPATCHERS,
@@ -563,11 +560,9 @@ class PlexMediaPlayer(MediaPlayerDevice):
shuffle = src.get("shuffle", 0)
media = None
command_media_type = COMMAND_MEDIA_TYPE_VIDEO
if media_type == "MUSIC":
media = self._get_music_media(library, src)
command_media_type = COMMAND_MEDIA_TYPE_MUSIC
elif media_type == "EPISODE":
media = self._get_tv_media(library, src)
elif media_type == "PLAYLIST":
@@ -581,10 +576,7 @@ class PlexMediaPlayer(MediaPlayerDevice):
playqueue = self.plex_server.create_playqueue(media, shuffle=shuffle)
try:
self.device.playMedia(playqueue, type=command_media_type)
except ParseError:
# Temporary workaround for Plexamp / plexapi issue
pass
self.device.playMedia(playqueue)
except requests.exceptions.ConnectTimeout:
_LOGGER.error("Timed out playing on %s", self.name)