Commit 52e0eeb8 authored by Carola Nitz's avatar Carola Nitz

VLCNetworkServer*: fix order in medialists

parent 44f32f2a
......@@ -67,9 +67,8 @@
{
VLCMediaList *mediaList = [[VLCMediaList alloc] init];
@synchronized(_items) {
NSUInteger count = _items.count;
for (NSInteger i = count - 1; i >= 0; i--) {
VLCMedia *media = [_items[i] media];
for (id<VLCNetworkServerBrowserItem> browseritem in _items) {
VLCMedia *media = [browseritem media];
if (media)
[mediaList addMedia:media];
}
......
......@@ -125,10 +125,9 @@
{
NSMutableArray *mediaArray;
@synchronized(_items) {
NSUInteger count = _items.count;
mediaArray = [NSMutableArray arrayWithCapacity:count];
for (NSInteger i = count - 1; i >= 0; i--) {
VLCMedia *media = [_items[i] media];
mediaArray = [NSMutableArray new];
for (id<VLCNetworkServerBrowserItem> browseritem in _items) {
VLCMedia *media = [browseritem media];
if (media)
[mediaArray addObject:media];
}
......
......@@ -358,9 +358,8 @@
{
VLCMediaList *mediaList = [[VLCMediaList alloc] init];
@synchronized(_items) {
NSUInteger count = _items.count;
for (NSInteger i = count - 1; i >= 0; i--) {
VLCMedia *media = [_items[i] media];
for (id<VLCNetworkServerBrowserItem> browseritem in _items) {
VLCMedia *media = [browseritem media];
if (media)
[mediaList addMedia:media];
}
......
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