Commit 457e09e1 authored by Felix Paul Kühne's avatar Felix Paul Kühne

library: add media list creation for albums for the pad style form factor

parent 21ab40cf
......@@ -530,7 +530,21 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
}
NSManagedObject *selectedObject = _foundMedia[indexPath.row];
[self openMediaObject:selectedObject];
if ([selectedObject isKindOfClass:[MLAlbumTrack class]]) {
VLCMediaList *list;
NSArray *tracks = [[(MLAlbumTrack*)selectedObject album] sortedTracks];
NSUInteger count = tracks.count;
list = [[VLCMediaList alloc] init];
MLFile *file;
for (NSUInteger x = 0; x < count; x++) {
file = [(MLAlbumTrack*)tracks[x] files].anyObject;
[list addMedia:[VLCMedia mediaWithURL: [NSURL URLWithString:file.url]]];
}
[(VLCAppDelegate*)[UIApplication sharedApplication].delegate openMediaList:list atIndex:[tracks indexOfObject:selectedObject]];
} else
[self openMediaObject:selectedObject];
}
- (void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath
......
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