Commit 727303ba authored by Felix Paul Kühne's avatar Felix Paul Kühne

Library: also remove thumbnails when we detected that the media is gone

parent 5d6f5825
......@@ -649,6 +649,10 @@ static NSString *kLastTVDBUpdateServerTime = @"MLLastTVDBUpdateServerTime";
APLog(@"Marking - %@", [fileURL absoluteString]);
file.isSafe = YES; // It doesn't exists, it's safe.
NSString *thumbPath = [[[self thumbnailFolderPath] stringByAppendingPathComponent:[[file.objectID URIRepresentation] path]] stringByAppendingString:@".png"];
exists = [fileManager fileExistsAtPath:thumbPath];
if (exists)
[fileManager removeItemAtPath:thumbPath error:nil];
[[self managedObjectContext] deleteObject:file];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment