<commit_before>#!/bin/bash

HANDBRAKECLI=/usr/local/bin/HandBrakeCLI
LOG=/var/log/auto_handbrake.log
TARGETPATH=/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Movies

if [ $UID -ne 0 ]; then
	echo "Must run as root; exiting"
	exit;
fi

while [ 1 ]; do
	sleep 10 	# sleep need to be at beginning because of mid-loop escapes
	#DVDTITLE=`$HANDBRAKECLI -i /dev/cd0 --scan 2>&1 | egrep -o "DVD Title: .*" | sed "s/DVD Title: //"`
	DVDTITLE=`isoinfo -d -i /dev/cd0 | grep "Volume id" | cut -b "12-"`
	echo "DVD Title: $DVDTITLE"
	if [ -z $DVDTITLE ]; then
		# can't get the DVD title. Likely, there's nothing in the drive
		continue<commit_msg>Fixed an error with an unquoted path that had spaces<commit_after>#!/bin/bash

HANDBRAKECLI=/usr/local/bin/HandBrakeCLI
LOG=/var/log/auto_handbrake.log
TARGETPATH="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Movies"

if [ $UID -ne 0 ]; then
	echo "Must run as root; exiting"
	exit;
fi

while [ 1 ]; do
	sleep 10 	# sleep need to be at beginning because of mid-loop escapes
	#DVDTITLE=`$HANDBRAKECLI -i /dev/cd0 --scan 2>&1 | egrep -o "DVD Title: .*" | sed "s/DVD Title: //"`
	DVDTITLE=`isoinfo -d -i /dev/cd0 | grep "Volume id" | cut -b "12-"`
	echo "DVD Title: $DVDTITLE"
	if [ -z $DVDTITLE ]; then
		# can't get the DVD title. Likely, there's nothing in the drive
		continue
{'fraction_non_alphanumeric': 0.1391941391941392, 'fraction_numerical': 0.014652014652014652, 'mean_word_length': 3.6462585034013606, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '869265', 'n_tokens_mistral': 584, 'n_tokens_neox': 526, 'n_words': 162}