|
|
@ -129,9 +129,9 @@ public class MainController { |
|
|
|
map.put("brand", settingsService.getBrand()); |
|
|
|
map.put("brand", settingsService.getBrand()); |
|
|
|
map.put("viewAsList", isViewAsList(request, userSettings)); |
|
|
|
map.put("viewAsList", isViewAsList(request, userSettings)); |
|
|
|
if (dir.isAlbum()) { |
|
|
|
if (dir.isAlbum()) { |
|
|
|
List<MediaFile> sieblingAlbums = getSieblingAlbums(dir); |
|
|
|
List<MediaFile> siblingAlbums = getSiblingAlbums(dir); |
|
|
|
thereIsMoreSAlbums = trimToSize(showAll, sieblingAlbums, userPaginationPreference); |
|
|
|
thereIsMoreSAlbums = trimToSize(showAll, siblingAlbums, userPaginationPreference); |
|
|
|
map.put("sieblingAlbums", sieblingAlbums); |
|
|
|
map.put("siblingAlbums", siblingAlbums); |
|
|
|
map.put("artist", guessArtist(children)); |
|
|
|
map.put("artist", guessArtist(children)); |
|
|
|
map.put("album", guessAlbum(children)); |
|
|
|
map.put("album", guessAlbum(children)); |
|
|
|
map.put("musicBrainzReleaseId", guessMusicBrainzReleaseId(children)); |
|
|
|
map.put("musicBrainzReleaseId", guessMusicBrainzReleaseId(children)); |
|
|
@ -277,13 +277,13 @@ public class MainController { |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private List<MediaFile> getSieblingAlbums(MediaFile dir) { |
|
|
|
private List<MediaFile> getSiblingAlbums(MediaFile dir) { |
|
|
|
List<MediaFile> result = new ArrayList<>(); |
|
|
|
List<MediaFile> result = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
MediaFile parent = mediaFileService.getParentOf(dir); |
|
|
|
MediaFile parent = mediaFileService.getParentOf(dir); |
|
|
|
if (!mediaFileService.isRoot(parent)) { |
|
|
|
if (!mediaFileService.isRoot(parent)) { |
|
|
|
List<MediaFile> sieblings = mediaFileService.getChildrenOf(parent, false, true, true); |
|
|
|
List<MediaFile> siblings = mediaFileService.getChildrenOf(parent, false, true, true); |
|
|
|
result.addAll(sieblings.stream().filter(siebling -> siebling.isAlbum() && !siebling.equals(dir)).collect(Collectors.toList())); |
|
|
|
result.addAll(siblings.stream().filter(sibling -> sibling.isAlbum() && !sibling.equals(dir)).collect(Collectors.toList())); |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|