npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

peertube-plugin-okas-dev

v1.0.34

Published

PeerTube plugin to add author data for videos.

Readme

PeerTube Plugin OKAS

Ein Plugin für PeerTube, das das Feld "Sendeverantwortung" (Verantwortlicher für die Sendung) und ein verstecktes Feld mit der Video-Nummer hinzufügt.

Funktionen

  • Sichtbares Feld "Sendeverantwortung": Wird auf der Video-Ansichtsseite angezeigt mit der Möglichkeit zur Gruppierung nach Autor
  • Verstecktes Feld "Video-Nummer": Nur über die API zugänglich
  • API für Datenabruf: Endpunkt zum Abrufen der Video-Nummer
  • Korrekte Gruppierung: Beim Klick auf den Autorennamen öffnet sich die Suche nach allen Videos dieses Autors

Installation

Automatische Installation (empfohlen)

  1. Melden Sie sich im PeerTube Admin-Panel an
  2. Gehen Sie zu "Plugins/Themes" → "Suchen"
  3. Suchen Sie nach "okas-dev" und klicken Sie auf "Installieren"

Manuelle Installation

  1. Repository klonen:
git clone https://github.com/yarkolife/peertube-plugin-ok.git
cd peertube-plugin-ok
  1. Build-Abhängigkeiten installieren:
npm install esbuild --save-dev
  1. Plugin erstellen:
npm run build
  1. In PeerTube installieren:
    • Gehen Sie zum Admin-Panel
    • "Plugins/Themes" → "Lokal"
    • Laden Sie das ZIP-Archiv des Plugins hoch

Verwendung

Hinzufügen von Daten zu Videos

Beim Hochladen oder Bearbeiten von Videos sehen Sie:

  • Auf dem Haupt-Tab: Feld "Sendeverantwortung" für den Namen des Autors
  • In den Plugin-Einstellungen: Feld "Video-Nummer" für die interne Nummer

Anzeige im Frontend

Auf der Video-Ansichtsseite wird angezeigt:

  • Feld "Sendeverantwortung" mit klickbarem Link zur Suche aller Videos des Autors
  • Die Video-Nummer wird NICHT angezeigt

API

Wichtig: Alle API-Endpunkte des Plugins verwenden den Präfix /router/ (Standard in PeerTube).

Video nach ID abrufen (UUID oder Nummer)

GET /plugins/okas-dev/router/videos/:id?channel=channelName

Beispiel-Anfrage:

# Nach Nummer (wenn id nicht UUID-Format hat)
curl -H "Accept: application/json" \
  "https://lokalmedial.de/plugins/okas-dev/router/videos/17911?channel=okmq"

# Nach UUID (wird an Standard-API weitergeleitet)
curl -H "Accept: application/json" \
  "https://lokalmedial.de/plugins/okas-dev/router/videos/d14a4d6e-9bff-4af7-804b-d37c75583873"

Antwort:

{
  "uuid": "d14a4d6e-9bff-4af7-804b-d37c75583873",
  "name": "Video-Titel",
  "url": "https://lokalmedial.de/videos/watch/d14a4d6e-9bff-4af7-804b-d37c75583873",
  "pluginData": {
    "videoNumber": "17911",
    "senderResponsible": "Max Mustermann"
  },
  ...
}

Video-Nummer abrufen

GET /plugins/okas-dev/router/video/:uuid/number

Beispiel-Anfrage:

curl -H "Accept: application/json" \
  "https://lokalmedial.de/plugins/okas-dev/router/video/d14a4d6e-9bff-4af7-804b-d37c75583873/number"

Antwort:

{
  "videoNumber": "17911"
}

Video nach Nummer abrufen

GET /plugins/okas-dev/router/videos/by-number/:number?channel=channelName

Beispiel-Anfrage:

# Suche in allen Videos
curl -H "Accept: application/json" \
  "https://lokalmedial.de/plugins/okas-dev/router/videos/by-number/17911"

# Suche in spezifischem Kanal (empfohlen für bessere Performance)
curl -H "Accept: application/json" \
  "https://lokalmedial.de/plugins/okas-dev/router/videos/by-number/17911?channel=okmq"

Antwort:

{
  "uuid": "d14a4d6e-9bff-4af7-804b-d37c75583873",
  "name": "Video-Titel",
  "url": "https://lokalmedial.de/videos/watch/d14a4d6e-9bff-4af7-804b-d37c75583873",
  "pluginData": {
    "videoNumber": "17911",
    "senderResponsible": "Max Mustermann"
  },
  ...
}

API-Fehler

  • 404: Video-Nummer nicht gefunden
  • 500: Interner Server-Fehler

Hinweis

In PeerTube werden alle Plugin-Routen automatisch mit dem Präfix /router/ versehen. Dies ist das Standard-Verhalten und kann nicht geändert werden. Der korrekte Pfad ist immer /plugins/{plugin-name}/router/{route}.

Anforderungen

  • PeerTube Version 5.2.0 oder höher
  • Node.js zum Erstellen (falls Installation aus Quellcode)

Lizenz

GNU Affero General Public License v3.0

Support

Bei Fragen oder Vorschlägen erstellen Sie bitte ein Issue in diesem Repository.


Entwicklung

Plugin-Struktur

  • main.js - Server-seitige Plugin-Logik
  • client/video-edit-client-plugin.js - Formular-Felder für Video-Upload/Bearbeitung
  • client/video-watch-client-plugin.js - Anzeige der Metadaten auf der Video-Seite
  • dist/ - Kompilierte Client-Skripte

Lokale Entwicklung

  1. Repository klonen
  2. npm install
  3. npm run build
  4. Plugin in PeerTube-Entwicklungsumgebung testen