1818from homeassistant .const import CONF_HOST , CONF_NAME , CONF_PORT , CONF_SSL
1919from homeassistant .helpers .entity import Entity
2020
21- __version__ = '0.2.9 '
21+ __version__ = '0.3.0 '
2222
2323_LOGGER = logging .getLogger (__name__ )
2424
2525CONF_DL_IMAGES = 'download_images'
26- DEFAULT_NAME = 'Plex Recently Added '
26+ DEFAULT_NAME = 'plex_recently_added '
2727CONF_SERVER = 'server_name'
2828CONF_SSL_CERT = 'ssl_cert'
2929CONF_TOKEN = 'token'
4444 vol .Optional (CONF_SECTION_TYPES ,
4545 default = ['movie' , 'show' ]): vol .All (cv .ensure_list , [cv .string ]),
4646 vol .Optional (CONF_IMG_CACHE ,
47- default = '/custom-lovelace/ upcoming-media-card/ images/plex/' ): cv .string
47+ default = '/upcoming-media-card- images/plex/' ): cv .string
4848})
4949
5050
@@ -60,6 +60,8 @@ def __init__(self, hass, conf, name):
6060 self ._name = name
6161 self .conf_dir = str (hass .config .path ()) + '/'
6262 self ._dir = conf .get (CONF_IMG_CACHE )
63+ if self ._name :
64+ self ._dir = self ._dir + self ._name + '/'
6365 self .img = '{0}{1}{2}{3}{4}.jpg' .format (
6466 self .conf_dir , {}, self ._dir , {}, {})
6567 self .img_url = '{0}{1}{2}{3}.jpg' .format ({}, self ._dir , {}, {})
0 commit comments