Skip to content

Commit

Permalink
Merge pull request #300 from exislow/296-297-hires-mqa
Browse files Browse the repository at this point in the history
296 297 hires mqa
  • Loading branch information
tehkillerbee authored Nov 9, 2024
2 parents 6c15d7c + 696b97a commit c6e9c77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 1 addition & 3 deletions tests/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ def test_video_quality_defaults_to_best(session):
assert session.video_quality == "HIGH"


@pytest.mark.parametrize(
"quality", ["LOW", "HIGH", "LOSSLESS", "HI_RES", "HI_RES_LOSSLESS"]
)
@pytest.mark.parametrize("quality", ["LOW", "HIGH", "LOSSLESS", "HI_RES_LOSSLESS"])
def test_manually_set_audio_quality_is_preserved(session, quality):
session.audio_quality = quality
assert session.audio_quality == quality
Expand Down
9 changes: 3 additions & 6 deletions tidalapi/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class Quality(str, Enum):
low_96k: str = "LOW"
low_320k: str = "HIGH"
high_lossless: str = "LOSSLESS"
hi_res: str = "HI_RES"
hi_res_lossless: str = "HI_RES_LOSSLESS"
default: str = low_320k

Expand Down Expand Up @@ -86,7 +85,7 @@ def __str__(self) -> str:


class MediaMetadataTags(str, Enum):
hires_lossless: str = "HIRES_LOSSLESS"
hi_res_lossless: str = "HIRES_LOSSLESS"
lossless: str = "LOSSLESS"
dolby_atmos: str = "DOLBY_ATMOS"

Expand Down Expand Up @@ -442,7 +441,7 @@ def is_hi_res_lossless(self) -> bool:
try:
if (
self.media_metadata_tags
and MediaMetadataTags.hires_lossless in self.media_metadata_tags
and MediaMetadataTags.hi_res_lossless in self.media_metadata_tags
):
return True
except:
Expand Down Expand Up @@ -478,9 +477,7 @@ class Stream:

track_id: int = -1
audio_mode: str = AudioMode.stereo # STEREO, DOLBY_ATMOS
audio_quality: str = (
Quality.low_320k
) # LOW, HIGH, LOSSLESS, HI_RES, HI_RES_LOSSLESS
audio_quality: str = Quality.low_320k # LOW, HIGH, LOSSLESS, HI_RES_LOSSLESS
manifest_mime_type: str = ""
manifest_hash: str = ""
manifest: str = ""
Expand Down

0 comments on commit c6e9c77

Please sign in to comment.