diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib
index 37ba27d32..a4b9f8c50 100644
--- a/English.lproj/MainMenu.xib
+++ b/English.lproj/MainMenu.xib
@@ -85,7 +85,7 @@
-
+
@@ -1165,6 +1165,12 @@ CA
+
@@ -1780,7 +1786,7 @@ Gw
-
+
YnBsaXN0MDDUAQIDBAUGRkdYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK8QDwcI
ExQZHh8qKyw0NzpAQ1UkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5T
diff --git a/Playlist/PlaylistController.h b/Playlist/PlaylistController.h
index e0945847f..75cfc2a35 100644
--- a/Playlist/PlaylistController.h
+++ b/Playlist/PlaylistController.h
@@ -78,6 +78,7 @@ typedef enum {
- (IBAction)randomizeList:(id)sender;
- (IBAction)removeDuplicates:(id)sender;
+- (IBAction)removeDeadItems:(id)sender;
- (IBAction)showEntryInFinder:(id)sender;
- (IBAction)clearFilterPredicate:(id)sender;
diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m
index 8da711604..b884eaf15 100644
--- a/Playlist/PlaylistController.m
+++ b/Playlist/PlaylistController.m
@@ -478,6 +478,23 @@
[originals release];
}
+- (IBAction)removeDeadItems:(id)sender {
+ NSMutableIndexSet *deadItems = [[NSMutableIndexSet alloc] init];
+
+ for (PlaylistEntry *pe in [self content])
+ {
+ NSURL *url = [pe URL];
+ if ([url isFileURL])
+ if (![[NSFileManager defaultManager] fileExistsAtPath:[url path]])
+ [deadItems addIndex:[pe index]];
+ }
+
+ if ([deadItems count] > 0)
+ [self removeObjectsAtArrangedObjectIndexes:deadItems];
+
+ [deadItems release];
+}
+
- (PlaylistEntry *)shuffledEntryAtIndex:(int)i
{
RepeatMode repeat = [self repeat];