Commit 51c1e554 authored by Gleb Pinigin's avatar Gleb Pinigin

Library view: use fast enumeration

parent 98010502
......@@ -220,27 +220,18 @@
if (_libraryMode == VLCLibraryModeAllAlbums) {
NSArray *rawAlbums = [MLAlbum allAlbums];
_foundMedia = [[NSMutableArray alloc] init];
NSUInteger count = rawAlbums.count;
MLAlbum *album;
for (NSUInteger x = 0; x < count; x++) {
album = rawAlbums[x];
for (MLAlbum *album in rawAlbums) {
if (album.name.length > 0 && album.tracks.count > 0)
[_foundMedia addObject:album];
}
rawAlbums = nil;
} else if (_libraryMode == VLCLibraryModeAllSeries) {
NSArray *rawShows = [MLShow allShows];
_foundMedia = [[NSMutableArray alloc] init];
NSUInteger count = rawShows.count;
MLShow *show;
for (NSUInteger x = 0; x < count; x++) {
show = rawShows[x];
for (MLShow *show in rawShows) {
if (show.name.length > 0 && show.episodes.count > 0)
[_foundMedia addObject:show];
}
rawShows = nil;
} else
_foundMedia = [NSMutableArray arrayWithArray:[MLFile allFiles]];
......
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