Skip to content

Commit

Permalink
Fix Audyssey update crashing when receiver does not return dynamiceq …
Browse files Browse the repository at this point in the history
…/ add MULTI IN + VIRTUAL:X sound mode
  • Loading branch information
ol-iver committed Dec 13, 2020
1 parent 053727b commit b073203
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DATA
__title__ = 'denonavr'

VERSION
0.9.7
0.9.8

====================================================================================

Expand Down Expand Up @@ -736,7 +736,7 @@ CLASSES
| set_dynamicvol(self, setting)
| Set Dynamic Volume.
|
| set_mutlieq(self, setting)
| set_multieq(self, setting)
| Set MultiEQ mode.
|
| set_reflevoffset(self, setting)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# denonavr
[![Version](https://img.shields.io/badge/version-v0.9.7-orange.svg)](https://github.com/scarface-4711/denonavr)
[![Version](https://img.shields.io/badge/version-v0.9.8-orange.svg)](https://github.com/scarface-4711/denonavr)
[![Build Status](https://travis-ci.com/scarface-4711/denonavr.svg?branch=master)](https://travis-ci.com/scarface-4711/denonavr)
[![PyPi](https://img.shields.io/pypi/v/denonavr.svg)](https://pypi.org/project/denonavr)
[![License](https://img.shields.io/github/license/scarface-4711/denonavr.svg)](LICENSE)

Automation Library for Denon AVR receivers - current version 0.9.7
Automation Library for Denon AVR receivers - current version 0.9.8

## Installation

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ denonavr
.. |Build Status| .. image:: https://travis-ci.com/scarface-4711/denonavr.svg?branch=master
:target: https://travis-ci.com/scarface-4711/denonavr

Automation Library for Denon AVR receivers - current version 0.9.7
Automation Library for Denon AVR receivers - current version 0.9.8

Installation
------------
Expand Down
2 changes: 1 addition & 1 deletion denonavr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
logging.getLogger(__name__).addHandler(logging.NullHandler())

__title__ = "denonavr"
__version__ = "0.9.7"
__version__ = "0.9.8"


def discover():
Expand Down
12 changes: 7 additions & 5 deletions denonavr/audyssey.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def update(self):
if param.get("name") == "multeq":
self.multeq = MULTI_EQ_MAP.get(param.text)
elif param.get("name") == "dynamiceq":
self.dynamiceq = bool(int(param.text))
self.dynamiceq = bool(int(
param.text)) if param.text is not None else None
elif param.get("name") == "reflevoffset":
# Reference level offset can only be used with DynamicEQ
if self.dynamiceq is False:
Expand All @@ -115,9 +116,10 @@ def update(self):
self.reflevoffset = REF_LVL_OFFSET_MAP.get(param.text)
elif param.get("name") == "dynamicvol":
self.dynamicvol = DYNAMIC_VOLUME_MAP.get(param.text)
setattr(
self, "{name}_control".format(name=param.get("name")),
bool(int(param.get("control"))))
if param.get("control") is not None:
setattr(
self, "{name}_control".format(name=param.get("name")),
bool(int(param.get("control"))))
return True

def _set_audyssey(self, parameter, value):
Expand Down Expand Up @@ -150,7 +152,7 @@ def dynamiceq_on(self):
if self._set_audyssey(parameter="dynamiceq", value=1) is True:
self.dynamiceq = True

def set_mutlieq(self, setting):
def set_multieq(self, setting):
"""Set MultiEQ mode."""
if self._set_audyssey(
parameter="multeq", value=MULTI_EQ_MAP_LABELS.get(setting)
Expand Down
4 changes: 2 additions & 2 deletions denonavr/denonavr.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
'DTS NEO:X MUSIC', 'DOLBY PL2 MUSIC']),
('MOVIE', ['PLII MOVIE', 'PLII CINEMA', 'DTS NEO:X CINEMA',
'DTS NEO:6 CINEMA', 'DOLBY D +NEO:X C',
'PLIIX CINEMA', 'DOLBY PLII MOVIE']),
'PLIIX CINEMA', 'DOLBY PLII MOVIE', 'MULTI IN + VIRTUAL:X']),
('GAME', ['PLII GAME', 'DOLBY D +NEO:X G']),
('AUTO', ['None']),
('STANDARD', ['None2']),
Expand Down Expand Up @@ -1728,7 +1728,7 @@ def dynamic_volume(self, setting):
@multi_eq.setter
def multi_eq(self, setting):
"""Set MultiEQ."""
self._audyssey.set_mutlieq(setting=setting)
self._audyssey.set_multieq(setting=setting)

@input_func.setter
def input_func(self, input_func):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages, setup

setup(name='denonavr',
version='0.9.7',
version='0.9.8',
description='Automation Library for Denon AVR receivers',
long_description='Automation Library for Denon AVR receivers',
url='https://github.com/scarface-4711/denonavr',
Expand Down

0 comments on commit b073203

Please sign in to comment.