Browse Source

Renaming for more clarity

Carola Nitz 7 years ago
parent
commit
2a2cbca259

+ 209 - 0
Sources/MediaCategoryViewController.swift

@@ -0,0 +1,209 @@
+/*****************************************************************************
+ * MediaCateogoryViewController.swift
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2018 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Authors: Carola Nitz <nitz.carola # gmail.com>
+ *          Mike JS. Choi <mkchoi212 # icloud.com>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
+
+import Foundation
+
+protocol VLCMediaCategoryViewControllerDelegate: class {
+    func mediaViewControllerDidSelectMediaObject(_ mediaViewController: UIViewController, mediaObject: NSManagedObject)
+}
+
+class VLCMediaCategoryViewController<T>: UICollectionViewController, UICollectionViewDelegateFlowLayout, UISearchResultsUpdating, UISearchControllerDelegate, IndicatorInfoProvider {
+    let cellPadding: CGFloat = 5.0
+    private var services: Services
+    private var searchController: UISearchController?
+    private let searchDataSource = VLCLibrarySearchDisplayDataSource()
+    var subcategory: VLCMediaSubcategoryModel<T>
+    weak var delegate: VLCMediaCategoryViewControllerDelegate?
+
+    @available(iOS 11.0, *)
+    lazy var dragAndDropManager: VLCDragAndDropManager = { () -> VLCDragAndDropManager<T> in
+        VLCDragAndDropManager<T>(subcategory: subcategory)
+
+    }()
+
+    lazy var emptyView: VLCEmptyLibraryView = {
+        let name = String(describing: VLCEmptyLibraryView.self)
+        let nib = Bundle.main.loadNibNamed(name, owner: self, options: nil)
+        guard let emptyView = nib?.first as? VLCEmptyLibraryView else { fatalError("Can't find nib for \(name)") }
+        return emptyView
+    }()
+
+    @available(*, unavailable)
+    init() {
+        fatalError()
+    }
+
+    init(services: Services, subcategory: VLCMediaSubcategoryModel<T>) {
+        self.services = services
+        self.subcategory = subcategory
+
+        super.init(collectionViewLayout: UICollectionViewFlowLayout())
+        NotificationCenter.default.addObserver(self, selector: #selector(themeDidChange), name: .VLCThemeDidChangeNotification, object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(reloadData), name: subcategory.changeNotificationName, object: nil)
+    }
+
+    override var preferredStatusBarStyle: UIStatusBarStyle {
+        return PresentationTheme.current.colors.statusBarStyle
+    }
+
+    @objc func reloadData() {
+        collectionView?.reloadData()
+        updateUIForContent()
+    }
+
+    @available(*, unavailable)
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder: ) has not been implemented")
+    }
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupCollectionView()
+        setupSearchController()
+        _ = (MLMediaLibrary.sharedMediaLibrary() as! MLMediaLibrary).libraryDidAppear()
+    }
+
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
+        let manager = services.rendererDiscovererManager
+        if manager.discoverers.isEmpty {
+            // Either didn't start or stopped before
+            manager.start()
+        }
+        manager.presentingViewController = self
+    }
+
+    @objc func themeDidChange() {
+        collectionView?.backgroundColor = PresentationTheme.current.colors.background
+        setNeedsStatusBarAppearanceUpdate()
+    }
+
+    func setupCollectionView() {
+        let playlistnib = UINib(nibName: "VLCPlaylistCollectionViewCell", bundle: nil)
+        collectionView?.register(playlistnib, forCellWithReuseIdentifier: VLCPlaylistCollectionViewCell.cellIdentifier())
+        collectionView?.backgroundColor = PresentationTheme.current.colors.background
+        collectionView?.alwaysBounceVertical = true
+        if #available(iOS 11.0, *) {
+            collectionView?.dragDelegate = dragAndDropManager
+            collectionView?.dropDelegate = dragAndDropManager
+        }
+    }
+
+    override func viewDidAppear(_ animated: Bool) {
+        super.viewDidAppear(animated)
+        reloadData()
+    }
+
+    func setupSearchController() {
+        searchController = UISearchController(searchResultsController: nil)
+        searchController?.searchResultsUpdater = self
+        searchController?.dimsBackgroundDuringPresentation = false
+        searchController?.delegate = self
+        if let textfield = searchController?.searchBar.value(forKey: "searchField") as? UITextField {
+            if let backgroundview = textfield.subviews.first {
+                backgroundview.backgroundColor = UIColor.white
+                backgroundview.layer.cornerRadius = 10
+                backgroundview.clipsToBounds = true
+            }
+        }
+    }
+    
+    func updateUIForContent() {
+        let isEmpty = collectionView?.numberOfItems(inSection: 0) == 0
+
+        if isEmpty {
+            collectionView?.setContentOffset(.zero, animated: false)
+        }
+        collectionView?.backgroundView = isEmpty ? emptyView : nil
+        
+        if #available(iOS 11.0, *) {
+            navigationItem.searchController = isEmpty ? nil : searchController
+        } else {
+            navigationItem.titleView = isEmpty ? nil : searchController?.searchBar
+        }
+    }
+
+    // MARK: Renderer
+
+    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
+        collectionView?.collectionViewLayout.invalidateLayout()
+    }
+
+    // MARK: - Search
+
+    func updateSearchResults(for searchController: UISearchController) {
+        searchDataSource.shouldReloadTable(forSearch: searchController.searchBar.text, searchableFiles: subcategory.files)
+        collectionView?.reloadData()
+    }
+
+    func didPresentSearchController(_ searchController: UISearchController) {
+        collectionView?.dataSource = searchDataSource
+    }
+
+    func didDismissSearchController(_ searchController: UISearchController) {
+        collectionView?.dataSource = self
+    }
+
+    func indicatorInfo(for pagerTabStripController: PagerTabStripViewController) -> IndicatorInfo {
+        return IndicatorInfo(title:subcategory.indicatorInfoName)
+    }
+
+    // MARK: - UICollectionViewDataSource
+    override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return subcategory.files.count
+    }
+
+    override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        if let playlistCell = collectionView.dequeueReusableCell(withReuseIdentifier: VLCPlaylistCollectionViewCell.cellIdentifier(), for: indexPath) as? VLCPlaylistCollectionViewCell {
+            if let mediaObject = subcategory.files[indexPath.row] as? NSManagedObject {
+                playlistCell.mediaObject = mediaObject
+            }
+            return playlistCell
+        }
+        return UICollectionViewCell()
+    }
+
+    // MARK: - UICollectionViewDelegate
+    override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        if let mediaObject = subcategory.files[indexPath.row] as? NSManagedObject {
+            delegate?.mediaViewControllerDidSelectMediaObject(self, mediaObject: mediaObject)
+        }
+    }
+
+    // MARK: - UICollectionViewDelegateFlowLayout
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+
+        let numberOfCells: CGFloat = collectionView.traitCollection.horizontalSizeClass == .regular ? 3.0 : 2.0
+        let aspectRatio: CGFloat = 10.0 / 16.0
+
+        // We have the number of cells and we always have numberofCells + 1 padding spaces. -pad-[Cell]-pad-[Cell]-pad-
+        // we then have the entire padding, we divide the entire padding by the number of Cells to know how much needs to be substracted from ech cell
+        // since this might be an uneven number we ceil
+        var cellWidth = collectionView.bounds.size.width / numberOfCells
+        cellWidth = cellWidth - ceil(((numberOfCells + 1) * cellPadding) / numberOfCells)
+
+        return CGSize(width: cellWidth, height: cellWidth * aspectRatio)
+    }
+
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: cellPadding, left: cellPadding, bottom: cellPadding, right: cellPadding)
+    }
+
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
+        return cellPadding
+    }
+
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
+        return cellPadding
+    }
+}

+ 11 - 11
Sources/MediaSubcategory/VLCMediaSubcategory.swift

@@ -30,10 +30,10 @@ enum VLCDataUnit {
     case label(MLLabel)
 }
 
-class VLCMediaSubcategory<T>: NSObject {
+class VLCMediaSubcategoryModel<T>: NSObject {
     var files: [T]
     var indicatorInfoName: String
-    var notificationName: Notification.Name
+    var changeNotificationName: Notification.Name
     var includesFunc: (VLCDataUnit) -> Bool
     var appendFunc: (VLCDataUnit) -> Void
 
@@ -48,14 +48,14 @@ class VLCMediaSubcategory<T>: NSObject {
          appendFunc: @escaping (VLCDataUnit) -> Void) {
         self.files = files
         self.indicatorInfoName = indicatorInfoName
-        self.notificationName = notificationName
+        self.changeNotificationName = notificationName
         self.includesFunc = includesFunc
         self.appendFunc = appendFunc
     }
 }
 
 struct VLCMediaSubcategories {
-    static var movies = VLCMediaSubcategory<MLFile>(
+    static var movies = VLCMediaSubcategoryModel<MLFile>(
         files: {
             (MLFile.allFiles() as! [MLFile]).filter {
             ($0 as MLFile).isKind(ofType: kMLFileTypeMovie) ||
@@ -75,7 +75,7 @@ struct VLCMediaSubcategories {
 
         })
 
-    static var episodes = VLCMediaSubcategory<MLShowEpisode>(
+    static var episodes = VLCMediaSubcategoryModel<MLShowEpisode>(
         files: MLShowEpisode.allEpisodes() as! [MLShowEpisode],
         indicatorInfoName: NSLocalizedString("EPISODES", comment: ""),
         notificationName: .VLCEpisodesDidChangeNotification,
@@ -89,7 +89,7 @@ struct VLCMediaSubcategories {
 
         })
 
-    static var artists = VLCMediaSubcategory<String>(
+    static var artists = VLCMediaSubcategoryModel<String>(
         files: {
             let tracksWithArtist = (MLAlbumTrack.allTracks() as! [MLAlbumTrack]).filter { $0.artist != nil && $0.artist != "" }
             return tracksWithArtist.map { $0.artist } as! [String]
@@ -106,7 +106,7 @@ struct VLCMediaSubcategories {
 
         })
 
-    static var albums = VLCMediaSubcategory<MLAlbum>(
+    static var albums = VLCMediaSubcategoryModel<MLAlbum>(
         files: MLAlbum.allAlbums() as! [MLAlbum],
         indicatorInfoName: NSLocalizedString("ALBUMS", comment: ""),
         notificationName: .VLCAlbumsDidChangeNotification,
@@ -120,7 +120,7 @@ struct VLCMediaSubcategories {
 
         })
 
-    static var tracks = VLCMediaSubcategory<MLFile>(
+    static var tracks = VLCMediaSubcategoryModel<MLFile>(
         files: (MLFile.allFiles() as! [MLFile]).filter { $0.isSupportedAudioFile()},
         indicatorInfoName: NSLocalizedString("SONGS", comment: ""),
         notificationName: .VLCTracksDidChangeNotification,
@@ -134,7 +134,7 @@ struct VLCMediaSubcategories {
 
         })
 
-    static var genres = VLCMediaSubcategory<String>(
+    static var genres = VLCMediaSubcategoryModel<String>(
         files: {
             let albumtracks = MLAlbumTrack.allTracks() as! [MLAlbumTrack]
             let tracksWithArtist = albumtracks.filter { $0.genre != nil && $0.genre != "" }
@@ -152,7 +152,7 @@ struct VLCMediaSubcategories {
 
         })
 
-    static var audioPlaylists = VLCMediaSubcategory<MLLabel>(
+    static var audioPlaylists = VLCMediaSubcategoryModel<MLLabel>(
         files: {
             let labels = MLLabel.allLabels() as! [MLLabel]
             let audioPlaylist = labels.filter {
@@ -185,7 +185,7 @@ struct VLCMediaSubcategories {
 
         })
 
-    static var videoPlaylists = VLCMediaSubcategory<MLLabel>(
+    static var videoPlaylists = VLCMediaSubcategoryModel<MLLabel>(
         files: {
             let labels = MLLabel.allLabels() as! [MLLabel]
             let audioPlaylist = labels.filter {

+ 0 - 109
Sources/MediaSubcategoryViewController.swift

@@ -1,109 +0,0 @@
-/*****************************************************************************
- * MediaSubcategoryViewController.swift
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2018 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Carola Nitz <caro # videolan.org>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
-
-import UIKit
-
-class VLCVideoSubcategoryViewController: VLCMediaSubcategoryViewController {
-    override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
-        let movies = VLCMediaViewController<MLFile>(services: services, subcategory: VLCMediaSubcategories.movies)
-        movies.delegate = mediaDelegate
-        let episodes = VLCMediaViewController<MLShowEpisode>(services: services, subcategory: VLCMediaSubcategories.episodes)
-        episodes.delegate = mediaDelegate
-        let playlists = VLCMediaViewController<MLLabel>(services: services, subcategory: VLCMediaSubcategories.videoPlaylists)
-        playlists.delegate = mediaDelegate
-        return [movies, episodes, playlists]
-    }
-}
-
-class VLCAudioSubcategoryViewController: VLCMediaSubcategoryViewController {
-    override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
-        let tracks = VLCMediaViewController<MLFile>(services: services, subcategory: VLCMediaSubcategories.tracks)
-        tracks.delegate = mediaDelegate
-        let genres = VLCMediaViewController<String>(services: services, subcategory: VLCMediaSubcategories.genres)
-        genres.delegate = mediaDelegate
-        let artists = VLCMediaViewController<String>(services: services, subcategory: VLCMediaSubcategories.artists)
-        artists.delegate = mediaDelegate
-        let albums = VLCMediaViewController<MLAlbum>(services: services, subcategory: VLCMediaSubcategories.albums)
-        albums.delegate = mediaDelegate
-        let playlists = VLCMediaViewController<MLLabel>(services: services, subcategory: VLCMediaSubcategories.audioPlaylists)
-        playlists.delegate = mediaDelegate
-        return [tracks, genres, artists, albums, playlists]
-    }
-}
-
-class VLCMediaSubcategoryViewController: BaseButtonBarPagerTabStripViewController<VLCLabelCell> {
-
-    var services: Services
-    weak var mediaDelegate: VLCMediaViewControllerDelegate?
-    private var rendererButton: UIButton
-
-    init(services: Services) {
-        self.services = services
-        rendererButton = services.rendererDiscovererManager.setupRendererButton()
-        super.init(nibName: nil, bundle: nil)
-    }
-
-    override func viewDidLoad() {
-
-        changeCurrentIndexProgressive = { (oldCell: VLCLabelCell?, newCell: VLCLabelCell?, progressPercentage: CGFloat, changeCurrentIndex: Bool, animated: Bool) in
-            guard changeCurrentIndex == true else { return }
-            oldCell?.iconLabel.textColor = PresentationTheme.current.colors.cellDetailTextColor
-            newCell?.iconLabel.textColor = PresentationTheme.current.colors.orangeUI
-        }
-        setupNavigationBar()
-        super.viewDidLoad()
-    }
-
-    private func setupNavigationBar() {
-        if #available(iOS 11.0, *) {
-            navigationController?.navigationBar.prefersLargeTitles = false
-        }
-        navigationItem.leftBarButtonItem = UIBarButtonItem(title: NSLocalizedString("SORT", comment: ""), style: .plain, target: self, action: #selector(sort))
-        navigationItem.rightBarButtonItem = UIBarButtonItem(customView: rendererButton)
-    }
-
-    @objc func sort() {
-        // This should be in a subclass
-        let sortOptionsAlertController = UIAlertController(title: NSLocalizedString("SORT_BY", comment: ""), message: nil, preferredStyle: .actionSheet)
-        let sortByNameAction = UIAlertAction(title: SortOption.alphabetically.localizedDescription, style: .default) { action in
-        }
-        let sortBySizeAction = UIAlertAction(title: SortOption.size.localizedDescription, style: .default) { action in
-        }
-        let sortbyDateAction = UIAlertAction(title: SortOption.insertonDate.localizedDescription, style: .default) { action in
-        }
-        let cancelAction = UIAlertAction(title: NSLocalizedString("CANCEL", comment: ""), style: .cancel, handler: nil)
-        sortOptionsAlertController.addAction(sortByNameAction)
-        sortOptionsAlertController.addAction(sortbyDateAction)
-        sortOptionsAlertController.addAction(sortBySizeAction)
-        sortOptionsAlertController.addAction(cancelAction)
-        sortOptionsAlertController.view.tintColor = UIColor.vlcOrangeTint()
-        present(sortOptionsAlertController, animated: true)
-    }
-
-    // MARK: - PagerTabStripDataSource
-
-    override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
-        fatalError("this should only be used as subclass")
-    }
-
-    override func configure(cell: VLCLabelCell, for indicatorInfo: IndicatorInfo) {
-        cell.iconLabel.text = indicatorInfo.title
-    }
-
-    override func updateIndicator(for viewController: PagerTabStripViewController, fromIndex: Int, toIndex: Int, withProgressPercentage progressPercentage: CGFloat, indexWasChanged: Bool) {
-        super.updateIndicator(for: viewController, fromIndex: fromIndex, toIndex: toIndex, withProgressPercentage: progressPercentage, indexWasChanged: indexWasChanged)
-    }
-    
-    override var preferredStatusBarStyle: UIStatusBarStyle {
-        return PresentationTheme.current.colors.statusBarStyle
-    }
-}

+ 67 - 167
Sources/MediaViewController.swift

@@ -5,205 +5,105 @@
  * Copyright (c) 2018 VideoLAN. All rights reserved.
  * $Id$
  *
- * Authors: Carola Nitz <nitz.carola # gmail.com>
- *          Mike JS. Choi <mkchoi212 # icloud.com>
+ * Authors: Carola Nitz <caro # videolan.org>
  *
  * Refer to the COPYING file of the official project for license.
  *****************************************************************************/
 
