Skip to content

Commit

Permalink
Merge ac5e4e7 into 36e2609
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffLIrion committed Nov 30, 2020
2 parents 36e2609 + ac5e4e7 commit 949e52c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions androidtv/__init__.py
Expand Up @@ -47,12 +47,14 @@ def setup(host, port=5555, adbkey='', adb_server_ip='', adb_server_port=5037, st
atv = AndroidTVSync(host, port, adbkey, adb_server_ip, adb_server_port, state_detection_rules, signer)
atv.adb_connect(auth_timeout_s=auth_timeout_s)
atv.device_properties = atv.get_device_properties()
atv.installed_apps = atv.get_installed_apps()
return atv

if device_class == 'firetv':
ftv = FireTVSync(host, port, adbkey, adb_server_ip, adb_server_port, state_detection_rules, signer)
ftv.adb_connect(auth_timeout_s=auth_timeout_s)
ftv.device_properties = ftv.get_device_properties()
ftv.installed_apps = ftv.get_installed_apps()
return ftv

if device_class != 'auto':
Expand All @@ -66,6 +68,9 @@ def setup(host, port=5555, adbkey='', adb_server_ip='', adb_server_port=5037, st
# get device properties
aftv.device_properties = aftv.get_device_properties()

# get the installed apps
aftv.installed_apps = aftv.get_installed_apps()

# Fire TV
if aftv.device_properties.get('manufacturer') == 'Amazon':
aftv.__class__ = FireTVSync
Expand Down
3 changes: 3 additions & 0 deletions androidtv/setup_async.py
Expand Up @@ -64,6 +64,9 @@ async def setup(host, port=5555, adbkey='', adb_server_ip='', adb_server_port=50
# get device properties
aftv.device_properties = await aftv.get_device_properties()

# get the installed apps
aftv.installed_apps = await aftv.get_installed_apps()

# Fire TV
if aftv.device_properties.get('manufacturer') == 'Amazon':
aftv.__class__ = FireTVAsync
Expand Down

0 comments on commit 949e52c

Please sign in to comment.