ソースを参照

MediaCollectionModel: Make title non optional

Edgar Fouillet 5 年 前
コミット
15d625aaf7

+ 1 - 1
SharedSources/MediaLibraryModel/AlbumModel.swift

@@ -104,7 +104,7 @@ extension VLCMLAlbum: MediaCollectionModel {
         return tracks
     }
 
-    func title() -> String? {
+    func title() -> String {
         return title
     }
 }

+ 1 - 1
SharedSources/MediaLibraryModel/ArtistModel.swift

@@ -90,7 +90,7 @@ extension VLCMLArtist: MediaCollectionModel {
         return tracks()
     }
 
-    func title() -> String? {
+    func title() -> String {
         return name
     }
 }

+ 1 - 1
SharedSources/MediaLibraryModel/GenreModel.swift

@@ -121,7 +121,7 @@ extension VLCMLGenre: MediaCollectionModel {
         return tracks()
     }
 
-    func title() -> String? {
+    func title() -> String {
         return name
     }
 }

+ 1 - 1
SharedSources/MediaLibraryModel/MediaLibraryBaseModel.swift

@@ -75,7 +75,7 @@ protocol SearchableMLModel {
 protocol MediaCollectionModel {
     func files() -> [VLCMLMedia]?
     func sortModel() -> SortModel?
-    func title() -> String?
+    func title() -> String
 }
 
 // MARK: - Helper methods

+ 1 - 1
SharedSources/MediaLibraryModel/PlaylistModel.swift

@@ -143,7 +143,7 @@ extension VLCMLPlaylist: MediaCollectionModel {
         return media
     }
 
-    func title() -> String? {
+    func title() -> String {
         return name
     }
 }