Skip to main content

TVthe(k)Index

Generates an index of tvthek/mediathek downloaded content and queries TMDB for the meta data

TVthe(k)Index Logo

Example

TVthe(k)Index Sample

Usage (version 0.5.0)

Prerequisites

Register at TMDB and get an API key.

from binary (windows)

  1. download binaries from packages and rename to tvthekidx.exe

  2. create database

tvthekidx.exe -v maintenance -d tvthek.db -a createdb

  1. run the indexer

tvthekidx.exe -v index -k "APIKEY" -d tvthek.db -t movies -c "TVthek" -p x:\TVThek --recursive

(insert your TMDB API key instead of APIKEY)

  1. generate the html file

tvthekidx.exe export -d tvthek.db -c "TVthek" -f html --title "TVthek" --output tvthek.html

  1. if you add or remove content run steps 3 + 4 again

  2. occasionally run database maintenance

tvthekidx.exe -v maintenance -d tvthek.db -a compressdb

from binary (linux)

  1. download binaries from packages and rename to tvthekidx

  2. make tvthekidx executable

chmod +x tvthekidx

  1. create database

./tvthekidx -v maintenance -d tvthek.db -a createdb

  1. run the indexer

./tvthekidx -v index -k "APIKEY" -d tvthek.db -t movies -c "TVthek" -p /mnt/TVThek/ --recursive

(insert your TMDB API key instead of APIKEY)

  1. generate the html file

./tvthekidx export -d tvthek.db -c "TVthek" -f html --title "TVthek" --output tvthek.html

  1. if you add or remove content run steps 4 + 5 again

  2. occasionally run database maintenance

./tvthekidx -v maintenance -d tvthek.db -a compressdb

from python source

  1. download source code from releases

  2. install requirements

pip install -e .

  1. create database

tvthekidx -v maintenance -d tvthek.db -a createdb

  1. run the indexer

tvthekidx -v index -k "APIKEY" -d tvthek.db -t movies -c "TVthek" -p /mnt/TVThek/ --recursive

(insert your TMDB API key instead of APIKEY)

  1. generate the html file

tvthekidx export -d tvthek.db -c "TVthek" -f html --title "TVthek" --output tvthek.html

  1. if you add or remove content run steps 4 + 5 again

  2. occasionally run database maintenance

tvthekidx -v maintenance -d tvthek.db -a compressdb

Global arguments

  • -q, --quiet quiet (set verbose to 0)
  • -v, --verbose increase verbosity (stackable)

index arguments

  • -d, --database SQLite database file
  • -p, --path path to scan for video files
  • -k, --key TMDB API key
  • -t, --type content type (movies; tvshows not yet supported)
  • -c, --collection collection name
  • -r, --recursive scan subdirectories recursively

export arguments

  • -d, --database SQLite database file
  • -c, --collection comma-separated list of collections to include
  • -f, --format export format plugin (html, text); default html

HTML plugin arguments (passed after export)

  • --title page title
  • --output, -o output file (default tvthek.html)
  • --graphics image handling: embed (default, base64 inline), reference (external files), disable
  • --skip-actors omit the actors/crew section
  • --skip-header omit the top-rated and newest-additions header sections
  • --url hyperlink prefix for video file links (default ./)

maintenance arguments

  • -d, --database SQLite database file
  • -a, --action one of:
    • createdb — create a new database
    • upgradedb — run schema migrations on an existing database
    • compressdb — deduplicate movies and VACUUM
    • detecttvstations — run ML-based TV station detection on stored screenshots
    • cleartvstations — remove all TV station assignments
    • getscreenshots — capture/backfill screenshots for files (requires -p)
    • clearscreenshots — delete all stored screenshots
  • -p, --path path to video files (required for getscreenshots)
  • -c, --collection collection filter (optional for getscreenshots)

tags arguments

  • -d, --database SQLite database file
  • -a, --action one of: list, add, delete, export
  • -t, --tag tag name
  • -r, --regex regular expression pattern matched against filenames
  • --all delete all tags (use with --action delete)

What's new in 0.5.0

  • Export plugin system — export format is now selectable via --format; html and text plugins included
  • TV station detection — screenshots are analysed with a convolutional neural network (CNN) to identify the recording channel; logos are embedded in the HTML export
  • Tags — regex-based file tagging with the new tags subcommand
  • maintenance subcommand — replaces database; adds detecttvstations, cleartvstations, getscreenshots, clearscreenshots actions
  • --graphics export option — choose between embedded base64, external file references, or disabled images
  • HTML export performance — ~7× faster; bulk SQL queries replace per-movie/per-file round-trips; SQLite mmap and page-cache tuning cuts system time by ~190×
  • Database schema v8 — all binary attachments (posters, actor profiles, screenshots) unified in a single attachments table with a composite index on (ref_id, type)
  • CI pipeline upgraded to Debian trixie — build image updated to python:3-slim-trixie; test matrix updated to bookworm and trixie; win64 removed

Metadata

Release files for tvthekidx 0.5.0

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

Source distribution (sdist)

Source distribution for tvthekidx 0.5.0
File Size Uploaded
tvthekidx-0.5.0.tar.gz 5.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for tvthekidx 0.5.0
File Interpreter ABI Platform
tvthekidx-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 MB

Release files / tvthekidx-0.5.0.tar.gz

Download URL tvthekidx-0.5.0.tar.gz
Size 5.9 MB
Tags Source
SHA-256 checksum
How to use checksums
6a0ce25d5595fdc59caef483cd610315cf8bad21dd7664eb968b1055692b26a5
BLAKE2b-256 checksum
How to use checksums
8f3cd3fd1eddde09c8c6e6005c9a9c7e50e68d460ed3c0646272ca355218f257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / tvthekidx-0.5.0-py3-none-any.whl

Download URL tvthekidx-0.5.0-py3-none-any.whl
Size 5.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
52ec06661dd8b19df83ad3096a4135a415f943cba10edbc1e4159e64800f141f
BLAKE2b-256 checksum
How to use checksums
acf7af3fddeb5e1df004433c1656acdf3ce8d2cdbb4d19ec50eacbb32e66631f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.5.0 This release

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