Skip to content

Conversation

@Nortonko
Copy link
Contributor

@Nortonko Nortonko commented Oct 10, 2023

add support for androidtv 12 & 13. Tested. Also changed the way to set the volume from PR #333.
Reformatted code by black formatter

@Nortonko
Copy link
Contributor Author

Hi, the PR pass all of the CI checks. Can you merge it and publish new releases please?


return constants.CMD_HDMI_INPUT

def _cmd_volume_set(self):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be simpler to take volume_level as a parameter and return the formatted string.

new_volume = int(min(max(round(self.max_volume * volume_level), 0.0), self.max_volume))

await self._adb.shell("media volume --show --stream 3 --set {}".format(new_volume))
await self._adb.shell(self._cmd_volume_set().format(new_volume))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change needs to be made in basetv_sync.py, too.

@JeffLIrion JeffLIrion merged commit c1998f3 into JeffLIrion:master Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants