瀏覽代碼

LibrarySearchDataSource: Adopt search to new Medialibrary

comparison is made with lowercased searchstring and searchable items
Carola Nitz 6 年之前
父節點
當前提交
e972c861de

+ 123 - 0
Sources/LibrarySearchDataSource.swift

@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * LibrarySearchDataSource.swift
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2019 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Authors: Carola Nitz <caro # videolan.org>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
+
+class LibrarySearchDataSource: NSObject, UICollectionViewDataSource {
+
+    var searchData = [VLCMLObject]()
+    var model: MediaLibraryBaseModel
+
+    init(model: MediaLibraryBaseModel) {
+        self.model = model
+        super.init()
+    }
+
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return searchData.count
+    }
+
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        guard let mediaCell = collectionView.dequeueReusableCell(withReuseIdentifier:model.cellType.defaultReuseIdentifier, for: indexPath) as? BaseCollectionViewCell else {
+            assertionFailure("you forgot to register the cell or the cell is not a subclass of BaseCollectionViewCell")
+            return UICollectionViewCell()
+        }
+        let mediaObject = searchData[indexPath.row]
+        if let media = mediaObject as? VLCMLMedia {
+            assert(media.mainFile() != nil, "The mainfile is nil")
+            mediaCell.media = media.mainFile() != nil ? media : nil
+        } else {
+            mediaCell.media = mediaObject
+        }
+        return mediaCell
+    }
+
+    func objectAtIndex(index: Int) -> VLCMLObject? {
+         return index < searchData.count ? searchData[index] : nil
+    }
+
+    func shouldReloadFor(searchString: String) {
+        guard searchString != "" else {
+            searchData = model.anyfiles
+            return
+        }
+        searchData.removeAll()
+        let lowercaseSearchString = searchString.lowercased()
+        model.anyfiles.forEach {
+            if let media = $0 as? VLCMLMedia {
+                if media.contains(lowercaseSearchString) { searchData.append($0) }
+            } else if let album = $0 as? VLCMLAlbum {
+                if album.contains(lowercaseSearchString) { searchData.append($0) }
+            } else if let genre = $0 as? VLCMLGenre {
+                if genre.contains(lowercaseSearchString) { searchData.append($0) }
+            } else if let playlist = $0 as? VLCMLPlaylist {
+                if playlist.contains(lowercaseSearchString) { searchData.append($0) }
+            } else if let artist = $0 as? VLCMLArtist {
+                if artist.contains(lowercaseSearchString) { searchData.append($0) }
+            } else if let albumtrack = $0 as? VLCMLAlbumTrack {
+                if albumtrack.contains(lowercaseSearchString) { searchData.append($0) }
+            } else {
+                assertionFailure("unhandled type")
+            }
+        }
+    }
+}
+
+extension VLCMLObject {
+    func contains(_ searchString: String) -> Bool {
+        return false
+    }
+}
+
+extension VLCMLMedia {
+    func contains(_ searchString: String) -> Bool {
+        return title.lowercased().contains(searchString)
+    }
+}
+
+extension VLCMLAlbum {
+    func contains(_ searchString: String) -> Bool {
+        var matches = false
+        matches = matches || title.lowercased().contains(searchString)
+        matches = matches || String(releaseYear()).lowercased().contains(searchString)
+        matches = matches || shortSummary.lowercased().contains(searchString)
+        matches = matches || albumArtist?.contains(searchString) ?? false
+        matches = matches || tracks?.filter({ $0.contains(searchString)}).isEmpty == false
+        return matches
+    }
+}
+
+extension VLCMLGenre {
+    func contains(_ searchString: String) -> Bool {
+        return name.lowercased().contains(searchString)
+    }
+}
+
+extension VLCMLPlaylist {
+    func contains(_ searchString: String) -> Bool {
+        return name.lowercased().contains(searchString)
+    }
+}
+
+extension VLCMLArtist {
+    func contains(_ searchString: String) -> Bool {
+        return name.lowercased().contains(searchString)
+    }
+}
+
+extension VLCMLAlbumTrack {
+    func contains(_ searchString: String) -> Bool {
+        var matches = false
+        matches = matches || artist?.contains(searchString) ?? false
+        matches = matches || genre?.contains(searchString) ?? false
+        matches = matches || album?.contains(searchString) ?? false
+        return matches
+    }
+}

