Commit 73ceb365 authored by Felix Paul Kühne's avatar Felix Paul Kühne

AspenProject: implement a basic playlist view

parent eb3cfe3b
......@@ -95,7 +95,7 @@
}
}
[[MLMediaLibrary sharedMediaLibrary] addFilePaths:filePaths];
[_playlistViewController updateMediaDatabase];
[_playlistViewController updateViewContents];
}
@end
......@@ -14,6 +14,6 @@
@property (strong, nonatomic) VLCDetailViewController *detailViewController;
- (void)updateMediaDatabase;
- (void)updateViewContents;
@end
......@@ -49,7 +49,8 @@
self.navigationItem.rightBarButtonItem = self.editButtonItem;
[self updateMediaDatabase];
[self updateViewContents];
[[MLMediaLibrary sharedMediaLibrary] libraryDidAppear];
}
- (void)didReceiveMemoryWarning
......@@ -60,7 +61,7 @@
#pragma mark - Table View
- (void)updateMediaDatabase
- (void)updateViewContents
{
[[MLMediaLibrary sharedMediaLibrary] updateMediaDatabase];
......@@ -68,6 +69,8 @@
[_foundMedia release];
_foundMedia = [[NSMutableArray arrayWithArray:[MLFile allFiles]] retain];
[self.tableView reloadData];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
......@@ -77,6 +80,7 @@
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
NSLog(@"found %u media", _foundMedia.count);
return _foundMedia.count;
}
......@@ -96,6 +100,7 @@
MLFile *object = _foundMedia[indexPath.row];
cell.textLabel.text = object.title;
NSLog(@"returning cell with title %@", object.title);
return cell;
}
......@@ -145,4 +150,10 @@
}
}
#pragma mark - UI implementation
- (void)showAboutView:(id)sender
{
NSLog(@"asked to show the about view");
}
@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