Skip to content
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

API / gpodder.net Integration #17

Open
stefankoegl opened this issue May 22, 2012 · 5 comments
Open

API / gpodder.net Integration #17

stefankoegl opened this issue May 22, 2012 · 5 comments

Comments

@stefankoegl
Copy link

It would be great if there would be an API so that bitlove can be integrated in other applications / webservices. For my use case I would need an endpoint to retrieve torrent links (and bitlove URLs) for a given podcast feed URL.

I'd imagine something like

  GET /api/feed?url=http%3A%2F%2Fexample.com%2Fmypodcast.rss

  {
      "web": "http://bitlove.org/example/mypodcast",
      "feed": "http://bitlove.org/example/mypodcast/feed",
      "episodes": [
          {
            "web": "http://bitlove.org/example/mypodcast#directlink",
            "file": "http://example.com/mypodcast/episode1.mp3",
            "bittorrent": "http://bitlove.org/t/....e6ab17c48.torrent",
            "size": "5456546",
            ... more meta data
          }
       ]
  }

The additional meta data could be the number of completed downloads, number of seeders / leechers, current bandwith, Flattr links, etc, whatever you like to provide.

@astro
Copy link
Owner

astro commented May 23, 2012

Great that you're adding that here. I'm going to implement something along this proposal in a few days.

Two things that came to mind:

  • Did you notice that this data is almost fully included in the exported feeds? I'm not opposed to a slim JSON export unless ... more meta data means all data from the original feed. I could easily add the original enclosure URL to the exported feeds.
  • Using the feed URL as key may not always work, as I encourage users to add feeds that are not hosted by Feedburner, unlike their end-user feeds.

@astro
Copy link
Owner

astro commented May 27, 2012

I don't feel revealing the original feed URL because it can be regarded private data. Would you mind an entry point like http://bitlove.org/astro/bitlove-show/feed.json?

Perhaps I can add lookup by item id? Note that this can result in multiple items of different feeds. You can map them to your original items by comparing additional metadata like alternate links. I don't intend on ever modifying them.

Please give me feedback, I would love to cooperate with gpodder.net.

@stefankoegl
Copy link
Author

Thanks for the feedback! Generally I see two "tasks" that I would like to automate:

  • Matching podcasts in gpodder.net with podcasts in bitlove. If you don't like to reveal the original feed URL, it would be good to have a list of recently added feeds (not episodes) that can be easily parsed / crawled. Matching could then be done semi-automatically, for example by adding titles and approving matches
  • Once a gpodder.net and a bitlove feed are assigned, I need some way to match their episodes. As the bitlove feeds refer to the original media files, and gpodder.net uses those URLs to identify episodes, this should be easy to do.

Do you think you could provide a page / API endpoint to get the newest feeds so that I could start working on the first point?

@astro
Copy link
Owner

astro commented Jun 9, 2012

Here's a first attempt at matching episodes (enclosures):

curl "http://api.bitlove.org/by-enclosure.json?url=http://chaosradio.ccc.de/archive/chaosradio_30.mp3&url=http://chaosradio.ccc.de/archive/chaosradio_31.mp3&url=http://chaosradio.ccc.de/archive/chaosradio_32.mp3&url2=http://chaosradio.ccc.de/archive/chaosradio_33.mp3&url3=http://chaosradio.ccc.de/archive/chaosradio_34.mp3"

The feed data can be cached pretty indefinitely. Tracker statistics however are always in flux.

Next, how about crawling the directory through OPML?

@stefankoegl
Copy link
Author

I've made a python library available that wraps the current bitlove api: http://pypi.python.org/pypi/bitlove/0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants