Fixed bugs 1470668, and 1470669
parent
fb6b7b4ca5
commit
4fe8dfef13
|
@ -28,10 +28,10 @@
|
|||
<integer>3</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>21</integer>
|
||||
<integer>29</integer>
|
||||
<integer>513</integer>
|
||||
<integer>463</integer>
|
||||
<integer>21</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8I127</string>
|
||||
|
|
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
{
|
||||
NSLog(@"Releasing playlistEntry: %i", [playlistEntry retainCount]);
|
||||
[playlistEntry release];
|
||||
NSLog(@"Released playlistEntry: %i", [playlistEntry retainCount]);
|
||||
|
||||
[inputNode release];
|
||||
[converterNode release];
|
||||
|
|
Loading…
Reference in New Issue