|
|
@ -237,14 +237,14 @@ public class MediaScannerService { |
|
|
|
|
|
|
|
|
|
|
|
LOG.trace("Scanning file {}", file.getPath()); |
|
|
|
LOG.trace("Scanning file {}", file.getPath()); |
|
|
|
|
|
|
|
|
|
|
|
searchService.index(file); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Update the root folder if it has changed.
|
|
|
|
// Update the root folder if it has changed.
|
|
|
|
if (!musicFolder.getPath().getPath().equals(file.getFolder())) { |
|
|
|
if (!musicFolder.getPath().getPath().equals(file.getFolder())) { |
|
|
|
file.setFolder(musicFolder.getPath().getPath()); |
|
|
|
file.setFolder(musicFolder.getPath().getPath()); |
|
|
|
mediaFileDao.createOrUpdateMediaFile(file); |
|
|
|
mediaFileDao.createOrUpdateMediaFile(file); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
searchService.index(file); |
|
|
|
|
|
|
|
|
|
|
|
if (file.isDirectory()) { |
|
|
|
if (file.isDirectory()) { |
|
|
|
for (MediaFile child : mediaFileService.getChildrenOf(file, true, false, false, false)) { |
|
|
|
for (MediaFile child : mediaFileService.getChildrenOf(file, true, false, false, false)) { |
|
|
|
scanFile(child, musicFolder, lastScanned, albumCount, genres, isPodcast); |
|
|
|
scanFile(child, musicFolder, lastScanned, albumCount, genres, isPodcast); |
|
|
|