-import Foundation
+import UIKit
 
-protocol VLCMediaViewControllerDelegate: class {
-    func mediaViewControllerDidSelectMediaObject(_ mediaViewController: UIViewController, mediaObject: NSManagedObject)
-}
-
-class VLCMediaViewController<T>: UICollectionViewController, UICollectionViewDelegateFlowLayout, UISearchResultsUpdating, UISearchControllerDelegate, IndicatorInfoProvider {
-    let cellPadding: CGFloat = 5.0
-    private var services: Services
-    private var searchController: UISearchController?
-    private let searchDataSource = VLCLibrarySearchDisplayDataSource()
-    var subcategory: VLCMediaSubcategory<T>
-    weak var delegate: VLCMediaViewControllerDelegate?
-
-    @available(iOS 11.0, *)
-    lazy var dragAndDropManager: VLCDragAndDropManager = { () -> VLCDragAndDropManager<T> in
-        VLCDragAndDropManager<T>(subcategory: subcategory)
-
-    }()
-
-    lazy var emptyView: VLCEmptyLibraryView = {
-        let name = String(describing: VLCEmptyLibraryView.self)
-        let nib = Bundle.main.loadNibNamed(name, owner: self, options: nil)
-        guard let emptyView = nib?.first as? VLCEmptyLibraryView else { fatalError("Can't find nib for \(name)") }
-        return emptyView
-    }()
-
-    @available(*, unavailable)
-    init() {
-        fatalError()
+class VLCVideoViewController: VLCMediaViewController {
+    override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
+        let movies = VLCMediaCategoryViewController<MLFile>(services: services, subcategory: VLCMediaSubcategories.movies)
+        movies.delegate = mediaDelegate
+        let episodes = VLCMediaCategoryViewController<MLShowEpisode>(services: services, subcategory: VLCMediaSubcategories.episodes)
+        episodes.delegate = mediaDelegate
+        let playlists = VLCMediaCategoryViewController<MLLabel>(services: services, subcategory: VLCMediaSubcategories.videoPlaylists)
+        playlists.delegate = mediaDelegate
+        return [movies, episodes, playlists]
     }
+}
 
-    init(services: Services, subcategory: VLCMediaSubcategory<T>) {
-        self.services = services
-        self.subcategory = subcategory
-
-        super.init(collectionViewLayout: UICollectionViewFlowLayout())
-        NotificationCenter.default.addObserver(self, selector: #selector(themeDidChange), name: .VLCThemeDidChangeNotification, object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(reloadData), name: subcategory.notificationName, object: nil)
+class VLCAudioViewController: VLCMediaViewController {
+    override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
+        let tracks = VLCMediaCategoryViewController<MLFile>(services: services, subcategory: VLCMediaSubcategories.tracks)
+        tracks.delegate = mediaDelegate
+        let genres = VLCMediaCategoryViewController<String>(services: services, subcategory: VLCMediaSubcategories.genres)
+        genres.delegate = mediaDelegate
+        let artists = VLCMediaCategoryViewController<String>(services: services, subcategory: VLCMediaSubcategories.artists)
+        artists.delegate = mediaDelegate
+        let albums = VLCMediaCategoryViewController<MLAlbum>(services: services, subcategory: VLCMediaSubcategories.albums)
+        albums.delegate = mediaDelegate
+        let playlists = VLCMediaCategoryViewController<MLLabel>(services: services, subcategory: VLCMediaSubcategories.audioPlaylists)
+        playlists.delegate = mediaDelegate
+        return [tracks, genres, artists, albums, playlists]
     }
+}
 
-    override var preferredStatusBarStyle: UIStatusBarStyle {
-        return PresentationTheme.current.colors.statusBarStyle
-    }
+class VLCMediaViewController: VLCPagingViewController<VLCLabelCell> {
 
-    @objc func reloadData() {
-        collectionView?.reloadData()
-        updateUIForContent()
-    }
+    var services: Services
+    weak var mediaDelegate: VLCMediaCategoryViewControllerDelegate?
+    private var rendererButton: UIButton
 
-    @available(*, unavailable)
-    required init?(coder aDecoder: NSCoder) {
-        fatalError("init(coder: ) has not been implemented")
+    init(services: Services) {
+        self.services = services
+        rendererButton = services.rendererDiscovererManager.setupRendererButton()
+        super.init(nibName: nil, bundle: nil)
     }
 
     override func viewDidLoad() {
-        super.viewDidLoad()
-        setupCollectionView()
-        setupSearchController()
-        _ = (MLMediaLibrary.sharedMediaLibrary() as! MLMediaLibrary).libraryDidAppear()
-    }
 
-    override func viewWillAppear(_ animated: Bool) {
-        super.viewWillAppear(animated)
-        let manager = services.rendererDiscovererManager
-        if manager.discoverers.isEmpty {
-            // Either didn't start or stopped before
-            manager.start()
+        changeCurrentIndexProgressive = { (oldCell: VLCLabelCell?, newCell: VLCLabelCell?, progressPercentage: CGFloat, changeCurrentIndex: Bool, animated: Bool) in
+            guard changeCurrentIndex == true else { return }
+            oldCell?.iconLabel.textColor = PresentationTheme.current.colors.cellDetailTextColor
+            newCell?.iconLabel.textColor = PresentationTheme.current.colors.orangeUI
         }
-        manager.presentingViewController = self
-    }
-
-    @objc func themeDidChange() {
-        collectionView?.backgroundColor = PresentationTheme.current.colors.background
-        setNeedsStatusBarAppearanceUpdate()
+        setupNavigationBar()
+        super.viewDidLoad()
     }
 
-    func setupCollectionView() {
-        let playlistnib = UINib(nibName: "VLCPlaylistCollectionViewCell", bundle: nil)
-        collectionView?.register(playlistnib, forCellWithReuseIdentifier: VLCPlaylistCollectionViewCell.cellIdentifier())
-        collectionView?.backgroundColor = PresentationTheme.current.colors.background
-        collectionView?.alwaysBounceVertical = true
+    private func setupNavigationBar() {
         if #available(iOS 11.0, *) {
-            collectionView?.dragDelegate = dragAndDropManager
-            collectionView?.dropDelegate = dragAndDropManager
+            navigationController?.navigationBar.prefersLargeTitles = false
         }
+        navigationItem.leftBarButtonItem = UIBarButtonItem(title: NSLocalizedString("SORT", comment: ""), style: .plain, target: self, action: #selector(sort))
+        navigationItem.rightBarButtonItem = UIBarButtonItem(customView: rendererButton)
     }
 
-    override func viewDidAppear(_ animated: Bool) {
-        super.viewDidAppear(animated)
-        reloadData()
-    }
-
-    func setupSearchController() {
-        searchController = UISearchController(searchResultsController: nil)
-        searchController?.searchResultsUpdater = self
-        searchController?.dimsBackgroundDuringPresentation = false
-        searchController?.delegate = self
-        if let textfield = searchController?.searchBar.value(forKey: "searchField") as? UITextField {
-            if let backgroundview = textfield.subviews.first {
-                backgroundview.backgroundColor = UIColor.white
-                backgroundview.layer.cornerRadius = 10
-                backgroundview.clipsToBounds = true
-            }
-        }
-    }
-    
-    func updateUIForContent() {
-        let isEmpty = collectionView?.numberOfItems(inSection: 0) == 0
-
-        if isEmpty {
-            collectionView?.setContentOffset(.zero, animated: false)
+    @objc func sort() {
+        // This should be in a subclass
+        let sortOptionsAlertController = UIAlertController(title: NSLocalizedString("SORT_BY", comment: ""), message: nil, preferredStyle: .actionSheet)
+        let sortByNameAction = UIAlertAction(title: SortOption.alphabetically.localizedDescription, style: .default) { action in
         }
-        collectionView?.backgroundView = isEmpty ? emptyView : nil
-        
-        if #available(iOS 11.0, *) {
-            navigationItem.searchController = isEmpty ? nil : searchController
-        } else {
-            navigationItem.titleView = isEmpty ? nil : searchController?.searchBar
-        }
-    }
-
-    // MARK: Renderer
-
-    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
-        collectionView?.collectionViewLayout.invalidateLayout()
-    }
-
-    // MARK: - Search
-
-    func updateSearchResults(for searchController: UISearchController) {
-        searchDataSource.shouldReloadTable(forSearch: searchController.searchBar.text, searchableFiles: subcategory.files)
-        collectionView?.reloadData()
-    }
-
-    func didPresentSearchController(_ searchController: UISearchController) {
-        collectionView?.dataSource = searchDataSource
-    }
-
-    func didDismissSearchController(_ searchController: UISearchController) {
-        collectionView?.dataSource = self
-    }
-
-    func indicatorInfo(for pagerTabStripController: PagerTabStripViewController) -> IndicatorInfo {
-        return IndicatorInfo(title:subcategory.indicatorInfoName)
-    }
-
-    // MARK: - UICollectionViewDataSource
-    override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        return subcategory.files.count
-    }
-
-    override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
-        if let playlistCell = collectionView.dequeueReusableCell(withReuseIdentifier: VLCPlaylistCollectionViewCell.cellIdentifier(), for: indexPath) as? VLCPlaylistCollectionViewCell {
-            if let mediaObject = subcategory.files[indexPath.row] as? NSManagedObject {
-                playlistCell.mediaObject = mediaObject
-            }
-            return playlistCell
+        let sortBySizeAction = UIAlertAction(title: SortOption.size.localizedDescription, style: .default) { action in
         }
-        return UICollectionViewCell()
-    }
-
-    // MARK: - UICollectionViewDelegate
-    override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-        if let mediaObject = subcategory.files[indexPath.row] as? NSManagedObject {
-            delegate?.mediaViewControllerDidSelectMediaObject(self, mediaObject: mediaObject)
+        let sortbyDateAction = UIAlertAction(title: SortOption.insertonDate.localizedDescription, style: .default) { action in
         }
+        let cancelAction = UIAlertAction(title: NSLocalizedString("CANCEL", comment: ""), style: .cancel, handler: nil)
+        sortOptionsAlertController.addAction(sortByNameAction)
+        sortOptionsAlertController.addAction(sortbyDateAction)
+        sortOptionsAlertController.addAction(sortBySizeAction)
+        sortOptionsAlertController.addAction(cancelAction)
+        sortOptionsAlertController.view.tintColor = UIColor.vlcOrangeTint()
+        present(sortOptionsAlertController, animated: true)
     }
 
-    // MARK: - UICollectionViewDelegateFlowLayout
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+    // MARK: - PagerTabStripDataSource
 
-        let numberOfCells: CGFloat = collectionView.traitCollection.horizontalSizeClass == .regular ? 3.0 : 2.0
-        let aspectRatio: CGFloat = 10.0 / 16.0
-
-        // We have the number of cells and we always have numberofCells + 1 padding spaces. -pad-[Cell]-pad-[Cell]-pad-
-        // we then have the entire padding, we divide the entire padding by the number of Cells to know how much needs to be substracted from ech cell
-        // since this might be an uneven number we ceil
-        var cellWidth = collectionView.bounds.size.width / numberOfCells
-        cellWidth = cellWidth - ceil(((numberOfCells + 1) * cellPadding) / numberOfCells)
-
-        return CGSize(width: cellWidth, height: cellWidth * aspectRatio)
+    override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
+        fatalError("this should only be used as subclass")
     }
 
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
-        return UIEdgeInsets(top: cellPadding, left: cellPadding, bottom: cellPadding, right: cellPadding)
+    override func configure(cell: VLCLabelCell, for indicatorInfo: IndicatorInfo) {
+        cell.iconLabel.text = indicatorInfo.title
     }
 
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
-        return cellPadding
+    override func updateIndicator(for viewController: PagerTabStripViewController, fromIndex: Int, toIndex: Int, withProgressPercentage progressPercentage: CGFloat, indexWasChanged: Bool) {
+        super.updateIndicator(for: viewController, fromIndex: fromIndex, toIndex: toIndex, withProgressPercentage: progressPercentage, indexWasChanged: indexWasChanged)
     }
-
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
-        return cellPadding
+    
+    override var preferredStatusBarStyle: UIStatusBarStyle {
+        return PresentationTheme.current.colors.statusBarStyle
     }
 }

+ 2 - 2
Sources/VLCDragAndDropManager.swift

@@ -36,7 +36,7 @@ protocol VLCDragAndDropManagerDelegate: NSObjectProtocol {
 class VLCDragAndDropManager<T>: NSObject, UICollectionViewDragDelegate, UITableViewDragDelegate, UICollectionViewDropDelegate, UITableViewDropDelegate, UIDropInteractionDelegate {
 
     let utiTypeIdentifiers: [String] = VLCDragAndDropManager.supportedTypeIdentifiers()
-    var subcategory: VLCMediaSubcategory<T>
+    var subcategory: VLCMediaSubcategoryModel<T>
     /// Returns the supported type identifiers that VLC can process.
     /// It fetches the identifiers in LSItemContentTypes from all the CFBundleDocumentTypes in the info.plist.
     /// Video, Audio and Subtitle formats
@@ -59,7 +59,7 @@ class VLCDragAndDropManager<T>: NSObject, UICollectionViewDragDelegate, UITableV
         fatalError()
     }
 
-    init(subcategory: VLCMediaSubcategory<T>) {
+    init(subcategory: VLCMediaSubcategoryModel<T>) {
         self.subcategory = subcategory
         super.init()
     }

+ 1 - 1
Sources/VLCMediaSubcategory+VLCDragAndDrop.swift

@@ -13,7 +13,7 @@
 import Foundation
 
 @available(iOS 11.0, *)
-extension VLCMediaSubcategory: VLCDragAndDropManagerDelegate {
+extension VLCMediaSubcategoryModel: VLCDragAndDropManagerDelegate {
 
     func dragAndDropManagerRequestsFile(manager: NSObject, atIndexPath indexPath: IndexPath) -> Any? {
         return files[indexPath.row]

+ 1 - 1
Sources/BaseButtonBarPagerTabStripViewController.swift

@@ -40,7 +40,7 @@ enum PagerScroll {
     case onlyIfOutOfScreen
 }
 
-class BaseButtonBarPagerTabStripViewController<ButtonBarCellType: UICollectionViewCell>: PagerTabStripViewController, PagerTabStripDataSource, PagerTabStripIsProgressiveDelegate, UICollectionViewDelegate, UICollectionViewDataSource {
+class VLCPagingViewController<ButtonBarCellType: UICollectionViewCell>: PagerTabStripViewController, PagerTabStripDataSource, PagerTabStripIsProgressiveDelegate, UICollectionViewDelegate, UICollectionViewDataSource {
 
     var changeCurrentIndexProgressive: ((_ oldCell: ButtonBarCellType?, _ newCell: ButtonBarCellType?, _ progressPercentage: CGFloat, _ changeCurrentIndex: Bool, _ animated: Bool) -> Void)?
 

+ 3 - 3
Sources/VLCTabBarCoordinator.swift

@@ -12,7 +12,7 @@
 
 import Foundation
 
-class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate {
+class VLCTabbarCooordinator: NSObject, VLCMediaCategoryViewControllerDelegate {
 
     private var childCoordinators: [NSObject] = []
     private var tabBarController: UITabBarController
@@ -55,7 +55,7 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate {
         displayController.view.layoutMargins = UIEdgeInsets(top: 0, left: 0, bottom: tabBarController.tabBar.frame.size.height, right: 0)
         displayController.didMove(toParentViewController: tabBarController)
 
-        let videoVC = VLCVideoSubcategoryViewController(services: services)
+        let videoVC = VLCVideoViewController(services: services)
         videoVC.mediaDelegate = self
         videoVC.title = NSLocalizedString("VIDEO", comment: "")
         videoVC.tabBarItem = UITabBarItem(
@@ -65,7 +65,7 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate {
         videoVC.tabBarItem.accessibilityIdentifier = VLCAccessibilityIdentifier.video
 
         // Audio
-        let audioVC = VLCAudioSubcategoryViewController(services: services)
+        let audioVC = VLCAudioViewController(services: services)
         audioVC.mediaDelegate = self
         audioVC.title = NSLocalizedString("AUDIO", comment: "")
         audioVC.tabBarItem = UITabBarItem(

+ 12 - 12
VLC.xcodeproj/project.pbxproj

@@ -25,8 +25,8 @@
 		4152F1621FEF19BD00F1908B /* KeychainCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4152F1611FEF19BD00F1908B /* KeychainCoordinator.swift */; };
 		416443862048419E00CAC646 /* DeviceMotion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 416443852048419E00CAC646 /* DeviceMotion.swift */; };
 		416DACB720B6DB9A001BC75D /* VLCPlayingExternallyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 416DACB620B6DB9A001BC75D /* VLCPlayingExternallyView.swift */; };
-		4170152C209A1D3600802E44 /* MediaSubcategoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4170152B209A1D3600802E44 /* MediaSubcategoryViewController.swift */; };
-		41701546209B36E800802E44 /* BaseButtonBarPagerTabStripViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41701545209B36E800802E44 /* BaseButtonBarPagerTabStripViewController.swift */; };
+		4170152C209A1D3600802E44 /* MediaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4170152B209A1D3600802E44 /* MediaViewController.swift */; };
+		41701546209B36E800802E44 /* VLCPagingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41701545209B36E800802E44 /* VLCPagingViewController.swift */; };
 		417CDA231A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 417CDA211A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.m */; };
 		417CDA241A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 417CDA221A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib */; };
 		417D7F601F7BA26200DDF36A /* VLCRemoteControlService.m in Sources */ = {isa = PBXBuildFile; fileRef = 417D7F5F1F7BA26200DDF36A /* VLCRemoteControlService.m */; };
@@ -34,7 +34,7 @@
 		417E686C1F307D8F00DB9BB2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 417E68711F307D8F00DB9BB2 /* InfoPlist.strings */; };
 		417E68B91F321EFF00DB9BB2 /* VLCActivityViewControllerVendor.m in Sources */ = {isa = PBXBuildFile; fileRef = 417E68B81F321EFF00DB9BB2 /* VLCActivityViewControllerVendor.m */; };
 		4184AA151A5492070063DF5A /* VLCCloudStorageController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4184AA141A5492070063DF5A /* VLCCloudStorageController.m */; };
-		418B144720179C00000447AA /* MediaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418B144620179C00000447AA /* MediaViewController.swift */; };
+		418B144720179C00000447AA /* MediaCategoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418B144620179C00000447AA /* MediaCategoryViewController.swift */; };
 		418B144D20179C75000447AA /* VLCTabBarCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418B144C20179C74000447AA /* VLCTabBarCoordinator.swift */; };
 		418B145020179CB9000447AA /* LayoutAnchorContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418B144F20179CB9000447AA /* LayoutAnchorContainer.swift */; };
 		418B145920179E50000447AA /* VLCDragAndDropManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418B145820179E50000447AA /* VLCDragAndDropManager.swift */; };
@@ -505,8 +505,8 @@
 		416443852048419E00CAC646 /* DeviceMotion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DeviceMotion.swift; path = Sources/DeviceMotion.swift; sourceTree = "<group>"; };
 		416DACB620B6DB9A001BC75D /* VLCPlayingExternallyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VLCPlayingExternallyView.swift; sourceTree = "<group>"; };
 		416DEFF51FEEA76A00F4FC59 /* LayoutAnchorContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LayoutAnchorContainer.swift; path = Sources/LayoutAnchorContainer.swift; sourceTree = "<group>"; };
-		4170152B209A1D3600802E44 /* MediaSubcategoryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MediaSubcategoryViewController.swift; path = Sources/MediaSubcategoryViewController.swift; sourceTree = "<group>"; };
-		41701545209B36E800802E44 /* BaseButtonBarPagerTabStripViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = BaseButtonBarPagerTabStripViewController.swift; path = Sources/BaseButtonBarPagerTabStripViewController.swift; sourceTree = "<group>"; };
+		4170152B209A1D3600802E44 /* MediaViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MediaViewController.swift; path = Sources/MediaViewController.swift; sourceTree = "<group>"; };
+		41701545209B36E800802E44 /* VLCPagingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = VLCPagingViewController.swift; path = Sources/VLCPagingViewController.swift; sourceTree = "<group>"; };
 		417CDA201A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCCloudServicesTableViewController.h; path = Sources/VLCCloudServicesTableViewController.h; sourceTree = SOURCE_ROOT; };
 		417CDA211A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCCloudServicesTableViewController.m; path = Sources/VLCCloudServicesTableViewController.m; sourceTree = SOURCE_ROOT; };
 		417CDA221A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = VLCCloudServicesTableViewController.xib; path = Resources/VLCCloudServicesTableViewController.xib; sourceTree = SOURCE_ROOT; };
@@ -561,7 +561,7 @@
 		417E68B81F321EFF00DB9BB2 /* VLCActivityViewControllerVendor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCActivityViewControllerVendor.m; sourceTree = "<group>"; };
 		4184AA131A5492070063DF5A /* VLCCloudStorageController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCCloudStorageController.h; path = Sources/VLCCloudStorageController.h; sourceTree = SOURCE_ROOT; };
 		4184AA141A5492070063DF5A /* VLCCloudStorageController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCCloudStorageController.m; path = Sources/VLCCloudStorageController.m; sourceTree = SOURCE_ROOT; };
-		418B144620179C00000447AA /* MediaViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MediaViewController.swift; path = Sources/MediaViewController.swift; sourceTree = SOURCE_ROOT; };
+		418B144620179C00000447AA /* MediaCategoryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MediaCategoryViewController.swift; path = Sources/MediaCategoryViewController.swift; sourceTree = SOURCE_ROOT; };
 		418B144C20179C74000447AA /* VLCTabBarCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = VLCTabBarCoordinator.swift; path = Sources/VLCTabBarCoordinator.swift; sourceTree = SOURCE_ROOT; };
 		418B144F20179CB9000447AA /* LayoutAnchorContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LayoutAnchorContainer.swift; path = Sources/LayoutAnchorContainer.swift; sourceTree = "<group>"; };
 		418B145520179DF2000447AA /* VLCMediaData+VLCDragAndDrop.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "VLCMediaData+VLCDragAndDrop.swift"; path = "Sources/VLCMediaData+VLCDragAndDrop.swift"; sourceTree = "<group>"; };
@@ -1561,8 +1561,8 @@
 				8F91EC78195CEC7900F5BCBA /* VLCOpenInActivity.m */,
 				41F5C0761F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.h */,
 				41F5C0771F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.m */,
-				4170152B209A1D3600802E44 /* MediaSubcategoryViewController.swift */,
-				41701545209B36E800802E44 /* BaseButtonBarPagerTabStripViewController.swift */,
+				4170152B209A1D3600802E44 /* MediaViewController.swift */,
+				41701545209B36E800802E44 /* VLCPagingViewController.swift */,
 				41D7DD0420C1853E00AD94F6 /* ButtonBarView.swift */,
 				41D7DD2620C3060300AD94F6 /* PagerStripViewController.swift */,
 			);
@@ -1946,7 +1946,7 @@
 		7DEC8BE11BD686FA006E1093 /* Library */ = {
 			isa = PBXGroup;
 			children = (
-				418B144620179C00000447AA /* MediaViewController.swift */,
+				418B144620179C00000447AA /* MediaCategoryViewController.swift */,
 				7D37849C183A98DD009EE944 /* VLCThumbnailsCache.h */,
 				7D37849D183A98DD009EE944 /* VLCThumbnailsCache.m */,
 				DD7110EE1AF38B2B00854776 /* MLMediaLibrary+playlist.h */,
@@ -3221,12 +3221,12 @@
 				8D437154205808FF00F36458 /* VLCActionSheet.swift in Sources */,
 				DDF908E41CFCD97400108B70 /* VLCNetworkLoginDataSourceProtocol.m in Sources */,
 				7D378492183A98BF009EE944 /* VLCExternalDisplayController.m in Sources */,
-				4170152C209A1D3600802E44 /* MediaSubcategoryViewController.swift in Sources */,
+				4170152C209A1D3600802E44 /* MediaViewController.swift in Sources */,
 				41F9BC7C1F4F20E400268461 /* VLCTrackSelectorView.m in Sources */,
 				41B0948520E6851200DE38AD /* VLCMediaSubcategory.swift in Sources */,
 				7D378499183A98D1009EE944 /* VLCPlaylistCollectionViewCell.m in Sources */,
 				DD8F84311B00EB3B0009138A /* VLCPlaybackController+MediaLibrary.m in Sources */,
-				418B144720179C00000447AA /* MediaViewController.swift in Sources */,
+				418B144720179C00000447AA /* MediaCategoryViewController.swift in Sources */,
 				41EB91DD1F7BFF8500821AA5 /* VLCMetadata.m in Sources */,
 				DD3EFF551BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserDSM.m in Sources */,
 				7D37849A183A98D1009EE944 /* VLCPlaylistTableViewCell.m in Sources */,
@@ -3284,7 +3284,7 @@
 				7D5CAA8C1A4AD8E5003F2CBC /* VLCTrackSelectorHeaderView.m in Sources */,
 				DD870E951CEF78D800BBD4FE /* VLCNetworkLoginDataSourceLogin.m in Sources */,
 				CAC0AFED20CF8F6F00EDB035 /* VLCAccessibilityIdentifier.swift in Sources */,
-				41701546209B36E800802E44 /* BaseButtonBarPagerTabStripViewController.swift in Sources */,
+				41701546209B36E800802E44 /* VLCPagingViewController.swift in Sources */,
 				7D398DC11CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m in Sources */,
 				7D30F3CA183AB27A00FFC021 /* VLCDownloadViewController.m in Sources */,
 				DDEAECC61BDEC79D00756C83 /* VLCLocalNetworkServiceBrowserSAP.m in Sources */,