mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Channel up/down for LiveTV and next/previous for other apps (#13829)
This commit is contained in:
parent
9bd29589d5
commit
b9306a5e52
@ -35,6 +35,7 @@ CONF_SOURCES = 'sources'
|
||||
CONF_ON_ACTION = 'turn_on_action'
|
||||
|
||||
DEFAULT_NAME = 'LG webOS Smart TV'
|
||||
LIVETV_APP_ID = 'com.webos.app.livetv'
|
||||
|
||||
WEBOSTV_CONFIG_FILE = 'webostv.conf'
|
||||
|
||||
@ -357,8 +358,16 @@ class LgWebOSDevice(MediaPlayerDevice):
|
||||
|
||||
def media_next_track(self):
|
||||
"""Send next track command."""
|
||||
self._client.channel_up()
|
||||
current_input = self._client.get_input()
|
||||
if current_input == LIVETV_APP_ID:
|
||||
self._client.channel_up()
|
||||
else:
|
||||
self._client.fast_forward()
|
||||
|
||||
def media_previous_track(self):
|
||||
"""Send the previous track command."""
|
||||
self._client.channel_down()
|
||||
current_input = self._client.get_input()
|
||||
if current_input == LIVETV_APP_ID:
|
||||
self._client.channel_down()
|
||||
else:
|
||||
self._client.rewind()
|
||||
|
Loading…
x
Reference in New Issue
Block a user