Skip to main content

maintain an index of downloaded tvthek content

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tvthekidx-0.5.0.tar.gz (5.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tvthekidx-0.5.0-py3-none-any.whl (5.8 MB view details)

Uploaded Python 3

File details

Details for the file tvthekidx-0.5.0.tar.gz.

File metadata

  • Download URL: tvthekidx-0.5.0.tar.gz
  • Upload date:
  • Size: 5.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tvthekidx-0.5.0.tar.gz
Algorithm Hash digest
SHA256 6a0ce25d5595fdc59caef483cd610315cf8bad21dd7664eb968b1055692b26a5
MD5 7b460c993f59228197b90e4b9f493e55
BLAKE2b-256 8f3cd3fd1eddde09c8c6e6005c9a9c7e50e68d460ed3c0646272ca355218f257

See more details on using hashes here.

File details

Details for the file tvthekidx-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: tvthekidx-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tvthekidx-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52ec06661dd8b19df83ad3096a4135a415f943cba10edbc1e4159e64800f141f
MD5 66826bcff69d393bcb29f9113a39e5ad
BLAKE2b-256 acf7af3fddeb5e1df004433c1656acdf3ce8d2cdbb4d19ec50eacbb32e66631f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page