+ 6 - 2
Sources/MediaCategories/MediaCategoryViewController.swift

@@ -23,7 +23,7 @@ class VLCMediaCategoryViewController: UICollectionViewController, UICollectionVi
 
     private var services: Services
     private var searchController: UISearchController?
-    private let searchDataSource = VLCLibrarySearchDisplayDataSource()
+    private let searchDataSource: LibrarySearchDataSource
     private var rendererButton: UIButton
     private lazy var editController: VLCEditController = {
         let editController = VLCEditController(mediaLibraryService:services.medialibraryService, model: model)
@@ -81,6 +81,7 @@ class VLCMediaCategoryViewController: UICollectionViewController, UICollectionVi
         self.services = services
         self.model = model
         self.rendererButton = services.rendererDiscovererManager.setupRendererButton()
+        self.searchDataSource = LibrarySearchDataSource(model: model)
         super.init(collectionViewLayout: UICollectionViewFlowLayout())
         if let collection = model as? CollectionModel {
             title = collection.mediaCollection.title()
@@ -216,7 +217,10 @@ class VLCMediaCategoryViewController: UICollectionViewController, UICollectionVi
     // MARK: - Search
 
     func updateSearchResults(for searchController: UISearchController) {
-        searchDataSource.shouldReloadTable(forSearch: searchController.searchBar.text, searchableFiles: model.anyfiles)
+        guard let searchText = searchController.searchBar.text else {
+            return
+        }
+        searchDataSource.shouldReloadFor(searchString: searchText)
         collectionView?.reloadData()
     }
 

+ 0 - 18
Sources/VLCLibrarySearchDisplayDataSource.h

@@ -1,18 +0,0 @@
-/*****************************************************************************
- * VLCLibrarySearchDisplayDataSource.h
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2017 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Carola Nitz <nitz.carola # gmail.com>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
-
-@interface VLCLibrarySearchDisplayDataSource : NSObject<UITableViewDataSource, UICollectionViewDataSource>
-
-- (NSManagedObject *)objectAtIndex:(NSUInteger)index;
-- (void)shouldReloadTableForSearchString:(NSString *)searchString searchableFiles:(NSArray *)files;
-
-@end

+ 0 - 260
Sources/VLCLibrarySearchDisplayDataSource.m

@@ -1,260 +0,0 @@
-/*****************************************************************************
- * VLCLibrarySearchDisplayDataSource.m
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2017 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Carola Nitz <nitz.carola # gmail.com>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
-
-#import "VLCLibrarySearchDisplayDataSource.h"
-
-@interface VLCLibrarySearchDisplayDataSource() <UITableViewDataSource>
-{
-    NSMutableArray *_searchData;
-}
-@end
-
-@implementation VLCLibrarySearchDisplayDataSource
-
-- (instancetype)init
-{
-    self = [super init];
-    if (self) {
-        _searchData = [NSMutableArray new];
-    }
-    return self;
-}
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
-{
-    return _searchData.count;
-}
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
-{
-    //needs to be updated as part of https://code.videolan.org/videolan/vlc-ios/issues/182
-    return [UITableViewCell new];
-}
-
-- (nonnull __kindof UICollectionViewCell *)collectionView:(nonnull UICollectionView *)collectionView cellForItemAtIndexPath:(nonnull NSIndexPath *)indexPath {
-
-    //needs to be updated as part of https://code.videolan.org/videolan/vlc-ios/issues/182
-    return [UICollectionViewCell new];
-}
-
-- (NSInteger)collectionView:(nonnull UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
-    return _searchData.count;
-}
-
-- (NSManagedObject *)objectAtIndex:(NSUInteger)index
-{
-    return index < _searchData.count ? _searchData[index] : nil;
-}
-
-- (void)shouldReloadTableForSearchString:(NSString *)searchString searchableFiles:(NSArray *)files
-{
-    if (!searchString || [searchString isEqualToString:@""]) {
-        _searchData = [files mutableCopy];
-        return;
-    }
-
-    [_searchData removeAllObjects];
-    NSRange nameRange;
-
-    for (NSManagedObject *item in files) {
-
-        if ([item isKindOfClass:[MLAlbum class]]) {
-            nameRange = [self _searchAlbum:(MLAlbum *)item forString:searchString];
-        } else if ([item isKindOfClass:[MLAlbumTrack class]]) {
-            nameRange = [self _searchAlbumTrack:(MLAlbumTrack *)item forString:searchString];
-        } else if ([item isKindOfClass:[MLShowEpisode class]]) {
-            nameRange = [self _searchShowEpisode:(MLShowEpisode *)item forString:searchString];
-        } else if ([item isKindOfClass:[MLShow class]]) {
-            nameRange = [self _searchShow:(MLShow *)item forString:searchString];
-        } else if ([item isKindOfClass:[MLLabel class]])
-            nameRange = [self _searchLabel:(MLLabel *)item forString:searchString];
-        else // simple file
-            nameRange = [self _searchFile:(MLFile*)item forString:searchString];
-
-        if (nameRange.location != NSNotFound)
-            [_searchData addObject:item];
-    }
-}
-
-- (NSRange)_searchAlbumTrack:(MLAlbumTrack *)albumTrack forString:(NSString *)searchString
-{
-    NSString *trackTitle = albumTrack.title;
-    NSRange nameRange = [trackTitle rangeOfString:searchString options:NSCaseInsensitiveSearch];
-    if (nameRange.location != NSNotFound)
-        return nameRange;
-
-    NSMutableArray *stringsToSearch = [[NSMutableArray alloc] initWithObjects:trackTitle, nil];
-    if ([albumTrack artist])
-        [stringsToSearch addObject:[albumTrack artist]];
-    if ([albumTrack genre])
-        [stringsToSearch addObject:[albumTrack genre]];
-
-    NSArray *substrings = [searchString componentsSeparatedByString:@" "];
-    NSUInteger substringCount = substrings.count;
-    NSUInteger searchStringCount = stringsToSearch.count;
-
-    for (NSUInteger x = 0; x < substringCount; x++) {
-        for (NSUInteger y = 0; y < searchStringCount; y++) {
-            nameRange = [stringsToSearch[y] rangeOfString:substrings[x] options:NSCaseInsensitiveSearch];
-            if (nameRange.location != NSNotFound)
-                break;
-        }
-        if (nameRange.location != NSNotFound)
-            break;
-    }
-    return nameRange;
-}
-
-- (NSRange)_searchAlbum:(MLAlbum *)album forString:(NSString *)searchString
-{
-    NSString *albumName = [album name];
-    NSRange nameRange = [albumName rangeOfString:searchString options:NSCaseInsensitiveSearch];
-    if (nameRange.location != NSNotFound)
-        return nameRange;
-
-    if ([album releaseYear]) {
-        nameRange = [[album releaseYear] rangeOfString:searchString options:NSCaseInsensitiveSearch];
-        if (nameRange.location != NSNotFound)
-            return nameRange;
-    }
-
-    /* split search string into substrings and try again */
-    NSArray *substrings = [searchString componentsSeparatedByString:@" "];
-    NSUInteger substringCount = substrings.count;
-    if (substringCount > 1) {
-        for (NSUInteger x = 0; x < substringCount; x++) {
-            nameRange = [searchString rangeOfString:substrings[x] options:NSCaseInsensitiveSearch];
-            if (nameRange.location != NSNotFound)
-                break;
-        }
-    }
-
-    if (nameRange.location != NSNotFound)
-        return nameRange;
-
-    /* search our tracks if we can't find what the user is looking for */
-    NSArray *tracks = [album sortedTracks];
-    NSUInteger trackCount = tracks.count;
-    for (NSUInteger x = 0; x < trackCount; x++) {
-        nameRange = [self _searchAlbumTrack:tracks[x] forString:searchString];
-        if (nameRange.location != NSNotFound)
-            break;
-    }
-    return nameRange;
-}
-
-- (NSRange)_searchShowEpisode:(MLShowEpisode *)episode forString:(NSString *)searchString
-{
-    /* basic search first, then try more complex things */
-    NSString *episodeName = [episode name];
-    NSRange nameRange;
-
-    if (episodeName) {
-        nameRange = [episodeName rangeOfString:searchString options:NSCaseInsensitiveSearch];
-        if (nameRange.location != NSNotFound)
-            return nameRange;
-    }
-
-    /* split search string into substrings and try again */
-    NSArray *substrings = [searchString componentsSeparatedByString:@" "];
-    NSUInteger substringCount = substrings.count;
-    if (substringCount > 1) {
-        for (NSUInteger x = 0; x < substringCount; x++) {
-            nameRange = [searchString rangeOfString:substrings[x] options:NSCaseInsensitiveSearch];
-            if (nameRange.location != NSNotFound)
-                break;
-        }
-    }
-
-    return nameRange;
-}
-
-- (NSRange)_searchShow:(MLShow *)mediaShow forString:(NSString *)searchString
-{
-    /* basic search first, then try more complex things */
-    NSRange nameRange = [[mediaShow name] rangeOfString:searchString options:NSCaseInsensitiveSearch];
-
-    if (nameRange.location != NSNotFound)
-        return nameRange;
-
-    /* split search string into substrings and try again */
-    NSArray *substrings = [searchString componentsSeparatedByString:@" "];
-    NSUInteger substringCount = substrings.count;
-    if (substringCount > 1) {
-        for (NSUInteger x = 0; x < substringCount; x++) {
-            nameRange = [searchString rangeOfString:substrings[x] options:NSCaseInsensitiveSearch];
-            if (nameRange.location != NSNotFound)
-                break;
-        }
-    }
-    if (nameRange.location != NSNotFound)
-        return nameRange;
-
-    /* user didn't search for our show name, let's do a deeper search on the episodes */
-    NSArray *episodes = [mediaShow sortedEpisodes];
-    NSUInteger episodeCount = episodes.count;
-    for (NSUInteger x = 0; x < episodeCount; x++)
-        nameRange = [self _searchShowEpisode:episodes[x] forString:searchString];
-
-    return nameRange;
-}
-
-- (NSRange)_searchLabel:(MLLabel *)mediaLabel forString:(NSString *)searchString
-{
-    /* basic search first, then try more complex things */
-    NSRange nameRange = [[mediaLabel name] rangeOfString:searchString options:NSCaseInsensitiveSearch];
-
-    if (nameRange.location != NSNotFound)
-        return nameRange;
-
-    /* user didn't search for our label name, let's do a deeper search */
-    NSArray *files = [mediaLabel sortedFolderItems];
-    NSUInteger fileCount = files.count;
-    for (NSUInteger x = 0; x < fileCount; x++) {
-        nameRange = [self _searchFile:files[x] forString:searchString];
-        if (nameRange.location != NSNotFound)
-            break;
-    }
-    return nameRange;
-}
-
-- (NSRange)_searchFile:(MLFile *)mediaFile forString:(NSString *)searchString
-{
-    /* basic search first, then try more complex things */
-    NSRange nameRange = [[mediaFile title] rangeOfString:searchString options:NSCaseInsensitiveSearch];
-    if (nameRange.location != NSNotFound)
-        return nameRange;
-
-    NSMutableArray *stringsToSearch = [[NSMutableArray alloc] initWithObjects:[mediaFile title], nil];
-    if ([mediaFile artist])
-        [stringsToSearch addObject:[mediaFile artist]];
-    if ([mediaFile releaseYear])
-        [stringsToSearch addObject:[mediaFile releaseYear]];
-
-    NSArray *substrings = [searchString componentsSeparatedByString:@" "];
-    NSUInteger substringCount = substrings.count;
-    NSUInteger searchStringCount = stringsToSearch.count;
-
-    for (NSUInteger x = 0; x < substringCount; x++) {
-        for (NSUInteger y = 0; y < searchStringCount; y++) {
-            nameRange = [stringsToSearch[y] rangeOfString:substrings[x] options:NSCaseInsensitiveSearch];
-            if (nameRange.location != NSNotFound)
-                break;
-        }
-        if (nameRange.location != NSNotFound)
-            break;
-    }
-
-    return nameRange;
-}
-
-@end

+ 4 - 6
VLC.xcodeproj/project.pbxproj

@@ -34,6 +34,7 @@
 		416DACB720B6DB9A001BC75D /* PlayingExternallyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 416DACB620B6DB9A001BC75D /* PlayingExternallyView.swift */; };
 		4170152C209A1D3600802E44 /* MediaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4170152B209A1D3600802E44 /* MediaViewController.swift */; };
 		41701546209B36E800802E44 /* VLCPagingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41701545209B36E800802E44 /* VLCPagingViewController.swift */; };
