Git Product home page Git Product logo

podpodge's Introduction

Podpodge

Scala CI

What is it?

Podpodge is a server + client for converting YouTube playlists (or plain audio files in a directory) into audio-only RSS feeds that podcast apps can consume.

Podpodge is written using pekko-http + tapir + ZIO + Quill. It's still a work in progress in the sense that it doesn't have the nicest front-end yet (a Scala.js + Slinky front-end will be coming). Though it does have built-in Swagger integration so that you don't have to construct the API requests yourself for interacting with the DB and getting the RSS feed.

Requirements

* The above are only requirements if sourceType is youTube. For directory you can ignore this.

Usage

Run the server either using sbt (sbt run) or create an executable jar (sbt assembly) and run that. This will run the Podpodge server at http://localhost:8080 by default (this can be changed with PODPODGE_HOST and PODPODGE_PORT). For example, you might want to change PODPODGE_HOST to your network IP (like 192.168.1.100 or whatever it's set to) so that you can access it from your phone on the same local network. Of course the other option is to host it on a "proper" public server so that you can access it from anywhere.

To register a YouTube playlist as a Podcast, call the POST /podcast/{sourceType} route (where sourceType can be set to youTube or directory). You can do this with the built-in Swagger integration (which is the default top-level page).

The playlist ID is what appears in the address bar when visiting a YouTube playlist page, like https://www.youtube.com/playlist?list=YOUTUBE_PLAYLIST_ID

Note: Private playlists aren't supported (might be possible after this issue is addressed). Using unlisted playlists is the closest alternative for now.

If successful, this should return you a JSON response of the Podcast. You can then use the POST /podcasts/check route to check for new episodes:

(Note: There is an issue for setting up CRON-like schedules per Podcast for automatic checks)

Once that's done, you can access the RSS feed URL and put it into whatever podcast app you use. It'll look something like this (the ID may be different if you have multiple podcasts): http://localhost:8080/podcast/1/rss

Contributing

Podpodge is fairly barebones and I mainly made it for myself because similar apps I tried at the time didn't quite work for me. Plus, this was an exercise to learn how akka-http/pekko-http + ZIO + Quill (and eventually Slinky) work together. There are a bunch more features that could potentially be added and I created some issues for those. Feel free to take any if you'd like. Contributions are always welcome!

podpodge's People

Contributors

reibitto avatar scala-steward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

scala-steward

podpodge's Issues

Support more audio options

For example, the user might want to set the audio quality a bit lower to save on space. Or maybe download as ogg. youtube-dl has a bunch of options for stuff like this.

[Quill] Add a Crud DAO abstraction

The copy/paste in structure between PodcastDao and EpisodeDao isn't such a big deal since it's only 2 tables currently, but I'd really like to investigate a "proper" solution to this. Quill being macro-based makes abstracting things out a little tricky. I think creating a CrudDao abstraction that works for Quill would be a good learning experience. And if the solution works nicely, we could potentially contribute it back to solve this issue: zio/zio-quill#30

Set up Graal native-image

Hopefully my choice of akka-http doesn't cause problems for this. ๐Ÿ˜… If so, we might either have to switch the backend server (not too hard to do) or possibly describe the routes using tapir. If using tapir, then switching out the backend (or supporting multiple) should be easy.

Support OAuth for YouTube API

Right now Podpodge is only using API keys but I believe if we use OAuth we would be able to access private playlists too, which would be useful.

Add a user-friendly frontend

I was thinking of using Scala.js and Slinky for this. So basically a small React app with a simple UI that calls the API routes. This would be much nicer than requiring the use of curl or tools like that.

Option for downloading recent episodes only

Rather than always downloading all episodes, we should have an option to say "only download latest X episodes" or something to that effect. This would be nice so that extremely large playlists don't cause space issues.

Automatically set up youtuble-dl

Podpodge currently assumes youtube-dl is installed. Instead, we should probably fallback to downloading youtube-dl if it's not already on the system.

Note that zio-process has typed errors with one being CommandError.ProgramNotFound. It should be useful for implementing this feature.

Add option to run `/podcasts/check` on startup

This should be a config option. Something like checkForUpdatesOnStartup.

This kind of overlaps with #8, but only slightly. #8 is more for when you're running the Podpodge server over a long period of time. This checkForUpdatesOnStartup option is more useful for when you simply want to run the server every once in a while to download some new episodes, and then kill the server when you're done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.