Преглед на файлове

MediaLibraryService: Add forceRescan helper

Edgar Fouillet преди 5 години
родител
ревизия
e3cd59fdf3
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      SharedSources/MediaLibraryService.swift

+ 4 - 0
SharedSources/MediaLibraryService.swift

@@ -332,6 +332,10 @@ extension MediaLibraryService {
         medialib.reload()
     }
 
+    @objc func forceRescan() {
+        medialib.forceRescan()
+    }
+
     @objc func reindexAllMediaForSpotlight() {
         media(ofType: .video).forEach { $0.updateCoreSpotlightEntry() }
         media(ofType: .audio).forEach { $0.updateCoreSpotlightEntry() }