Skip to content

Instantly share code, notes, and snippets.

@FiveBoroughs
FiveBoroughs / seerr-blocklist-deleted.py
Created September 9, 2026 22:27
Blocklist media deleted by Maintainerr so Plex watchlist sync stops re-requesting it (workaround for seerr-team/seerr#3222)
#!/usr/bin/env python3
"""Blocklist media deleted by Maintainerr so Plex watchlist sync stops re-requesting it.
Workaround for seerr-team/seerr#3222.
SEERR_URL=http://localhost:5055 SEERR_API_KEY=xxx ./seerr-blocklist-deleted.py [--force]
Prints only, without --force. Schedule between your deletions and the next watchlist
sync: 5 0,5,12 * * * suits Maintainerr's default sweep. Use */5 if you delete by hand.
"""
import json, os, sys, urllib.error, urllib.request
@FiveBoroughs
FiveBoroughs / reorder_xmltv_by_time.py
Created February 28, 2026 18:15
Test scripts for interleaved XMLTV index (Dispatcharr PR #938)
"""Re-order an existing XMLTV file so programmes are sorted by start time.
Uses a two-pass approach to avoid loading the full DOM into memory:
1. First pass: collect (start_time, byte_offset, length) for each programme
2. Sort by start_time
3. Second pass: seek to each offset and write in sorted order
Usage:
python reorder_xmltv_by_time.py input.xml output.xml
"""
@FiveBoroughs
FiveBoroughs / ffmpeg-smart-beta.sh
Last active January 29, 2026 16:01
ffmpeg-smart beta - multi-encoder support
#!/bin/bash
set -euo pipefail
LOG_PREFIX="[ffmpeg-smart]"
# Parse args
AGENT=""
URL=""
# Auto-detect default accel based on available hardware
detect_accel() {
@FiveBoroughs
FiveBoroughs / ffmpeg-smart.sh
Last active June 28, 2026 23:46
Smart HEVC/H.264/MPEG-2 Transcoding
#!/bin/bash
set -euo pipefail
LOG_PREFIX="[ffmpeg-smart]"
# Parse args
AGENT=""
URL=""
while [[ $# -gt 0 ]]; do
if [[ "$1" == "-user_agent" ]]; then