VLCMigrationViewController.m 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
  16. }
  17. return self;
  18. }
  19. - (void)viewDidLoad {
  20. [super viewDidLoad];
  21. [self.statusLabel setText:NSLocalizedString(@"UPGRADING_LIBRARY", "")];
  22. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
  23. NSLog(@"migrating coredata");
  24. [[MLMediaLibrary sharedMediaLibrary] migrateLibrary];
  25. dispatch_async(dispatch_get_main_queue(), ^{
  26. self.completionHandler();
  27. });
  28. });
  29. }
  30. @end