#podcast #sync #server #state #devices #user-name #gpodder

app podsync

A server to sync podcasts with, mirroring the gpodder API. Designed for use with AntennaPod

6 releases

0.1.5 May 29, 2024
0.1.4 Oct 22, 2023
0.1.3 Apr 6, 2023
0.1.2 Mar 20, 2023
0.0.1 Mar 8, 2023

#101 in HTTP server

Download history 1/week @ 2024-03-08 1/week @ 2024-03-15 4/week @ 2024-03-29 1/week @ 2024-05-17 76/week @ 2024-05-24 21/week @ 2024-05-31 7/week @ 2024-06-07 3/week @ 2024-06-14

58 downloads per month

GPL-3.0-or-later

66KB
2K SLoC

podsync

A HTTP server for syncing podcast app state, mirroring the gpodder API. Designed for use with AntennaPod's sync service.

Endpoints

podsync doesn't cover the full gpodder API, just enough to get AntennaPod to work:

  • auth:
    • POST api/2/auth/{username}/login.json
    • POST api/2/auth/{username}/logout.json
  • devices:
    • GET api/2/devices/{username}.json
    • POST api/2/devices/{username}/{device}.json
  • subscriptions:
    • GET api/2/subscriptions/{username}/{device}.json
    • POST api/2/subscriptions/{username}/{device}.json
  • episodes:
    • GET api/2/episodes/{username}.json
    • POST api/2/episodes/{username}.json

Logging

podsync uses the RUST_LOG environment variable for logging. To generate logs similar to a webserver:

export RUST_LOG=podsync=info

# or for debugging:
export RUST_LOG=podsync=trace

# for warp/endpoint output:
export RUST_LOG=podsync=info,warp=info

See the log crate for more details

Building

podsync uses sqlx in offline mode for builds (see build.rs for more).

To update the schema:

export DATABASE_URL=sqlite://pod.sql
cargo install sqlx-cli
cargo sqlx prepare -- --tests --features backend-sql
git commit -m 'Update sqlx snapshot' sqlx-data.json

Dependencies

~14–35MB
~550K SLoC