Skip to content

Commit

Permalink
fix scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
SurfaceS committed Sep 9, 2023
1 parent ae8a788 commit 85032f6
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/main/java/net/pms/library/LibraryScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ public void startScan() {
GuiManager.setStatusLine(null);
}

public void stopScan() {
if (running) {
running = false;
GuiManager.setScanLibraryStatus(CONFIGURATION.getUseCache(), false);
}
}

/**
* Starts partial rescan
*
Expand Down Expand Up @@ -192,7 +185,8 @@ public void discoverChildren() {
List<SharedContent> sharedContents = SharedContentConfiguration.getSharedContentArray();
for (SharedContent sharedContent : sharedContents) {
if (sharedContent instanceof FolderContent folder && folder.getFile() != null && folder.isActive()) {
addChild(new RealFile(renderer, folder.getFile()), true, false);
LibraryResource realSystemFileResource = renderer.getRootFolder().createResourceFromFile(folder.getFile());
addChild(realSystemFileResource, true, false);
}
}
}
Expand Down Expand Up @@ -254,7 +248,8 @@ public static void scanFileOrFolder(String filename) {

public static void stopScanLibrary() {
if (isScanLibraryRunning()) {
INSTANCE.stopScan();
running = false;
GuiManager.setScanLibraryStatus(CONFIGURATION.getUseCache(), false);
}
}

Expand Down

0 comments on commit 85032f6

Please sign in to comment.