+		4170AF9722848DCB008881BA /* LibrarySearchDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4170AF9622848DCB008881BA /* LibrarySearchDataSource.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 */; };
@@ -75,7 +76,6 @@
 		41EC28E32136D905004BCF0F /* BaseCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41EC28E22136D905004BCF0F /* BaseCollectionViewCell.swift */; };
 		41EC28E52136DD41004BCF0F /* MovieCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41EC28E42136DD41004BCF0F /* MovieCollectionViewCell.swift */; };
 		41EC28E92136DE46004BCF0F /* MovieCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 41EC28E82136DE46004BCF0F /* MovieCollectionViewCell.xib */; };
-		41F5C0781F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 41F5C0771F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.m */; };
 		41F9BC7C1F4F20E400268461 /* VLCTrackSelectorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 41F9BC7B1F4F20E400268461 /* VLCTrackSelectorView.m */; };
 		41FCD2F820B565B600660AAB /* VLCAlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41FCD2F720B565B500660AAB /* VLCAlertViewController.swift */; };
 		6B4E33D11BF2A39400A35255 /* playerControl.css in Resources */ = {isa = PBXBuildFile; fileRef = 6B4E33CF1BF2A39400A35255 /* playerControl.css */; };
@@ -435,6 +435,7 @@
 		416DEFF51FEEA76A00F4FC59 /* LayoutAnchorContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LayoutAnchorContainer.swift; path = Sources/LayoutAnchorContainer.swift; sourceTree = "<group>"; };
 		4170152B209A1D3600802E44 /* MediaViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaViewController.swift; sourceTree = "<group>"; };
 		41701545209B36E800802E44 /* VLCPagingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = VLCPagingViewController.swift; path = Sources/VLCPagingViewController.swift; sourceTree = "<group>"; };
+		4170AF9622848DCB008881BA /* LibrarySearchDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LibrarySearchDataSource.swift; path = Sources/LibrarySearchDataSource.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; };
@@ -535,8 +536,6 @@
 		41EC28E22136D905004BCF0F /* BaseCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCollectionViewCell.swift; sourceTree = "<group>"; };
 		41EC28E42136DD41004BCF0F /* MovieCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieCollectionViewCell.swift; sourceTree = "<group>"; };
 		41EC28E82136DE46004BCF0F /* MovieCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MovieCollectionViewCell.xib; sourceTree = "<group>"; };
-		41F5C0761F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VLCLibrarySearchDisplayDataSource.h; path = Sources/VLCLibrarySearchDisplayDataSource.h; sourceTree = SOURCE_ROOT; };
-		41F5C0771F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = VLCLibrarySearchDisplayDataSource.m; path = Sources/VLCLibrarySearchDisplayDataSource.m; sourceTree = SOURCE_ROOT; };
 		41F9BC7A1F4F20E400268461 /* VLCTrackSelectorView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VLCTrackSelectorView.h; path = Sources/VLCTrackSelectorView.h; sourceTree = SOURCE_ROOT; };
 		41F9BC7B1F4F20E400268461 /* VLCTrackSelectorView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = VLCTrackSelectorView.m; path = Sources/VLCTrackSelectorView.m; sourceTree = SOURCE_ROOT; };
 		41FCD2F720B565B500660AAB /* VLCAlertViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VLCAlertViewController.swift; sourceTree = "<group>"; };
@@ -1356,11 +1355,10 @@
 				CADFAD07207D128200103F33 /* VLCEmptyLibraryView.m */,
 				8F91EC77195CEC7900F5BCBA /* VLCOpenInActivity.h */,
 				8F91EC78195CEC7900F5BCBA /* VLCOpenInActivity.m */,
