Skip to content

Instantly share code, notes, and snippets.

View SludgeVohaul's full-sized avatar

Sludge Vohaul SludgeVohaul

View GitHub Profile
@SludgeVohaul
SludgeVohaul / reindexcurl.py
Created September 20, 2017 20:48
Emby backdrop image reindexing issue
import pycurl
from io import BytesIO
embyBaseUrl = "http://192.168.1.123:8096"
embyToken = "5299d2d4aba847c9addff23e12cc0ed2"
embyUserId = "16059b2930fa40f4991f2a1ad0eaaf4c"
embyMovieId1 = "cae90c73d2f4564dcb41323f7a1df9c1"
primaryImageSourceUrl1 = 'http://192.168.1.63:32400/library/metadata/17068/thumb/1499287614'
backdropImageSourceUrl1 = 'http://192.168.1.63:32400/library/metadata/17068/art/1499287614'
@SludgeVohaul
SludgeVohaul / shortenmkv.sh
Created July 11, 2017 22:50
Find all MKV files below a source directory and create a 2s long snippet of each found file below a target directory while preserving the directory structure.
#!/bin/bash
set -e
set -u
# Cannot use /bin/sh due to process substitution in run().
VERSION="20170711"
FIND=/usr/bin/find
MKDIR=/bin/mkdir