From 09b39b2f40dc0cec230d1132ac2c95a03ddbda5f Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Fri, 2 Oct 2020 02:15:16 +0200 Subject: [PATCH] more typos --- music_assistant/constants.py | 2 +- music_assistant/helpers/musicbrainz.py | 2 +- music_assistant/providers/fanarttv/__init__.py | 2 +- music_assistant/providers/spotify/__init__.py | 2 +- music_assistant/web/endpoints/config.py | 2 +- music_assistant/web/endpoints/players.py | 4 ++-- music_assistant/web/endpoints/websocket.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/music_assistant/constants.py b/music_assistant/constants.py index 5e9aab7f..e812196e 100755 --- a/music_assistant/constants.py +++ b/music_assistant/constants.py @@ -1,6 +1,6 @@ """All constants for Music Assistant.""" -__version__ = "0.0.49" +__version__ = "0.0.50" REQUIRED_PYTHON_VER = "3.7" # configuration keys/attributes diff --git a/music_assistant/helpers/musicbrainz.py b/music_assistant/helpers/musicbrainz.py index b3fcc038..d4d66dd1 100644 --- a/music_assistant/helpers/musicbrainz.py +++ b/music_assistant/helpers/musicbrainz.py @@ -175,7 +175,7 @@ class MusicBrainz: result = await response.json(loads=orjson.loads) except ( aiohttp.client_exceptions.ContentTypeError, - orjson.decoder.JSONDecodeError, + orjson.JSONDecodeError, ) as exc: msg = await response.text() LOGGER.error("%s - %s", str(exc), msg) diff --git a/music_assistant/providers/fanarttv/__init__.py b/music_assistant/providers/fanarttv/__init__.py index fb43e7aa..66bb605c 100755 --- a/music_assistant/providers/fanarttv/__init__.py +++ b/music_assistant/providers/fanarttv/__init__.py @@ -93,7 +93,7 @@ class FanartTvProvider(MetadataProvider): result = await response.json(loads=orjson.loads) except ( aiohttp.client_exceptions.ContentTypeError, - orjson.decoder.JSONDecodeError, + orjson.JSONDecodeError, ): LOGGER.error("Failed to retrieve %s", endpoint) text_result = await response.text() diff --git a/music_assistant/providers/spotify/__init__.py b/music_assistant/providers/spotify/__init__.py index ad5a4b90..a1f72cb8 100644 --- a/music_assistant/providers/spotify/__init__.py +++ b/music_assistant/providers/spotify/__init__.py @@ -526,7 +526,7 @@ class SpotifyProvider(MusicProvider): stdout, _ = await spotty.communicate() try: result = orjson.loads(stdout) - except orjson.decoder.JSONDecodeError: + except orjson.JSONDecodeError: LOGGER.warning("Error while retrieving Spotify token!") result = None # transform token info to spotipy compatible format diff --git a/music_assistant/web/endpoints/config.py b/music_assistant/web/endpoints/config.py index 9e014225..6c21ac6f 100644 --- a/music_assistant/web/endpoints/config.py +++ b/music_assistant/web/endpoints/config.py @@ -61,7 +61,7 @@ async def async_put_config(request: web.Request): entry_key = request.match_info.get("entry_key") try: new_value = await request.json(loads=orjson.loads) - except orjson.decoder.JSONDecodeError: + except orjson.JSONDecodeError: new_value = ( request.app["mass"] .config[conf_base][conf_key] diff --git a/music_assistant/web/endpoints/players.py b/music_assistant/web/endpoints/players.py index ee40ba66..5e776b71 100644 --- a/music_assistant/web/endpoints/players.py +++ b/music_assistant/web/endpoints/players.py @@ -30,7 +30,7 @@ async def async_player_command(request: web.Request): cmd = request.match_info.get("cmd") try: cmd_args = await request.json(loads=orjson.loads) - except orjson.decoder.JSONDecodeError: + except orjson.JSONDecodeError: cmd_args = None player_cmd = getattr(request.app["mass"].players, f"async_cmd_{cmd}", None) if player_cmd and cmd_args is not None: @@ -112,7 +112,7 @@ async def async_player_queue_cmd(request: web.Request): cmd = request.match_info.get("cmd") try: cmd_args = await request.json(loads=orjson.loads) - except orjson.decoder.JSONDecodeError: + except orjson.JSONDecodeError: cmd_args = None if cmd == "repeat_enabled": player_queue.repeat_enabled = cmd_args diff --git a/music_assistant/web/endpoints/websocket.py b/music_assistant/web/endpoints/websocket.py index 43b110d7..d26fa4ac 100644 --- a/music_assistant/web/endpoints/websocket.py +++ b/music_assistant/web/endpoints/websocket.py @@ -41,7 +41,7 @@ async def async_websocket_handler(request: aiohttp.web.Request): continue try: data = msg.json(loads=orjson.loads) - except orjson.decoder.JSONDecodeError: + except orjson.JSONDecodeError: await async_send_message( "error", 'commands must be issued in json format \ -- 2.34.1