-				41F5C0761F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.h */,
-				41F5C0771F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.m */,
 				41701545209B36E800802E44 /* VLCPagingViewController.swift */,
 				41D7DD0420C1853E00AD94F6 /* ButtonBarView.swift */,
 				41D7DD2620C3060300AD94F6 /* PagerStripViewController.swift */,
+				4170AF9622848DCB008881BA /* LibrarySearchDataSource.swift */,
 			);
 			name = "Everything Playlist";
 			sourceTree = "<group>";
@@ -2940,7 +2938,6 @@
 				41B93C051A53835300102E8B /* VLCCloudServiceCell.m in Sources */,
 				7D4625881A5614A1001A80B4 /* VLCEqualizerView.m in Sources */,
 				7DF9352F1958AB0600E60FD4 /* UIColor+Presets.m in Sources */,
-				41F5C0781F41ED55005EB9CB /* VLCLibrarySearchDisplayDataSource.m in Sources */,
 				7DBBF182183AB3B80009A339 /* VLCAppDelegate.m in Sources */,
 				8DE1887421089B3A00A091D2 /* MediaLibraryBaseModel.swift in Sources */,
 				418B145020179CB9000447AA /* LayoutAnchorContainer.swift in Sources */,
@@ -2986,6 +2983,7 @@
 				7D30F3CA183AB27A00FFC021 /* VLCDownloadViewController.m in Sources */,
 				DDEAECC61BDEC79D00756C83 /* VLCLocalNetworkServiceBrowserSAP.m in Sources */,
 				DD3EFF491BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserPlex.m in Sources */,
+				4170AF9722848DCB008881BA /* LibrarySearchDataSource.swift in Sources */,
 				DD3EFF571BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserUPnP.m in Sources */,
 				7D9CB9DC1A4C55EF00BB74B4 /* VLCPlaybackNavigationController.m in Sources */,
 				7D30F3D0183AB2AC00FFC021 /* VLCMediaFileDiscoverer.m in Sources */,

+ 0 - 1
vlc-ios/VLC-iOS-Bridging-Header.h

@@ -12,7 +12,6 @@
 #import "VLCConstants.h"
 #import "VLCDownloadViewController.h"
 #import "VLCEmptyLibraryView.h"
-#import "VLCLibrarySearchDisplayDataSource.h"
 #import "VLCOpenNetworkStreamViewController.h"
 #import "VLCPlaybackController+MediaLibrary.h"
 #import "VLCPlaybackNavigationController.h"