-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new podcast by API #219
Comments
A podcast is automatically added once the first user subscribes to it. Then gpodder.net should automatically and periodically fetch the latest episodes. A dedicated API currently doesn’t exist, but I don’t see any reason why we could/shouldn’t add one. |
Here's a short summary of how I would approach this. OverviewI'd suggest to implement an interface that accepts a URL and parses / creates the podcast asynchronously. In this way we can delay creating the podcast until after the feed has been parsed, and avoid to create podcasts that are actually empty. HTTP InterfaceRequest
Authentication does not seem to be necessary. ProcessingCheck if a podcast for the given URL already exists. If so, redirect to it (see Retrieve Podcast Data). If not, accept the URL for processing. Response
Request Job StatusReturns the celery task id. When the job finished successfully it contains a link to the podcast (as above). If it finished unsuccessfully (because the URL was not a feed), it can contain a 4xx status code and a respective error message.
ImplementationI'd implement the API views in mygpo/api/advanced/directory.py. The function for parsing a podcast in a celery task is mygpo.data.tasks.update_podcasts, and can be called as DocumentationThe API should be documented in mygpo/doc/api/reference/directory.rst. |
I'd like to contribute with this! |
@nicolas471, that would be great! Please feel free to go ahead and submit a pull request. I am happy to also review partially finished changes to guide you along the way. If there's anything you need, please let me know! |
|
I'd suggest to include functional code, tests, documentation, etc all in one pull request. It might get a bit longer but it will be easier to keep track of things that way. Also you can make sure that things are complete (ie docs or tests might be forgotten after the code has been merged). |
@stefankoegl Thanks for your advice. The previous PR has been merged, so I had to open a new PR. Next time I'll tick the boxes before opening the PR. |
I would like to add new podcasts and episodes by the API but don't find any information about the first.
We are a community radio network and offer all the radio content as podcasts. Now we are looking for a open/libre podcast directory to submit our content and we are actually evaluation fyyd and gpodder.
The text was updated successfully, but these errors were encountered: