PS4 bump to renamed dependency (#27144)

* Change to renamed dependency pyps4-2ndscreen 0.9.0

* Rename / bump to ps4 dependency to 1.0.0

* update requirements

* Rename test req

* Fix import

* Bump 1.0.1

* Fix flaky test leaving files behind
This commit is contained in:
ktnrg45 authored and Fabian Affolter committed 2019-10-06 14:43:34 +02:00
1 parent bd6bbcd5af
commit 1ecc883ef4
9 files changed
+56 -66

No files matched your search

+4 -8
View File
@@ -3,8 +3,8 @@ import logging
import os
import voluptuous as vol
from pyps4_homeassistant.ddp import async_create_ddp_endpoint
from pyps4_homeassistant.media_art import COUNTRIES
from pyps4_2ndscreen.ddp import async_create_ddp_endpoint
from pyps4_2ndscreen.media_art import COUNTRIES
from homeassistant.components.media_player.const import (
ATTR_MEDIA_CONTENT_TYPE,
@@ -172,12 +172,8 @@ def load_games(hass: HomeAssistantType) -> dict:
_LOGGER.error("Games file was not parsed correctly")
games = {}
# If file does not exist, create empty file.
if not os.path.isfile(g_file):
_LOGGER.info("Creating PS4 Games File")
games = {}
save_games(hass, games)
else:
# If file exists
if os.path.isfile(g_file):
games = _reformat_data(hass, games)
return games