From 152d9c6b6e7c7f056b528395e3dbad64398df55f Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Sun, 19 Jan 2020 19:23:05 -0800 Subject: [PATCH 1/4] Document filtering of sources for Android TV --- source/_integrations/androidtv.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/_integrations/androidtv.markdown b/source/_integrations/androidtv.markdown index 1e5b905164fb..3e016b6bf526 100644 --- a/source/_integrations/androidtv.markdown +++ b/source/_integrations/androidtv.markdown @@ -77,7 +77,7 @@ get_sources: default: true type: boolean apps: - description: A dictionary where the keys are app IDs and the values are app names that will be displayed in the UI; see example below. ([These app names](https://github.com/JeffLIrion/python-androidtv/blob/5c39196ade3f88ab453b205fd15b32472d3e0482/androidtv/constants.py#L267-L283) are configured in the backend package and do not need to be included in your configuration.) + description: A dictionary where the keys are app IDs and the values are app names that will be displayed in the UI; see example below. If you provide an empty string as the friendly name, the app will never be shown in the sources list. ([These app names](https://github.com/JeffLIrion/python-androidtv/blob/5c39196ade3f88ab453b205fd15b32472d3e0482/androidtv/constants.py#L267-L283) are configured in the backend package and do not need to be included in your configuration.) required: false default: {} type: map @@ -116,6 +116,7 @@ media_player: adbkey: "/config/android/adbkey" apps: com.amazon.tv.launcher: "Fire TV" + some.background.app: "" # this will never show up in the sources list turn_on_command: "input keyevent 3" turn_off_command: "input keyevent 223" state_detection_rules: From 2fa8a8e8112f1898f0f0cc86b97572c974cc644e Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Mon, 20 Jan 2020 11:41:41 -0800 Subject: [PATCH 2/4] Revise documentation for source filtering --- source/_integrations/androidtv.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/_integrations/androidtv.markdown b/source/_integrations/androidtv.markdown index 3e016b6bf526..e349b73e72a9 100644 --- a/source/_integrations/androidtv.markdown +++ b/source/_integrations/androidtv.markdown @@ -77,7 +77,7 @@ get_sources: default: true type: boolean apps: - description: A dictionary where the keys are app IDs and the values are app names that will be displayed in the UI; see example below. If you provide an empty string as the friendly name, the app will never be shown in the sources list. ([These app names](https://github.com/JeffLIrion/python-androidtv/blob/5c39196ade3f88ab453b205fd15b32472d3e0482/androidtv/constants.py#L267-L283) are configured in the backend package and do not need to be included in your configuration.) + description: A dictionary where the keys are app IDs and the values are app names that will be displayed in the UI; see example below. If a name is not provided, the app will never be shown in the sources list. ([These app names](https://github.com/JeffLIrion/python-androidtv/blob/5c39196ade3f88ab453b205fd15b32472d3e0482/androidtv/constants.py#L267-L283) are configured in the backend package and do not need to be included in your configuration.) required: false default: {} type: map @@ -116,7 +116,8 @@ media_player: adbkey: "/config/android/adbkey" apps: com.amazon.tv.launcher: "Fire TV" - some.background.app: "" # this will never show up in the sources list + some.background.app: # this will never show up in the sources list + another.background.app: "" # this will also never show up in the sources list turn_on_command: "input keyevent 3" turn_off_command: "input keyevent 223" state_detection_rules: From dcfc7e9b0eb128f69bf2fd36b456721dfb004119 Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Fri, 24 Jan 2020 18:14:57 -0800 Subject: [PATCH 3/4] Document 'exclude_unnamed_apps' parameter --- source/_integrations/androidtv.markdown | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/_integrations/androidtv.markdown b/source/_integrations/androidtv.markdown index e349b73e72a9..c2bd2494b0d6 100644 --- a/source/_integrations/androidtv.markdown +++ b/source/_integrations/androidtv.markdown @@ -81,6 +81,11 @@ apps: required: false default: {} type: map +exclude_unnamed_apps: + description: If this is true, then only the apps you specify in the `apps` configuration parameter and [those specified in the backend library](https://github.com/JeffLIrion/python-androidtv/blob/5c39196ade3f88ab453b205fd15b32472d3e0482/androidtv/constants.py#L267-L283) will be shown in the sources list. + required: false + default: false + type: boolean device_class: description: "The type of device: `auto` (detect whether it is an Android TV or Fire TV device), `androidtv`, or `firetv`." required: false @@ -107,13 +112,15 @@ turn_off_command: # Example configuration.yaml entry media_player: # Use the Python ADB implementation with a user-provided key to setup an - # Android TV device. Provide an app name, override the default turn on/off - # commands, and provide custom state detection rules. + # Android TV device. Provide some app names and don't display other apps + # in the sources menuo. Override the default turn on/off commands, and + # provide custom state detection rules. - platform: androidtv name: Android TV device_class: androidtv host: 192.168.0.222 adbkey: "/config/android/adbkey" + exclude_unnamed_apps: true apps: com.amazon.tv.launcher: "Fire TV" some.background.app: # this will never show up in the sources list From beaa76753cf947627f0f71d77e822b9ab7d3e745 Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Sat, 25 Jan 2020 09:51:25 -0800 Subject: [PATCH 4/4] Fix typo --- source/_integrations/androidtv.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/androidtv.markdown b/source/_integrations/androidtv.markdown index c2bd2494b0d6..5aa94b35eb79 100644 --- a/source/_integrations/androidtv.markdown +++ b/source/_integrations/androidtv.markdown @@ -113,7 +113,7 @@ turn_off_command: media_player: # Use the Python ADB implementation with a user-provided key to setup an # Android TV device. Provide some app names and don't display other apps - # in the sources menuo. Override the default turn on/off commands, and + # in the sources menu. Override the default turn on/off commands, and # provide custom state detection rules. - platform: androidtv name: Android TV