If a redirect is encountered, the Location header is extracted and treated as the direct download URL for the music file. This aligns the code with the API behavior which redirects to the actual file location instead of returning a JSON response.
If a redirect is encountered, the Location header is extracted and treated as the direct download URL for the music file. This aligns the code with the API behavior which redirects to the actual file location instead of returning a JSON response.