MTG / freesound-python

python client for the freesound API
MIT License
129 stars 36 forks source link

Wrong endpoint for sound.analysis_frames #23

Closed lluissuros closed 5 years ago

lluissuros commented 5 years ago

the Sound.analysis_frames endpoint received from freesound_client.get_sound() is pointing to a .yaml instead of the correct .json

Example:

freesound_client = freesound.FreesoundClient()
freesound_client.set_token(MY_FREESOUND_API_KEY)
my_freesound_id = 397667
sound freesound_client.get_sound(my_freesound_id)
print(sound.analysis_frames)

will return: https://freesound.org/data/analysis/397/397667_7137750_frames.yaml

instead of the correct: https://freesound.org/data/analysis/397/397667_7137750_frames.json

ffont commented 5 years ago

This is because of a bug in the Freesound APIv2, not in the python client for the API. Now it has been fixed and changed deployed: https://github.com/MTG/freesound/commit/4edd9fc23b6525512a0932353c8e3fdd1380059a. As a result Sound.analysis_frames will return correct URLs now.