Commit 00cabafa authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

library: reverse media list creation order so it's the way the user would expect

parent 457e09e1
...@@ -430,7 +430,6 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria ...@@ -430,7 +430,6 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
[tableView deselectRowAtIndexPath:indexPath animated:YES]; [tableView deselectRowAtIndexPath:indexPath animated:YES];
NSManagedObject *selectedObject = _foundMedia[indexPath.row]; NSManagedObject *selectedObject = _foundMedia[indexPath.row];
if ([selectedObject isKindOfClass:[MLAlbumTrack class]]) { if ([selectedObject isKindOfClass:[MLAlbumTrack class]]) {
VLCMediaList *list; VLCMediaList *list;
NSArray *tracks = [[(MLAlbumTrack*)selectedObject album] sortedTracks]; NSArray *tracks = [[(MLAlbumTrack*)selectedObject album] sortedTracks];
...@@ -438,7 +437,7 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria ...@@ -438,7 +437,7 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
list = [[VLCMediaList alloc] init]; list = [[VLCMediaList alloc] init];
MLFile *file; MLFile *file;
for (NSUInteger x = 0; x < count; x++) { for (NSInteger x = count - 1; x > -1; x--) {
file = [(MLAlbumTrack*)tracks[x] files].anyObject; file = [(MLAlbumTrack*)tracks[x] files].anyObject;
[list addMedia:[VLCMedia mediaWithURL: [NSURL URLWithString:file.url]]]; [list addMedia:[VLCMedia mediaWithURL: [NSURL URLWithString:file.url]]];
} }
...@@ -530,7 +529,6 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria ...@@ -530,7 +529,6 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
} }
NSManagedObject *selectedObject = _foundMedia[indexPath.row]; NSManagedObject *selectedObject = _foundMedia[indexPath.row];
if ([selectedObject isKindOfClass:[MLAlbumTrack class]]) { if ([selectedObject isKindOfClass:[MLAlbumTrack class]]) {
VLCMediaList *list; VLCMediaList *list;
NSArray *tracks = [[(MLAlbumTrack*)selectedObject album] sortedTracks]; NSArray *tracks = [[(MLAlbumTrack*)selectedObject album] sortedTracks];
...@@ -538,7 +536,7 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria ...@@ -538,7 +536,7 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
list = [[VLCMediaList alloc] init]; list = [[VLCMediaList alloc] init];
MLFile *file; MLFile *file;
for (NSUInteger x = 0; x < count; x++) { for (NSInteger x = count - 1; x > -1; x--) {
file = [(MLAlbumTrack*)tracks[x] files].anyObject; file = [(MLAlbumTrack*)tracks[x] files].anyObject;
[list addMedia:[VLCMedia mediaWithURL: [NSURL URLWithString:file.url]]]; [list addMedia:[VLCMedia mediaWithURL: [NSURL URLWithString:file.url]]];
} }
......
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