From b1e6692fe25976e069b8a799f4192f420d0d8379 Mon Sep 17 00:00:00 2001 From: tehkillerbee Date: Wed, 7 Feb 2024 21:46:30 +0100 Subject: [PATCH] Fix formatting --- mopidy_tidal/playback.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/mopidy_tidal/playback.py b/mopidy_tidal/playback.py index 4232cd4..fc07c86 100755 --- a/mopidy_tidal/playback.py +++ b/mopidy_tidal/playback.py @@ -8,11 +8,11 @@ from mopidy_tidal.backend import TidalBackend import logging +from pathlib import Path from mopidy import backend from tidalapi import Quality from tidalapi.media import ManifestMimeType -from pathlib import Path from . import Extension, context @@ -41,15 +41,20 @@ def translate_uri(self, uri): manifest = stream.get_stream_manifest() logger.info("MimeType:{}".format(stream.manifest_mime_type)) logger.info( - "Starting playback of track:{}, (quality:{}, codec:{}, {}bit/{}Hz)".format(track_id, - stream.audio_quality, - manifest.get_codecs(), - stream.bit_depth, - stream.sample_rate)) + "Starting playback of track:{}, (quality:{}, codec:{}, {}bit/{}Hz)".format( + track_id, + stream.audio_quality, + manifest.get_codecs(), + stream.bit_depth, + stream.sample_rate, + ) + ) if stream.manifest_mime_type == ManifestMimeType.MPD.value: hls = manifest.get_hls() if hls: - hls_path = Path(Extension.get_cache_dir(context.get_config()), "hls.m3u8") + hls_path = Path( + Extension.get_cache_dir(context.get_config()), "hls.m3u8" + ) with open(hls_path, "w") as my_file: my_file.write(hls) return "file://{}".format(hls_path)