VLCMigrationViewController.m 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. /*****************************************************************************
  2. * VLCMigrationViewController.m
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2015 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Author: Carola Nitz <caro # videolan.org>
  9. *
  10. * Refer to the COPYING file of the official project for license.
  11. *****************************************************************************/
  12. #import "VLCMigrationViewController.h"
  13. @implementation VLCMigrationViewController
  14. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
  15. return self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  16. }
  17. - (void)viewDidLoad {
  18. [super viewDidLoad];
  19. [self.statusLabel setText:NSLocalizedString(@"UPGRADING_LIBRARY", "")];
  20. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
  21. APLog(@"migrating coredata");
  22. [[MLMediaLibrary sharedMediaLibrary] migrateLibrary];
  23. dispatch_async(dispatch_get_main_queue(), ^{
  24. self.completionHandler();
  25. });
  26. });
  27. }
  28. @end