Bläddra i källkod

Only delete the NFO if it does not represent the video file we are keeping

Zachary Kotlarek 11 år sedan
förälder
incheckning
a25cf962f3
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3 1
      yt/subscribe.pl

+ 3 - 1
yt/subscribe.pl

@@ -508,7 +508,9 @@ sub findFiles() {
 
 
 					print STDERR 'Deleting duplicate: ' . $del->{'path'} . "\n";
 					print STDERR 'Deleting duplicate: ' . $del->{'path'} . "\n";
 					unlink($del->{'path'});
 					unlink($del->{'path'});
-					unlink($del->{'nfo'});
+					if ($del->{'nfo'} ne $tmp{'nfo'}) {
+						unlink($del->{'nfo'});
+					}
 				}
 				}
 			}
 			}
 			$files{$id} = \%tmp;
 			$files{$id} = \%tmp;