Skip to content

Instantly share code, notes, and snippets.

View ReenigneArcher's full-sized avatar

ReenigneArcher

View GitHub Profile
@ReenigneArcher
ReenigneArcher / Update_Plex_PreRolls.bat
Last active August 27, 2020 19:27
Batch script to update Plex Pre Rolls to include all videos in specified locations.
@Echo off
SetLocal EnableExtensions DisableDelayedExpansion
GoTo :BEGIN
=================================================================================================
Update_Plex_PreRolls.bat
Description: This script will include all video files in specified directories and update the
registry value for Plex.
Run by scheduled task. This needs to be executed by the user Plex Media Server is installed
for. Arguments should be path locations of directories that include your Pre Roll videos.
@ReenigneArcher
ReenigneArcher / ScanMedia.md
Last active December 12, 2020 19:01 — forked from Desani/ScanMedia.md
Added Hardware accelarated encoding switch and ability to specify repaired file extension

Hi /r/PleX,

I am sure like many of you, I have gathered a large number of media files over the years to add to my Plex collection. I have constantly been looking for a solution to find out if I had corrupted media in my library and I was never happy with just waiting till a user reported that a file could not be played properly.

I recently learned after looking into it again that ffmpeg.exe could be used to scan media and report back and errors while reading the file. I decided to whip up a powershell script that would supply ffmpeg all the video files in a directory and have it scan that file for errors. The script will log the output from ffmpeg, if there is any, and will record if a file has passed or failed a file scan. A history of the script output is saved to a log file and also each file scanned is added to a CSV file for easy sorting after a library has scanned.

There is a command line argument to have the script auto-repair the file, but if I remember correctly from reading online, ffmpeg can onl

@ReenigneArcher
ReenigneArcher / mark_guest_unwatched.py
Last active July 26, 2020 20:27 — forked from blacktwin/mark_guest_unwatched.py
Mark everything shared with guest account as unwatched.
# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8') #encoding incase item title has non ascii characters
from plexapi.server import PlexServer
from plexapi.server import CONFIG
import requests
# Edit these
@ReenigneArcher
ReenigneArcher / sync_playlists_to_users.py
Last active February 21, 2020 23:46 — forked from blacktwin/sync_playlists_to_users.py
Sync Plex playlists to shared users.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Sync Plex playlists to shared users.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests, xmltodict
import requests
import xmltodict