Giter Club home page Giter Club logo

podracer's Introduction

PodRacer

CodeFactor Better Uptime Badge GitHub repo size GitHub contributors GitHub stars GitHub forks

A podcast catch-up service running on your very own server!

I'm running one at podracer.zachn.me, feel free to take the service for a spin. I'm planning on keeping this up and available for free, but I'm not making any promises -- if it starts to get swamped I'll have to figure out something more scalable.

Features

  • Time shift podcasts - Have a favorite show that died out and want to relive it? PodRacer lets you experience it anew by creating a feed where the first episode was published today.
  • Two rate-control modes
    • Variable publishing rate - Do you want to catch up on serial podcast? Set the rate to be > 1x and PodRacer will scale the shifted publish dates, letting you slowly (or quickly) catch up to real time. Podcasts coming at you too fast? Set the rate to be < 1x to make a bi-weekly show weekly, or a weekly show bi-weekly.
    • Publish every X days - For archived podcasts that have all episodes "published" on the same day, PodRacer can set a fixed amount of time between each episode, restoring the periodic publishing feel.
  • Integrates new episodes - Once you catch up, PodRacer integrates the new episodes as they are published, seamlessly transferring you over to the "normal" listening experience.
  • Self hosted - complete autonomy over your feeds.

PodRacer is most useful if you prefer to listen to your podcasts as they are published (i.e. they are dropped into a feed, and you just listen in order). It lets legacy content seamlessly fit into the stream of contemporary content.

Tests were done against Overcast (info). Other podcast players might have quirks I didn't see. Feel free to file a github issue and I'll do what I can to fix it up.

Podcast Archiver

There is also a small utility tool podarch, used to archive all the episodes of a given feed. See podarch -h for usage.

Installation

I run this service on a Raspberry Pi 3.

rustup update && cargo update && cargo build --release

It's going to take a very long time to build. That's Rust.

Sometimes (not quite sure why only sometimes) my Pi3 struggles to build when multiple threads are enabled (the default). You can cargo clean && cargo build --release -j 1 to force building with only one thread. This will take way longer, but you don't run out of memory.

Builds go much faster on beefier hardware. Cross-compile by installing cross (via cargo install cross), then building for the Pi:

cross build --release --target=armv7-unknown-linux-gnueabihf --features vendored-openssl

The binary will end up in target/armv7-unknown-linux-gnueabihf/release.

Start the server

cargo run --release --bin podracer

Podcast clients will need to access the server remotely, so you will have to set up port forwarding in your router.

Keeping the process alive

You can either run in a tmux instance or use nohup and send it to the background. I've set it up as a systemd service, but that is beyond the scope of this README.

Docker method

If you wish to run PodRacer using docker, you can use the following run command:

docker run -d -v podracer_podcasts:/app/podcasts/ -p 41968:41968/tcp --name podracer ghcr.io/znielsen/podracer:latest

Contributing

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Donating

If you like it then you shoulda thrown a dollar at it.

If you found PodRacer useful, a donation would be great! Recommended $1/podcast (as in per feed run through the service, not per episode). No pressure, but supporting software you like is cool.

paypal

Maintainers

Zach Nielsen - @ZNielsen

podracer's People

Contributors

dependabot[bot] avatar macleykun avatar znielsen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

podracer's Issues

Add hover for info

A question mark on the side of the parameters to clarify what they do on hover.

Dead feed detection

If a feed hasn't been requested in like a year, delete it.
Keep tabs on the last time a feed was requested, delete if it’s been too long

Properly scrub XML

Needed to scrub some xml elements. Accomplished that with a simple string sub, but I might need to fully scrub stuff in the future.

Fix panic on feed import

https://audioboom.com/channels/4278829.rss causes a panic on ingest. Fix it!

Getting file from /home/pi1/.podracer/blank-check-with-griffin-&-david_1.5_ep1_2020-12-23/original.rss
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Xml(EscapeError(UnterminatedEntity(91..113)))', server/src/rou
tes.rs:375:50

Looks like this happens when gathering "for fun" stats, look into gracefully bailing on non-required stuff.

API/Web - Fast forward x number of days

If a podcast takes a long break, it might be nice to be able to fast forward. Probably results in creating a new feed with a different start_ep or anchor date or the like.

Ban IPs that request sus resources

I'm seeing IPs request things like /.ftpconfig and /.vscode/sftp.json. Look into banning IPs after an obviously malicious request.

Hook into crowdsec or similar?

Add some super basic tests

Core:

  • test storing/unwrapping RSS feed

Server

  • Spin up and run each handler
  • Assert URLs are decoded correctly

Fix catch up date

Currently just states when feed will catch up to the newest episode as of creation date.
Interpolate the rate of publish and project a catch up date.

Add new mode: release episode every x days

Add a different way to race - instead of scaling the distance between published episodes, set a constant rate for each episode, regardless of how much time is between episodes.

Updater crashed

Fix crash - properly handle a failure - should never panic in update thread.

thread 'Updater' panicked at 'called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Decode, source: TimedOut }', racer/src/lib.rs:585:32

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.