tesshucom 5 years ago committed by Andrew DeMaria
parent 093f7c028d
commit ff08f6dd02
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 4
      airsonic-main/src/main/java/org/airsonic/player/service/MediaScannerService.java
  2. 4
      airsonic-main/src/test/java/org/airsonic/player/service/search/SearchServiceSpecialPathTestCase.java

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

@ -69,14 +69,14 @@ public class SearchServiceSpecialPathTestCase extends AbstractAirsonicHomeTest {
.filter(m -> "accessible".equals(m.getName()))
.collect(Collectors.toList());
randomAlbums = searchService.getRandomAlbums(Integer.MAX_VALUE, folder01);
Assert.assertEquals("Albums in \"accessible\" ", 3, randomAlbums.size());
Assert.assertEquals("Albums in \"accessible\" ", 1, randomAlbums.size());
// dir - accessible's
List<MusicFolder> folder02 = folders.stream()
.filter(m -> "accessible's".equals(m.getName()))
.collect(Collectors.toList());
randomAlbums = searchService.getRandomAlbums(Integer.MAX_VALUE, folder02);
Assert.assertEquals("Albums in \"accessible's\" ", 0, randomAlbums.size());
Assert.assertEquals("Albums in \"accessible's\" ", 1, randomAlbums.size());
// dir - accessible+s
List<MusicFolder> folder03 = folders.stream()

Loading…
Cancel
Save