Sfoglia il codice sorgente

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

Zachary Kotlarek 13 anni fa
parent
commit
31638c1b72
2 ha cambiato i file con 8 aggiunte e 2 eliminazioni
  1. 7 1
      findTorrent.pl
  2. 1 1
      transmission.pl

+ 7 - 1
findTorrent.pl

@@ -8,6 +8,7 @@ my $NO_QUALITY_CHECKS   = 0;
 my $MORE_NUMBER_FORMATS = 0;
 my $MIN_DAYS_BACK       = 0;
 my $MAX_DAYS_BACK       = 3;
+my $NEXT_EPISODES       = 3;
 
 # Local config
 my $TV_DIR = `~/bin/video/mediaPath` . '/TV';
@@ -62,6 +63,9 @@ if ($ENV{'MIN_DAYS_BACK'}) {
 if ($ENV{'MAX_DAYS_BACK'}) {
 	$MAX_DAYS_BACK = $ENV{'MAX_DAYS_BACK'};
 }
+if ($ENV{'NEXT_EPISODES'}) {
+	$NEXT_EPISODES = $ENV{'NEXT_EPISODES'};
+}
 
 # New fetch object
 my $cookies = mktemp('/tmp/findTorrent.cookies.XXXXXXXX');
@@ -376,7 +380,9 @@ if (scalar(@urls) < 1) {
 
 	# Assume we need the next 2 episodes, unless no_next is set (i.e. season_done)
 	if (!$no_next) {
-		@need = ($highest + 1, $highest + 2);
+		for (my $i = 1; $i <= $NEXT_EPISODES; $i++) {
+			push(@need, $highest + $i);
+		}
 	}
 
 	# Find any missing episodes

+ 1 - 1
transmission.pl

@@ -33,7 +33,7 @@ my $host          = 'http://localhost:9091';
 my $url           = $host . '/transmission/rpc';
 my $content       = '{"method":"torrent-get","arguments":{"fields":["hashString","id","addedDate","comment","creator","dateCreated","isPrivate","name","totalSize","pieceCount","pieceSize","downloadedEver","error","errorString","eta","haveUnchecked","haveValid","leftUntilDone","metadataPercentComplete","peersConnected","peersGettingFromUs","peersSendingToUs","rateDownload","rateUpload","recheckProgress","sizeWhenDone","status","trackerStats","uploadedEver","uploadRatio","seedRatioLimit","seedRatioMode","downloadDir","files","fileStats"]}}';
 my $delContent    = '{"method":"torrent-remove","arguments":{"ids":["#_ID_#"], "delete-local-data":"true"}';
-my $delSleep      = 5;
+my $delSleep      = 10;
 my $RAR_MIN_FILES = 4;
 
 # Debug