diff --git a/English.lproj/MainMenu.nib/info.nib b/English.lproj/MainMenu.nib/info.nib
index 511ecdc28..dedba872b 100644
--- a/English.lproj/MainMenu.nib/info.nib
+++ b/English.lproj/MainMenu.nib/info.nib
@@ -28,10 +28,10 @@
3
IBOpenObjects
+ 21
29
513
463
- 21
IBSystem Version
8I127
diff --git a/English.lproj/MainMenu.nib/keyedobjects.nib b/English.lproj/MainMenu.nib/keyedobjects.nib
index 65388a396..89b915e94 100644
Binary files a/English.lproj/MainMenu.nib/keyedobjects.nib and b/English.lproj/MainMenu.nib/keyedobjects.nib differ
diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m
index e4e1c10b2..113276f81 100644
--- a/Playlist/PlaylistController.m
+++ b/Playlist/PlaylistController.m
@@ -41,7 +41,7 @@
PlaylistEntry *pe = [[PlaylistEntry alloc] init];
[pe setFilename:filename]; //Setfilename takes car of opening the soundfile..cheap hack, but works for now
- [pe setIndex:(index+1)];
+ [pe setIndex:index];
[pe readTags];
[pe readInfo];
@@ -243,7 +243,7 @@
PlaylistEntry *p;
p = [[self content] objectAtIndex:j];
- [p setIndex:(j+1)];
+ [p setIndex:j];
}
}
@@ -296,7 +296,6 @@
- (PlaylistEntry *)entryAtIndex:(int)i
{
- i--;
if (i < 0)
{
if (repeat == YES)
@@ -427,7 +426,15 @@
}
else
{
- return [self entryAtIndex:[pe index] - 1];
+ //Fix for removing a track, then pressing prev with repeat turned on
+ if ([pe index] == -1)
+ {
+ return [self entryAtIndex:[pe index]];
+ }
+ else
+ {
+ return [self entryAtIndex:[pe index] - 1];
+ }
}
}
@@ -494,26 +501,25 @@
[self addShuffledListToFront];
- [shuffleList insertObject:currentEntry atIndex:0];
- [currentEntry setShuffleIndex:0];
-
- //Need to rejigger so the current entry is at the start now...
- int i;
- BOOL found = NO;
- for (i = 1; i < [shuffleList count]; i++)
+ if (currentEntry && [currentEntry index] != -1)
{
- if (found == NO && [[shuffleList objectAtIndex:i] filename] == [currentEntry filename])
+ [shuffleList insertObject:currentEntry atIndex:0];
+ [currentEntry setShuffleIndex:0];
+
+ //Need to rejigger so the current entry is at the start now...
+ int i;
+ BOOL found = NO;
+ for (i = 1; i < [shuffleList count]; i++)
{
- found = YES;
- [shuffleList removeObjectAtIndex:i];
- }
-// if (found = YES)
-// {
+ if (found == NO && [[shuffleList objectAtIndex:i] filename] == [currentEntry filename])
+ {
+ found = YES;
+ [shuffleList removeObjectAtIndex:i];
+ }
+
[[shuffleList objectAtIndex:i] setShuffleIndex:i];
-// NSLog(@"Shuffle Index: %i", i);
-// }
+ }
}
-// shuffleIndex = 0;
}
- (id)currentEntry
diff --git a/Playlist/PlaylistEntry.h b/Playlist/PlaylistEntry.h
index e7a13ece9..66d169ccf 100644
--- a/Playlist/PlaylistEntry.h
+++ b/Playlist/PlaylistEntry.h
@@ -33,6 +33,7 @@
int idx; //Can't use index due to some weird bug...might be fixed...should test in the future...think it was a conflict with flac, which is now an external lib
int shuffleIdx;
+ int displayIdx;
}
-(void)setIndex:(int)i;
diff --git a/Playlist/PlaylistEntry.m b/Playlist/PlaylistEntry.m
index 604134c8c..8eb632026 100644
--- a/Playlist/PlaylistEntry.m
+++ b/Playlist/PlaylistEntry.m
@@ -47,12 +47,24 @@
-(void)setIndex:(int)i
{
idx = i;
+ [self setDisplayIndex:i+1];
}
+
-(int)index
{
return idx;
}
+-(void)setDisplayIndex:(int)i
+{
+ displayIdx=i;
+}
+
+-(int)displayIndex
+{
+ return displayIdx;
+}
+
-(void)setFilename:(NSString *)f
{
f = [f copy];
diff --git a/Sound/BufferChain.m b/Sound/BufferChain.m
index 40f375d13..78b1885a4 100644
--- a/Sound/BufferChain.m
+++ b/Sound/BufferChain.m
@@ -65,7 +65,6 @@
{
NSLog(@"Releasing playlistEntry: %i", [playlistEntry retainCount]);
[playlistEntry release];
- NSLog(@"Released playlistEntry: %i", [playlistEntry retainCount]);
[inputNode release];
[converterNode release];