Skip to content

Commit 188d28b

Browse files
committed
Make image cache dir configurable
1 parent 14f4678 commit 188d28b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

custom_components/sensor/plex_recently_added.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
vol.Optional(CONF_DL_IMAGES, default=True): cv.boolean,
4848
vol.Optional(CONF_HOST, default='localhost'): cv.string,
4949
vol.Optional(CONF_PORT, default=32400): cv.port,
50+
vol.Optional(CONF_IMG_CACHE, default='/custom-lovelace/upcoming-media-card/images/plex/'): cv.string
5051
})
5152

5253

@@ -58,7 +59,7 @@ class PlexRecentlyAddedSensor(Entity):
5859

5960
def __init__(self, hass, conf):
6061
self.conf_dir = str(hass.config.path()) + '/'
61-
self._dir = '/custom-lovelace/upcoming-media-card/images/plex/'
62+
self._dir = conf.get(CONF_IMG_CACHE)
6263
self.img = '{0}{1}{2}{3}{4}.jpg'.format(
6364
self.conf_dir, {}, self._dir, {}, {})
6465
self._tz = timezone(str(hass.config.time_zone))

0 commit comments

Comments
 (0)