Bump plexapi to 3.4.0, remove workarounds (#34395)

pull/34414/head
jjlawren 2020-04-18 21:06:05 -05:00 committed by GitHub
parent 608a7578fc
commit 21e85ba9c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 15 deletions

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"

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"]
}

View File

@ -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)

View File

@ -1044,7 +1044,7 @@ pillow==7.1.1
pizzapi==0.0.3
# homeassistant.components.plex
plexapi==3.3.0
plexapi==3.4.0
# homeassistant.components.plex
plexauth==0.0.5

View File

@ -404,7 +404,7 @@ pilight==0.1.1
pillow==7.1.1
# homeassistant.components.plex
plexapi==3.3.0
plexapi==3.4.0
# homeassistant.components.plex
plexauth==0.0.5