Przeglądaj źródła

Merge branch 'master' of github.com:profplump/UberZach-Video

Zachary Kotlarek 9 lat temu
rodzic
commit
9034e76c38
4 zmienionych plików z 17 dodań i 18 usunięć
  1. 0 1
      encode.pl
  2. 15 15
      folderFixup.sh
  3. 1 1
      mountMedia
  4. 1 1
      sync/syncUnwatched.sh

+ 0 - 1
encode.pl

@@ -64,7 +64,6 @@ if ($ENV{'MOBILE'}) {
 	$ENV{'WIDTH'}         = 1280;
 	$ENV{'WIDTH'}         = 1280;
 	$ENV{'AUDIO_BITRATE'} = 128;
 	$ENV{'AUDIO_BITRATE'} = 128;
 	$ENV{'STEREO_ONLY'}   = 1;
 	$ENV{'STEREO_ONLY'}   = 1;
-	$ENV{'ENCODER'}       = 'x264';
 }
 }
 
 
 # Allow overrides for audio languages
 # Allow overrides for audio languages

+ 15 - 15
folderFixup.sh

@@ -29,8 +29,22 @@ if [ ! -d "${TMPDIR}" ]; then
         fi
         fi
 fi
 fi
 
 
+# Bail if the media share isn't available
+if ! ~/bin/video/isMediaMounted; then
+	echo 'Media not mounted' 1>&2
+	exit 1
+fi
+
+# Bail if the load is high
+if ! ~/bin/video/checkLoad.sh; then
+	if [ -n "${DEBUG}" ] && [ $DEBUG -gt 0 ]; then
+		echo 'Load too high' 1>&2
+	fi
+	exit 0
+fi
+
 # Bail if we're already running
 # Bail if we're already running
-LOCK="${TMPDIR}/folderFixup.run"
+LOCK="${TMPDIR}/folderFixup.`basename "${inFolder}"`.run"
 touch "${LOCK}"
 touch "${LOCK}"
 read MOUNT_PID < "${LOCK}"
 read MOUNT_PID < "${LOCK}"
 if [ -n "${MOUNT_PID}" ]; then
 if [ -n "${MOUNT_PID}" ]; then
@@ -43,20 +57,6 @@ if [ -n "${MOUNT_PID}" ]; then
 fi
 fi
 echo $$ > "${LOCK}"
 echo $$ > "${LOCK}"
 
 
-# Bail if the load is high
-if ! ~/bin/video/checkLoad.sh; then
-	if [ -n "${DEBUG}" ] && [ $DEBUG -gt 0 ]; then
-		echo 'Load too high' 1>&2
-	fi
-	exit 0
-fi
-
-# Bail if the media share isn't available
-if ! ~/bin/video/isMediaMounted; then
-	echo 'Media not mounted' 1>&2
-	exit 1
-fi
-
 # Cache output
 # Cache output
 tmp="`mktemp -t 'folderFixup.XXXXXXXX'`"
 tmp="`mktemp -t 'folderFixup.XXXXXXXX'`"
 
 

+ 1 - 1
mountMedia

@@ -18,7 +18,7 @@ SHARE="media"
 LOCK="${TMPDIR}/mountMedia.mounting"
 LOCK="${TMPDIR}/mountMedia.mounting"
 REMOTE_USER="${USER}"
 REMOTE_USER="${USER}"
 LOCAL_MEDIA="/Users/Shared/Plex"
 LOCAL_MEDIA="/Users/Shared/Plex"
-MEDIA_CHECK_DIR="TV/John Plays FIFA"
+MEDIA_CHECK_DIR="TV/Rick and Morty"
 
 
 # Globals
 # Globals
 OFFLINE=0
 OFFLINE=0

+ 1 - 1
sync/syncUnwatched.sh

@@ -67,7 +67,7 @@ DEST_DIR="${BASE_DIR}/${DIR}"
 FILES="`~/bin/video/sync/recentlyUnwatched.sh "${1}"`"
 FILES="`~/bin/video/sync/recentlyUnwatched.sh "${1}"`"
 
 
 # Ensure the input is sane
 # Ensure the input is sane
-if [ `echo "${FILES}" | wc -l` -lt 5 ]; then
+if [ `echo "${FILES}" | wc -l` -lt 1 ]; then
 	echo -e "Invalid sync file list:\n${FILE}" 1>&2
 	echo -e "Invalid sync file list:\n${FILE}" 1>&2
 	exit -2
 	exit -2
 fi
 fi