VLCPlaylistViewController.m 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. //
  2. // VLCMasterViewController.m
  3. // AspenProject
  4. //
  5. // Created by Felix Paul Kühne on 27.02.13.
  6. // Copyright (c) 2013 VideoLAN. All rights reserved.
  7. //
  8. // Refer to the COPYING file of the official project for license.
  9. //
  10. #import "VLCPlaylistViewController.h"
  11. #import "VLCMovieViewController.h"
  12. #import "VLCPlaylistTableViewCell.h"
  13. #import "VLCPlaylistGridView.h"
  14. #import "UINavigationController+Theme.h"
  15. #import "NSString+SupportedMedia.h"
  16. #import "VLCBugreporter.h"
  17. #import "VLCAppDelegate.h"
  18. #import "UIBarButtonItem+Theme.h"
  19. @implementation EmptyLibraryView
  20. @end
  21. @interface VLCPlaylistViewController () <AQGridViewDataSource, AQGridViewDelegate, UITableViewDataSource, UITableViewDelegate, MLMediaLibrary> {
  22. NSMutableArray *_foundMedia;
  23. NSUInteger _libraryMode;
  24. UIBarButtonItem *_menuButton;
  25. }
  26. @end
  27. @implementation VLCPlaylistViewController
  28. - (void)loadView {
  29. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
  30. _tableView = [[UITableView alloc] initWithFrame:[UIScreen mainScreen].bounds style:UITableViewStylePlain];
  31. _tableView.backgroundColor = [UIColor colorWithWhite:.122 alpha:1.];
  32. _tableView.delegate = self;
  33. _tableView.dataSource = self;
  34. self.view = _tableView;
  35. } else {
  36. _gridView = [[AQGridView alloc] initWithFrame:[UIScreen mainScreen].bounds];
  37. _gridView.delegate = self;
  38. _gridView.dataSource = self;
  39. _gridView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"libraryBackground"]];
  40. self.view = _gridView;
  41. }
  42. _libraryMode = kVLCLibraryModeAllFiles;
  43. self.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
  44. self.emptyLibraryView = [[[NSBundle mainBundle] loadNibNamed:@"VLCEmptyLibraryView" owner:self options:nil] lastObject];
  45. }
  46. #pragma mark -
  47. - (void)viewDidLoad
  48. {
  49. [super viewDidLoad];
  50. _menuButton = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(leftButtonAction:)];
  51. /* After day 354 of the year, the usual VLC cone is replaced by another cone
  52. * wearing a Father Xmas hat.
  53. * Note: this icon doesn't represent an endorsement of The Coca-Cola Company
  54. * and should not be confused with the idea of religious statements or propagation there off
  55. */
  56. NSCalendar *gregorian =
  57. [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
  58. NSUInteger dayOfYear = [gregorian ordinalityOfUnit:NSDayCalendarUnit inUnit:NSYearCalendarUnit forDate:[NSDate date]];
  59. if (dayOfYear >= 354)
  60. _menuButton.image = [UIImage imageNamed:@"vlc-xmas"];
  61. self.navigationItem.leftBarButtonItem = _menuButton;
  62. if (SYSTEM_RUNS_IN_THE_FUTURE)
  63. self.editButtonItem.tintColor = [UIColor whiteColor];
  64. else {
  65. [self.editButtonItem setBackgroundImage:[UIImage imageNamed:@"button"]
  66. forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
  67. [self.editButtonItem setBackgroundImage:[UIImage imageNamed:@"buttonHighlight"]
  68. forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];
  69. }
  70. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
  71. _gridView.separatorStyle = AQGridViewCellSeparatorStyleEmptySpace;
  72. _gridView.alwaysBounceVertical = YES;
  73. _gridView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
  74. } else {
  75. _tableView.rowHeight = [VLCPlaylistTableViewCell heightOfCell];
  76. _tableView.separatorColor = [UIColor colorWithWhite:.122 alpha:1.];
  77. }
  78. self.title = NSLocalizedString(@"LIBRARY_ALL_FILES", @"");
  79. _emptyLibraryView.emptyLibraryLabel.text = NSLocalizedString(@"EMPTY_LIBRARY", @"");
  80. _emptyLibraryView.emptyLibraryLongDescriptionLabel.lineBreakMode = UILineBreakModeWordWrap;
  81. _emptyLibraryView.emptyLibraryLongDescriptionLabel.numberOfLines = 0;
  82. _emptyLibraryView.emptyLibraryLongDescriptionLabel.text = NSLocalizedString(@"EMPTY_LIBRARY_LONG", @"");
  83. [_emptyLibraryView.emptyLibraryLongDescriptionLabel sizeToFit];
  84. }
  85. - (void)viewWillAppear:(BOOL)animated
  86. {
  87. [super viewWillAppear:animated];
  88. [self _displayEmptyLibraryViewIfNeeded];
  89. }
  90. - (void)viewDidAppear:(BOOL)animated
  91. {
  92. [super viewDidAppear:animated];
  93. if ([[MLMediaLibrary sharedMediaLibrary] libraryNeedsUpgrade]) {
  94. self.navigationItem.rightBarButtonItem = nil;
  95. self.navigationItem.leftBarButtonItem = nil;
  96. self.emptyLibraryView.emptyLibraryLabel.text = NSLocalizedString(@"UPGRADING_LIBRARY", @"");
  97. self.emptyLibraryView.emptyLibraryLongDescriptionLabel.hidden = YES;
  98. [self.emptyLibraryView.activityIndicator startAnimating];
  99. self.emptyLibraryView.frame = self.view.frame;
  100. self.title = @"";
  101. [self.view addSubview:self.emptyLibraryView];
  102. [[MLMediaLibrary sharedMediaLibrary] setDelegate: self];
  103. [[MLMediaLibrary sharedMediaLibrary] performSelectorInBackground:@selector(upgradeLibrary) withObject:nil];
  104. return;
  105. }
  106. if (_foundMedia.count < 1)
  107. [self performSelector:@selector(reloadContents) withObject:nil afterDelay:.0];
  108. [[MLMediaLibrary sharedMediaLibrary] performSelector:@selector(libraryDidAppear) withObject:nil afterDelay:1.];
  109. }
  110. - (void)viewDidDisappear:(BOOL)animated
  111. {
  112. [super viewDidDisappear:animated];
  113. [[MLMediaLibrary sharedMediaLibrary] libraryDidDisappear];
  114. }
  115. - (BOOL)canBecomeFirstResponder
  116. {
  117. return YES;
  118. }
  119. - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
  120. {
  121. if (motion == UIEventSubtypeMotionShake)
  122. [[VLCBugreporter sharedInstance] handleBugreportRequest];
  123. }
  124. - (void)removeMediaObject:(MLFile *)mediaObject
  125. {
  126. NSFileManager *fileManager = [NSFileManager defaultManager];
  127. NSString *folderLocation = [[[NSURL URLWithString:mediaObject.url] path] stringByDeletingLastPathComponent];
  128. NSArray *allfiles = [fileManager contentsOfDirectoryAtPath:folderLocation error:nil];
  129. NSString *fileName = [[[[NSURL URLWithString:mediaObject.url] path] lastPathComponent] stringByDeletingPathExtension];
  130. NSIndexSet *indexSet = [allfiles indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
  131. return ([obj rangeOfString:fileName].location != NSNotFound);
  132. }];
  133. unsigned int count = indexSet.count;
  134. NSString *additionalFilePath;
  135. NSUInteger currentIndex = [indexSet firstIndex];
  136. for (unsigned int x = 0; x < count; x++) {
  137. additionalFilePath = allfiles[currentIndex];
  138. if ([additionalFilePath isSupportedSubtitleFormat])
  139. [fileManager removeItemAtPath:[folderLocation stringByAppendingPathComponent:additionalFilePath] error:nil];
  140. currentIndex = [indexSet indexGreaterThanIndex:currentIndex];
  141. }
  142. [fileManager removeItemAtPath:[[NSURL URLWithString:mediaObject.url] path] error:nil];
  143. [[MLMediaLibrary sharedMediaLibrary] updateMediaDatabase];
  144. [self reloadContents];
  145. }
  146. - (void)_displayEmptyLibraryViewIfNeeded
  147. {
  148. if (_foundMedia.count > 0) {
  149. if (self.emptyLibraryView.superview)
  150. [self.emptyLibraryView removeFromSuperview];
  151. } else {
  152. self.emptyLibraryView.frame = self.view.frame;
  153. [self.view addSubview:self.emptyLibraryView];
  154. }
  155. if (_libraryMode == kVLCLibraryModeAllFiles && _foundMedia.count > 0)
  156. self.navigationItem.rightBarButtonItem = self.editButtonItem;
  157. else
  158. self.navigationItem.rightBarButtonItem = nil;
  159. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
  160. _tableView.separatorStyle = (_foundMedia.count > 0)? UITableViewCellSeparatorStyleSingleLine:
  161. UITableViewCellSeparatorStyleNone;
  162. }
  163. }
  164. - (void)libraryUpgradeComplete
  165. {
  166. self.emptyLibraryView.emptyLibraryLongDescriptionLabel.hidden = NO;
  167. self.emptyLibraryView.emptyLibraryLabel.text = NSLocalizedString(@"EMPTY_LIBRARY", @"");
  168. [self.emptyLibraryView.activityIndicator stopAnimating];
  169. self.title = NSLocalizedString(@"LIBRARY_ALL_FILES", @"");
  170. self.navigationItem.leftBarButtonItem = _menuButton;
  171. [self.emptyLibraryView removeFromSuperview];
  172. [self reloadContents];
  173. }
  174. - (void)reloadContents
  175. {
  176. if (_libraryMode == kVLCLibraryModeAllAlbums) {
  177. NSArray *rawAlbums = [MLAlbum allAlbums];
  178. _foundMedia = [[NSMutableArray alloc] init];
  179. NSUInteger count = rawAlbums.count;
  180. MLAlbum *album;
  181. for (NSUInteger x = 0; x < count; x++) {
  182. album = rawAlbums[x];
  183. if (album.name.length > 0 && album.tracks.count > 0)
  184. [_foundMedia addObject:album];
  185. }
  186. rawAlbums = nil;
  187. } else if (_libraryMode == kVLCLibraryModeAllSeries) {
  188. NSArray *rawShows = [MLShow allShows];
  189. _foundMedia = [[NSMutableArray alloc] init];
  190. NSUInteger count = rawShows.count;
  191. MLShow *show;
  192. for (NSUInteger x = 0; x < count; x++) {
  193. show = rawShows[x];
  194. if (show.name.length > 0 && show.episodes.count > 0)
  195. [_foundMedia addObject:show];
  196. }
  197. rawShows = nil;
  198. } else
  199. _foundMedia = [NSMutableArray arrayWithArray:[MLFile allFiles]];
  200. [self updateViewContents];
  201. }
  202. - (void)updateViewContents
  203. {
  204. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
  205. [self.tableView reloadData];
  206. else {
  207. [self.gridView reloadData];
  208. [self.gridView setNeedsLayout];
  209. }
  210. [self _displayEmptyLibraryViewIfNeeded];
  211. }
  212. #pragma mark - Table View
  213. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  214. {
  215. return 1;
  216. }
  217. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  218. {
  219. return _foundMedia.count;
  220. }
  221. // Customize the appearance of table view cells.
  222. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  223. {
  224. static NSString *CellIdentifier = @"PlaylistCell";
  225. VLCPlaylistTableViewCell *cell = (VLCPlaylistTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  226. if (cell == nil)
  227. cell = [VLCPlaylistTableViewCell cellWithReuseIdentifier:CellIdentifier];
  228. NSInteger row = indexPath.row;
  229. cell.mediaObject = _foundMedia[row];
  230. return cell;
  231. }
  232. - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
  233. {
  234. cell.backgroundColor = (indexPath.row % 2 == 0)? [UIColor blackColor]: [UIColor colorWithWhite:.122 alpha:1.];
  235. }
  236. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
  237. {
  238. return YES;
  239. }
  240. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
  241. {
  242. if (editingStyle == UITableViewCellEditingStyleDelete)
  243. [self removeMediaObject: _foundMedia[indexPath.row]];
  244. }
  245. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  246. {
  247. [tableView deselectRowAtIndexPath:indexPath animated:YES];
  248. NSManagedObject *currentObject = _foundMedia[indexPath.row];
  249. if ([currentObject isKindOfClass:[MLAlbum class]]) {
  250. _foundMedia = [NSMutableArray arrayWithArray:[[(MLAlbum *)currentObject tracks] allObjects]];
  251. self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedBackButtonWithTarget:self andSelector:@selector(backToAllItems:)];
  252. [self.navigationItem.leftBarButtonItem setTitle:NSLocalizedString(@"LIBRARY_MUSIC", @"")];
  253. self.title = [(MLAlbum*)currentObject name];
  254. [self updateViewContents];
  255. } else if ([currentObject isKindOfClass:[MLShow class]]) {
  256. _foundMedia = [NSMutableArray arrayWithArray:[[(MLShow *)currentObject episodes] allObjects]];
  257. self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedBackButtonWithTarget:self andSelector:@selector(backToAllItems:)];
  258. [self.navigationItem.leftBarButtonItem setTitle:NSLocalizedString(@"LIBRARY_SERIES", @"")];
  259. self.title = [(MLShow*)currentObject name];
  260. [self updateViewContents];
  261. } else {
  262. if (!self.movieViewController)
  263. self.movieViewController = [[VLCMovieViewController alloc] initWithNibName:nil bundle:nil];
  264. if ([currentObject isKindOfClass:[MLFile class]])
  265. self.movieViewController.mediaItem = (MLFile *)currentObject;
  266. else if ([currentObject isKindOfClass:[MLAlbumTrack class]])
  267. self.movieViewController.mediaItem = [(MLAlbumTrack*)currentObject files].anyObject;
  268. else if ([currentObject isKindOfClass:[MLShowEpisode class]])
  269. self.movieViewController.mediaItem = [(MLShowEpisode*)currentObject files].anyObject;
  270. [self.navigationController pushViewController:self.movieViewController animated:YES];
  271. }
  272. }
  273. #pragma mark - AQGridView
  274. - (NSUInteger)numberOfItemsInGridView:(AQGridView *)gridView
  275. {
  276. return _foundMedia.count;
  277. }
  278. - (AQGridViewCell *)gridView:(AQGridView *)gridView cellForItemAtIndex:(NSUInteger)index
  279. {
  280. static NSString *AQCellIdentifier = @"AQPlaylistCell";
  281. VLCPlaylistGridView *cell = (VLCPlaylistGridView *)[gridView dequeueReusableCellWithIdentifier:AQCellIdentifier];
  282. if (cell == nil) {
  283. cell = [[[NSBundle mainBundle] loadNibNamed:@"VLCPlaylistGridView" owner:self options:nil] lastObject];
  284. cell.selectionStyle = AQGridViewCellSelectionStyleNone;
  285. cell.gridView = gridView;
  286. }
  287. cell.mediaObject = _foundMedia[index];
  288. return cell;
  289. }
  290. - (CGSize)portraitGridCellSizeForGridView:(AQGridView *)gridView
  291. {
  292. return [VLCPlaylistGridView preferredSize];
  293. }
  294. - (void)gridView:(AQGridView *)gridView didSelectItemAtIndex:(NSUInteger)index
  295. {
  296. [self.gridView deselectItemAtIndex:index animated:YES];
  297. NSManagedObject *currentObject = _foundMedia[index];
  298. if ([currentObject isKindOfClass:[MLAlbum class]]) {
  299. _foundMedia = [NSMutableArray arrayWithArray:[[(MLAlbum *)currentObject tracks] allObjects]];
  300. self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedBackButtonWithTarget:self andSelector:@selector(backToAllItems:)];
  301. [self.navigationItem.leftBarButtonItem setTitle:NSLocalizedString(@"LIBRARY_MUSIC", @"")];
  302. self.title = [(MLAlbum*)currentObject name];
  303. [self updateViewContents];
  304. } else if ([currentObject isKindOfClass:[MLShow class]]) {
  305. _foundMedia = [NSMutableArray arrayWithArray:[[(MLShow *)currentObject episodes] allObjects]];
  306. self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedBackButtonWithTarget:self andSelector:@selector(backToAllItems:)];
  307. [self.navigationItem.leftBarButtonItem setTitle:NSLocalizedString(@"LIBRARY_SERIES", @"")];
  308. self.title = [(MLShow*)currentObject name];
  309. [self updateViewContents];
  310. } else {
  311. if (!self.movieViewController)
  312. self.movieViewController = [[VLCMovieViewController alloc] initWithNibName:nil bundle:nil];
  313. if ([currentObject isKindOfClass:[MLFile class]])
  314. self.movieViewController.mediaItem = (MLFile *)currentObject;
  315. else if ([currentObject isKindOfClass:[MLAlbumTrack class]])
  316. self.movieViewController.mediaItem = [(MLAlbumTrack*)currentObject files].anyObject;
  317. else if ([currentObject isKindOfClass:[MLShowEpisode class]])
  318. self.movieViewController.mediaItem = [(MLShowEpisode*)currentObject files].anyObject;
  319. [self.navigationController pushViewController:self.movieViewController animated:YES];
  320. }
  321. }
  322. - (void)gridView:(AQGridView *)aGridView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndex:(NSUInteger)index
  323. {
  324. if (editingStyle == UITableViewCellEditingStyleDelete)
  325. [self removeMediaObject: _foundMedia[index]];
  326. }
  327. #pragma mark - UI implementation
  328. - (void)setEditing:(BOOL)editing animated:(BOOL)animated
  329. {
  330. if (_libraryMode != kVLCLibraryModeAllFiles)
  331. return;
  332. [super setEditing:editing animated:animated];
  333. UIBarButtonItem *editButton = self.editButtonItem;
  334. NSString *editImage = editing? @"doneButton": @"button";
  335. NSString *editImageHighlight = editing? @"doneButtonHighlight": @"buttonHighlight";
  336. if (SYSTEM_RUNS_IN_THE_FUTURE)
  337. editButton.tintColor = [UIColor whiteColor];
  338. else {
  339. [editButton setBackgroundImage:[UIImage imageNamed:editImage] forState:UIControlStateNormal
  340. barMetrics:UIBarMetricsDefault];
  341. [editButton setBackgroundImage:[UIImage imageNamed:editImageHighlight]
  342. forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];
  343. [editButton setTitleTextAttributes: editing ? @{UITextAttributeTextShadowColor : [UIColor whiteColor], UITextAttributeTextColor : [UIColor blackColor]} : @{UITextAttributeTextShadowColor : [UIColor colorWithWhite:0. alpha:.37], UITextAttributeTextColor : [UIColor whiteColor]} forState:UIControlStateNormal];
  344. }
  345. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
  346. [self.gridView setEditing:editing];
  347. else
  348. [self.tableView setEditing:editing animated:YES];
  349. }
  350. - (IBAction)leftButtonAction:(id)sender
  351. {
  352. [[(VLCAppDelegate*)[UIApplication sharedApplication].delegate revealController] toggleSidebar:![(VLCAppDelegate*)[UIApplication sharedApplication].delegate revealController].sidebarShowing duration:kGHRevealSidebarDefaultAnimationDuration];
  353. }
  354. - (IBAction)backToAllItems:(id)sender
  355. {
  356. self.navigationItem.leftBarButtonItem = _menuButton;
  357. [self setLibraryMode:_libraryMode];
  358. }
  359. /* deprecated in iOS 6 */
  360. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
  361. {
  362. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
  363. return YES;
  364. return (_foundMedia.count > 0) || toInterfaceOrientation == UIInterfaceOrientationPortrait;
  365. }
  366. // RootController is responsible for supporting interface orientation(iOS6.0+), i.e. navigation controller
  367. // so this will not work as intended without "voodoo magic"(UINavigationController category, subclassing, etc)
  368. /* introduced in iOS 6 */
  369. - (NSUInteger)supportedInterfaceOrientations {
  370. if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
  371. return UIInterfaceOrientationMaskAll;
  372. return (_foundMedia.count > 0)? UIInterfaceOrientationMaskAllButUpsideDown:
  373. UIInterfaceOrientationMaskPortrait;
  374. }
  375. /* introduced in iOS 6 */
  376. - (BOOL)shouldAutorotate {
  377. return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) || (_foundMedia.count > 0);
  378. }
  379. #pragma mark - coin coin
  380. - (void)openMovieFromURL:(NSURL *)url
  381. {
  382. if (!self.movieViewController)
  383. self.movieViewController = [[VLCMovieViewController alloc] initWithNibName:nil bundle:nil];
  384. if (self.navigationController.topViewController != self.movieViewController)
  385. [self.navigationController pushViewController:self.movieViewController animated:YES];
  386. self.movieViewController.url = url;
  387. }
  388. - (void)setLibraryMode:(NSUInteger)mode
  389. {
  390. _libraryMode = mode;
  391. if (_libraryMode == kVLCLibraryModeAllAlbums)
  392. self.title = NSLocalizedString(@"LIBRARY_MUSIC", @"");
  393. else if( _libraryMode == kVLCLibraryModeAllSeries)
  394. self.title = NSLocalizedString(@"LIBRARY_SERIES", @"");
  395. else
  396. self.title = NSLocalizedString(@"LIBRARY_ALL_FILES", @"");
  397. [self reloadContents];
  398. }
  399. @end