Keep webostv source list when TV is off (#38250)
* keep source list when TV is off * remove source_list reset as the method ends here
This commit is contained in:
parent
7b728b17f7
commit
5b234b80e8
1 changed files with 3 additions and 0 deletions
|
@ -162,6 +162,7 @@ class LgWebOSMediaPlayerEntity(MediaPlayerEntity):
|
||||||
|
|
||||||
def update_sources(self):
|
def update_sources(self):
|
||||||
"""Update list of sources from current source, apps, inputs and configured list."""
|
"""Update list of sources from current source, apps, inputs and configured list."""
|
||||||
|
source_list = self._source_list
|
||||||
self._source_list = {}
|
self._source_list = {}
|
||||||
conf_sources = self._customize[CONF_SOURCES]
|
conf_sources = self._customize[CONF_SOURCES]
|
||||||
|
|
||||||
|
@ -206,6 +207,8 @@ class LgWebOSMediaPlayerEntity(MediaPlayerEntity):
|
||||||
or any(word in app["id"] for word in conf_sources)
|
or any(word in app["id"] for word in conf_sources)
|
||||||
):
|
):
|
||||||
self._source_list["Live TV"] = app
|
self._source_list["Live TV"] = app
|
||||||
|
if not self._source_list and source_list:
|
||||||
|
self._source_list = source_list
|
||||||
|
|
||||||
@util.Throttle(MIN_TIME_BETWEEN_SCANS, MIN_TIME_BETWEEN_FORCED_SCANS)
|
@util.Throttle(MIN_TIME_BETWEEN_SCANS, MIN_TIME_BETWEEN_FORCED_SCANS)
|
||||||
async def async_update(self):
|
async def async_update(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue