Skip to content

charrus/mythcommflag

Repository files navigation

Mythcommflagwrapper

A Python wrapper for Comskip that integrates with MythTV's commercial flagging system. It identifies commercial segments in recordings and updates the MythTV database accordingly.

This project follows modern Python packaging practices and provides both CLI and programmatic interfaces.

The aim of this project is to offer a easy way to use Comskip. This needs to be built and installed first.

This is very much work in progress - which explains:

  • the lack of a proper releases
  • the lack of a CI/CD system

PyPI - Version PyPI - Python Version


Table of Contents

Installation

Native Python

poetry build

Ubuntu Packages

Simple

debuild -g
apt install ./python3-mythcommflagwrapper_0.1.1-1ubuntu4_amd64.deb

I have a lot of time

Or if you have pdebuild and pbuilder setup, your gpg keys as well as dput, mini-dinstall and /etc/apt/sources.list.d/mythcommflagwrapper.list pointing somewhere locally, it's a breeze:

pdebuild
dput ../python3-mythcommflagwrapper*changes
sudo apt update
sudo apt install -y python3-mythcommflagwrapper

Information seems to be rather scattered with best practices - so here are some pointers:

Usage

Use:

/usr/bin/mythcommflag-wrapper --jobid "%JOBID%"

as the Commercial Detection Command on the "General Backend Settings -> Job Queue (Global)" page in the MythTV Setup web (port 6544)

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/charrus/mythcommflag.git
cd mythcommflag

# Set up development environment using Poetry
poetry install

Running Tests

poetry run pytest

Code Style

This project uses ruff for linting and formatting. Run:

poetry run ruff check .
poetry run ruff format .

Type Checking

poetry run mypy src/

License

mythcommflagwrapper is distributed under the terms of the MIT license.

About

Project to try out poetry and debian packaging (it also skips commercials for MythTV)

Resources

License

Stars

Watchers

Forks