Skip to main content

"# Kryten Playlist

Kryten playlist management service - handles video queue and playlist operations for CyTube.

Features

  • Real-time playlist management
  • Video queue operations
  • Event-driven architecture using NATS
  • Playlist synchronization
  • Catalog Management: Ingest and enrich media catalogs with LLM-powered metadata

Installation

Prerequisites

  • Python 3.10 or higher
  • Poetry
  • NATS server running
  • kryten-py library

Setup

  1. Install dependencies:
poetry install
  1. Copy the example configuration:
cp config.example.json config.json
  1. Edit config.json with your settings:
{
  "nats_url": "nats://localhost:4222",
  "nats_subject_prefix": "kryten",
  "service_name": "playlist"
}

Usage

Running the Service

Using Poetry:

poetry run kryten-playlist --config config.json

Using the startup script (PowerShell):

.\start-playlist.ps1

Using the startup script (Bash):

./start-playlist.sh

Catalog Management

Kryten Playlist includes tools to manage and enrich your media catalog.

Ingest

Ingest catalog from a MediaCMS instance:

# Using config file (recommended)
poetry run kryten-ingest --config config.json

# Or with manual arguments
poetry run kryten-ingest --base-url https://mediacms.example.com --db data/catalog.db

Enrich

Enrich metadata using LLM (OpenAI, Anthropic, OpenRouter, etc.):

# Enrich all unenriched items (recommended)
poetry run kryten-enrich --config config.json

# Manual enrichment with specific model
export LLM_API_KEY="your-key-here"
poetry run kryten-enrich --model gpt-4o --limit 100 --verify

Options:

  • --verify: Enable 2-pass verification (double-checks facts with LLM)
  • --tv-only / --movies-only: Filter by type
  • --dry-run: Preview changes without saving
  • --force-all: Re-process items even if already enriched

Command Line Options

  • --config PATH: Path to configuration file (default: /etc/kryten/playlist/config.json)
  • --log-level LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR)

Event Handling

The service currently listens for:

  • queue: Video queue events
  • delete: Video deletion events
  • moveVideo: Video position changes
  • setTemp: Temporary video status changes

Development

Running Tests

poetry run pytest

Linting

poetry run ruff check .

Formatting

poetry run black .

License

MIT License - see LICENSE file for details "

Release files for kryten-playlist 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kryten-playlist 0.3.2
File Size Uploaded
kryten_playlist-0.3.2.tar.gz 76.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kryten-playlist 0.3.2
File Interpreter ABI Platform
kryten_playlist-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 175.0 kB

Release files / kryten_playlist-0.3.2.tar.gz

Download URL kryten_playlist-0.3.2.tar.gz
Size 76.7 kB
Tags Source
SHA-256 checksum
How to use checksums
11bb92ec5149f1268a4ee91a572f85889f19125f9585b18cb60a723337cdc951
BLAKE2b-256 checksum
How to use checksums
fa39c584d488a77adb621067f8cbfefeac752758202bafc1b90c54bad012aaad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.11 Windows/11

Release files / kryten_playlist-0.3.2-py3-none-any.whl

Download URL kryten_playlist-0.3.2-py3-none-any.whl
Size 98.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2272c3c3f28aa5eff11c9e5c329a4641f79a35d602d644d67c47b4563cd57ed
BLAKE2b-256 checksum
How to use checksums
a40eb9ab70f931c0addf9d71769a50b423edea886a3dfed4d82eaee7d3b23604
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.11 Windows/11

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page