jaimeMF / youtube-dl-api-server

A youtube-dl REST API server
https://youtube-dl-api-server.readthedocs.org/
The Unlicense
364 stars 214 forks source link

trying to add format in the extra parameters whitelist #47

Closed eadmaster closed 8 years ago

eadmaster commented 8 years ago

I've added 'format' : str, in the ALLOWED_EXTRA_PARAMS dict. However this url still returns the full json array with all the formats: http://localhost/api/info?url=youtube.com/watch?v=UYCilZ8yMmU&format=m4a

jaimeMF commented 8 years ago

I think the formats field is always the same, but the url and ext fields in the main dict will contain the info for the m4a format.

eadmaster commented 8 years ago

i see, so it is not possible to filter the entries in the format field via the API, correct?

jaimeMF commented 8 years ago

i see, so it is not possible to filter the entries in the format field via the API, correct?

No youtube-dl itself always return the same formats field and the other fields at the main dictionary contain the info of the requested format. If you are only interested in one format, you shouldn't use the formats field.