Skip to content

Commit

Permalink
Bugfix: get_urls() always returning [str]. (Fixes #185)
Browse files Browse the repository at this point in the history
  • Loading branch information
tehkillerbee committed Nov 13, 2024
1 parent 7f8d44f commit cab81ce
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Changelog

#### v0.3.9

- Bugfix: Handle get_urls() returning list in tidalapi v0.8.1

#### v0.3.8

- tidalapi version bump to v0.8.1
- Bugfix: Reverted auto-login only when AUTO enabled.

#### v0.3.7

-
- tidalapi version bump to v0.8.0
- Tests: Fixed unit tests

Expand Down
4 changes: 2 additions & 2 deletions mopidy_tidal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from mopidy import config, ext

__version__ = "0.3.8"
__version__ = "0.3.9"

# TODO: If you need to log, use loggers named after the current Python module
logger = logging.getLogger(__name__)
Expand All @@ -27,7 +27,7 @@ def get_default_config(self):
def get_config_schema(self):
schema = super().get_config_schema()
schema["quality"] = config.String(
choices=["HI_RES_LOSSLESS", "HI_RES", "LOSSLESS", "HIGH", "LOW"]
choices=["HI_RES_LOSSLESS", "LOSSLESS", "HIGH", "LOW"]
)
schema["client_id"] = config.String(optional=True)
schema["client_secret"] = config.String(optional=True)
Expand Down
8 changes: 6 additions & 2 deletions mopidy_tidal/playback.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def translate_uri(self, uri):
logger.info("Playback quality: %s", session.config.quality)
else:
logger.info(
"No HI_RES available for this track; Using playback quality: %s",
"No HIRES_LOSSLESS available for this track; Using playback quality: %s",
"LOSSLESS",
)

Expand Down Expand Up @@ -63,4 +63,8 @@ def translate_uri(self, uri):
else:
raise AttributeError("No MPD manifest available!")
elif stream.manifest_mime_type == ManifestMimeType.BTS:
return manifest.get_urls()
urls = manifest.get_urls()
if isinstance(urls, list):
return urls[0]
else:
return urls
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mopidy-tidal"
version = "0.3.8"
version = "0.3.9"
description = "Mopidy Extension for Tidal music service integration."
authors = ["Johannes Linde <[email protected]>"]
license = "Apache License 2.0"
Expand Down

0 comments on commit cab81ce

Please sign in to comment.