Skip to content

File extension determination is wrong #304

@exislow

Description

@exislow

I did some research and found out that this behavior is wrong:
https://github.com/tamland/python-tidal/blob/1720a0bcb7b2ec1d935ca11b366eba1d1655d459/tidalapi/media.py#L619-L637

We need to separate the used codec and the file extension. Since, if a file is returned as MP4 it still can have a FLAC encoded audio channel, but the container is indeed an MP4 container.

What happens here is, if stream has ".mp4" in it's file name, the lines above try to check the used codec and wrongly adapt the file extension. To overcome this problem problem I propose solely rely on the extension within the URL. I have a problem which is related to this exislow/tidal-dl-ng#232

A lot of debugging led me to this conclusion. I will propose a solution with a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions