瀏覽代碼

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

Zachary Kotlarek 12 年之前
父節點
當前提交
f57c69b75d
共有 2 個文件被更改,包括 18 次插入 和 9 次删除
  1. 5 4
      sync/syncUnwatched.sh
  2. 13 5
      transmission.pl

+ 5 - 4
sync/syncUnwatched.sh

@@ -2,7 +2,8 @@
 
 # Parameters
 TARGET="Heady"
-BASE_DIR="`~/bin/video/mediaPath`/${TARGET}"
+MEDIA_PATH="`~/bin/video/mediaPath`"
+BASE_DIR="${MEDIA_PATH}/${TARGET}"
 
 # Environmental parameters
 if [ "${DEBUG}" ]; then
@@ -67,10 +68,10 @@ fi
 # Figure out what we already have
 OLD_FILES="`find "${DEST_DIR}" -type f | sed "s%^${BASE_DIR}/%%"`"
 
-# Allow special files
-EXTRAS="`cat ~/.sync_extras`"
+# Always include special files
 IFS=$'\n'
-for i in $EXTRAS; do
+for i in `cat ~/.sync_extras`; do
+	~/bin/video/sync/sync.sh "${MEDIA_PATH}/${i}"*
 	OLD_FILES="`echo "${OLD_FILES}" | grep -v "^${i}"`"
 done
 

+ 13 - 5
transmission.pl

@@ -525,24 +525,32 @@ sub processFile($$) {
 		print STDERR 'Attempting to process file: ' . basename($file) . "\n";
 	}
 
-	# Guess a file extension
+	# Guess a file extension and basename
 	my $ext = &guessExt($file);
+	my $filename = basename($file);
 
 	# Delete WMV files -- mostly viruses
 	if ($ext =~ /wmv/i) {
-		print STDERR 'Declining to save WMV file: ' . basename($file) . "\n";
+		print STDERR 'Declining to save WMV file: ' . $filename . "\n";
 		return -1;
 	}
 
 	# Delete ZIP files -- mostly fake
 	if ($ext =~ /zip/i) {
-		print STDERR 'Declining to save ZIP file: ' . basename($file) . "\n";
+		print STDERR 'Declining to save ZIP file: ' . $filename . "\n";
 		return -1;
 	}
 
+	# Skip RARBG.com files with success code -- always extra but not a problem
+	if ($filename =~ /RARBG\.com/i) {
+		if ($DEBUG) {
+			print STDERR 'Declining to save RARBG.com file: ' . $filename . "\n";
+		}
+		return 1;
+	}
+
 	# Allow multiple guesses at the series/season/episode
-	my $dest     = '';
-	my $filename = basename($file);
+	my $dest = '';
 	LOOP: {
 
 		# Determine the series, season, and episode number