Parcourir la source

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

Zachary Kotlarek il y a 11 ans
Parent
commit
a25cf962f3
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      yt/subscribe.pl

+ 3 - 1
yt/subscribe.pl

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