Skip to content

Commit c6e9c77

Browse files
authored
Merge pull request #300 from exislow/296-297-hires-mqa
296 297 hires mqa
2 parents 6c15d7c + 696b97a commit c6e9c77

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

tests/test_session.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,7 @@ def test_video_quality_defaults_to_best(session):
141141
assert session.video_quality == "HIGH"
142142

143143

144-
@pytest.mark.parametrize(
145-
"quality", ["LOW", "HIGH", "LOSSLESS", "HI_RES", "HI_RES_LOSSLESS"]
146-
)
144+
@pytest.mark.parametrize("quality", ["LOW", "HIGH", "LOSSLESS", "HI_RES_LOSSLESS"])
147145
def test_manually_set_audio_quality_is_preserved(session, quality):
148146
session.audio_quality = quality
149147
assert session.audio_quality == quality

tidalapi/media.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class Quality(str, Enum):
5858
low_96k: str = "LOW"
5959
low_320k: str = "HIGH"
6060
high_lossless: str = "LOSSLESS"
61-
hi_res: str = "HI_RES"
6261
hi_res_lossless: str = "HI_RES_LOSSLESS"
6362
default: str = low_320k
6463

@@ -86,7 +85,7 @@ def __str__(self) -> str:
8685

8786

8887
class MediaMetadataTags(str, Enum):
89-
hires_lossless: str = "HIRES_LOSSLESS"
88+
hi_res_lossless: str = "HIRES_LOSSLESS"
9089
lossless: str = "LOSSLESS"
9190
dolby_atmos: str = "DOLBY_ATMOS"
9291

@@ -442,7 +441,7 @@ def is_hi_res_lossless(self) -> bool:
442441
try:
443442
if (
444443
self.media_metadata_tags
445-
and MediaMetadataTags.hires_lossless in self.media_metadata_tags
444+
and MediaMetadataTags.hi_res_lossless in self.media_metadata_tags
446445
):
447446
return True
448447
except:
@@ -478,9 +477,7 @@ class Stream:
478477

479478
track_id: int = -1
480479
audio_mode: str = AudioMode.stereo # STEREO, DOLBY_ATMOS
481-
audio_quality: str = (
482-
Quality.low_320k
483-
) # LOW, HIGH, LOSSLESS, HI_RES, HI_RES_LOSSLESS
480+
audio_quality: str = Quality.low_320k # LOW, HIGH, LOSSLESS, HI_RES_LOSSLESS
484481
manifest_mime_type: str = ""
485482
manifest_hash: str = ""
486483
manifest: str = ""

0 commit comments

Comments
 (0)