Эх сурвалжийг харах

Avoid re-fetching when numbers mismatch and we are not renaming

Zachary Kotlarek 12 жил өмнө
parent
commit
e06c6ee76d
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      yt/subscribe.pl

+ 3 - 0
yt/subscribe.pl

@@ -184,6 +184,9 @@ foreach my $id (keys(%{$videos})) {
 			rename($files->{$id}->{'path'}, $basePath . $files->{$id}->{'suffix'});
 			rename($files->{$id}->{'path'}, $basePath . $files->{$id}->{'suffix'});
 			rename($files->{$id}->{'nfo'},  $nfo);
 			rename($files->{$id}->{'nfo'},  $nfo);
 		} else {
 		} else {
+			
+			# Find the old NFO to avoid re-fetching
+			$nfo = $files->{$id}->{'nfo'};
 
 
 			# Ignore small changes
 			# Ignore small changes
 			my $delta     = abs($files->{$id}->{'number'} - $videos->{$id}->{'number'});
 			my $delta     = abs($files->{$id}->{'number'} - $videos->{$id}->{'number'});