jaimeMF / youtube-dl-api-server

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

autostart the app and added top-level entrypoints for url redirections #46

Closed eadmaster closed 8 years ago

jaimeMF commented 8 years ago

Split unrelated changes in different pull requests.

Note that you can already run the server https://github.com/jaimeMF/youtube-dl-api-server/blob/master/youtube_dl_server/__main__.py, so I don't understand why it should be run on mainGAE.py (which is only used for GAE).

eadmaster commented 8 years ago

Oh, i see now, then just delete the autostart the app pull request. Also I suggest to add a note in the README.rst that tells how to start the server: python -m youtube_dl_server

The new entrypoints may also be moved in "/api", if you think it is a good idea (the documentation should be updated after this).

jaimeMF commented 8 years ago

Oh, i see now, sorry. Then I suggest to add a note in the README.rst that tells how to start the server: python -m youtube_dl_server

I may do it, but as documented in https://youtube-dl-api-server.readthedocs.io/en/latest/install.html#using-pip, you should install it with pip and just run youtube-dl-server.

The new entrypoints may also be moved in "/api", if you think it is a good idea (the documentation should be updated after this).

I don't know, but please don't duplicate code and move common code to a function.

eadmaster commented 8 years ago

Ok, but imo that's an important part that should be included in the main project page.

Btw i've found that my new endpoints does not work well with playlist and search urls, so you may consider cancelling this commit:

http://localhost/listen?url=youtube.com/results?search_query=zelda+trailer
http://localhost/listen?url=youtube.com/playlist?list=PLhSyQQVdOOFZ0mnX1ZPcY58LDUzIkvlLi
jaimeMF commented 8 years ago

I have added it as /api/play (3f42de2707377bd5cf8a1729d25bb7c695f945e1) and you can now use the format parameter (cdffe8afa0853e9643f69caef61527a6db8fe36c), therefore I'm closing it. Thanks for the suggestion!