Commit 007cbb83 authored by Felix Paul Kühne's avatar Felix Paul Kühne

plex/ftp/http: fix playback order

parent 91f9884a
......@@ -77,16 +77,16 @@
- (VLCMediaList *)mediaList
{
NSMutableArray *mediaArray = [NSMutableArray array];
VLCMediaList *mediaList = [[VLCMediaList alloc] init];
@synchronized(_items) {
NSUInteger count = _items.count;
for (NSUInteger i = 0; i < count; i++) {
for (NSInteger i = count - 1; i >= 0; i--) {
VLCMedia *media = [_items[i] media];
if (media)
[mediaArray addObject:media];
[mediaList addMedia:media];
}
}
return [[VLCMediaList alloc] initWithArray:mediaArray];
return mediaList;
}
#pragma mark - white raccoon delegation
......
......@@ -64,16 +64,16 @@
- (VLCMediaList *)mediaList
{
NSMutableArray *mediaArray = [NSMutableArray array];
VLCMediaList *mediaList = [[VLCMediaList alloc] init];
@synchronized(_items) {
NSUInteger count = _items.count;
for (NSUInteger i = 0; i < count; i++) {
for (NSInteger i = count - 1; i >= 0; i--) {
VLCMedia *media = [_items[i] media];
if (media)
[mediaArray addObject:media];
[mediaList addMedia:media];
}
}
return [[VLCMediaList alloc] initWithArray:mediaArray];
return mediaList;
}
@end
......
......@@ -122,14 +122,16 @@
- (VLCMediaList *)mediaList
{
NSMutableArray *mediaArray = [NSMutableArray array];
VLCMediaList *mediaList = [[VLCMediaList alloc] init];
@synchronized(_items) {
NSUInteger count = _items.count;
for (NSUInteger i = 0; i < count; i++) {
[mediaArray addObject:[_items[i] media]];
for (NSInteger i = count - 1; i >= 0; i--) {
VLCMedia *media = [_items[i] media];
if (media)
[mediaList addMedia:media];
}
}
return [[VLCMediaList alloc] initWithArray:mediaArray];
return mediaList;
}
- (NSString *)_urlAuth:(NSString *)url
......
......@@ -44,7 +44,6 @@ NSString *const VLCNetworkServerProtocolIdentifierSMB = @"smb";
login.protocolIdentifier = VLCNetworkServerProtocolIdentifierSMB;
return login;
}
@end
......
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