GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - TeamPiped/sponsorblock-mirror: An implementation of a mirror SponsorBlock server in Rust.

BranchesTags
Open more actions menu

Latest commit

 

History

460 Commits
460 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
migrations
migrations
 
 
src
src
 
 
.dockerignore
.dockerignore
 
 
.env
.env
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
Dockerfile
Dockerfile
 
 
Dockerfile.ci
Dockerfile.ci
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Rocket.toml
Rocket.toml
 
 
diesel.toml
diesel.toml
 
 
docker-compose.yml
docker-compose.yml
 
 
renovate.json
renovate.json
 
 

Repository files navigation

sponsorblock-mirror

This is a Rust-based mirror of the SponsorBlock API.

It also uses sb-mirror for mirroring the CSV dumps via rsync.

Instances

  • sponsorblock.kavin.rocks - 🇩🇪 (main instance)
  • sponsorblock.gleesh.net - 🇩🇪
  • sponsorblock.2255.me - 🇵🇱
  • sponsorblock.hostux.net - 🇫🇷

Feel free to add your instance to this list by making a pull request.

You can also configure Piped-Backend to use your mirror by changing the SPONSORBLOCK_SERVERS configuration value.

Compatibility

This implementation does not implement the full SponsorBlock server API. It supports hash-based queries to /api/skipSegments/<hash>, with optional categories parameter, and queries to /api/skipSegments with required videoID and optional categories parameters.

The browser extension works with only the hash-based query endpoint, but other clients, such as the one in ReVanced, require the video ID endpoint, and additionally query /api/userInfo and /api/isUserVip. Right now there are stub implementations for these. ReVanced had not yet been verified as compatible.

Using with Docker Compose

To run the server under Docker Compose, run:

docker compose up

This starts the API server, a database, and a mirroring service to download the SponsorBlock data from the sponsorblock.kavin.rocks mirror and keep it up to date.

The API will be available on http://localhost:8000. For example, you can try http://localhost:8000/api/skipSegments/aabf or http://localhost:8000/api/skipSegments?videoID=eQ_8F4nzyiw. It will take a few minutes at least for the database to download and import, so these will not return data on the first run.

Building

To make a local release build, use cargo build --release. This will produce a binary in target/release/sponsorblock-mirror.

To make a Docker container, you need to do a BuildKit Docker build, not a normal Docker build. Make sure you have buildx available in your Docker, and run:

docker buildx build --load -t 1337kavin/sponsorblock-mirror .

Troubleshooting

  • If the linker complains about a missing -lpq, make sure you have the PostgreSQL development libraries, which may be in a libpq-dev package or your distribution's equivalent.

  • If Docker complains that the --mount option requires BuildKit, make sure you are building with docker buildx build and not docker build.

  • To access the PostgreSQL database directly, you can docker exec -ti postgres-sb-mirror bash -c 'psql $POSTGRES_DB $POSTGRES_USER'.

  • Requests for videos not in the database are forwarded to https://sponsor.ajay.app/, which may be down or malfunctioning. A response of the string Internal Server Error is likely to be from there, rather than from this application.

About

An implementation of a mirror SponsorBlock server in Rust.

sponsorblock.kavin.rocks

Topics

rustsponsorblock

Resources

Readme
AGPL-3.0 license
Activity
Custom properties

Stars

61 stars

Watchers

1 watching

Forks

11 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.