|
|
@ -135,13 +135,13 @@ public class MediaScannerServiceTestCase { |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("--- List of all artists ---"); |
|
|
|
System.out.println("--- List of all artists ---"); |
|
|
|
System.out.println("artistName#albumCount"); |
|
|
|
System.out.println("artistName#albumCount"); |
|
|
|
List<Artist> allArtists = artistDao.getAlphabetialArtists(0, 0, musicFolderDao.getAllMusicFolders()); |
|
|
|
List<Artist> allArtists = artistDao.getAlphabetialArtists(0, Integer.MAX_VALUE, musicFolderDao.getAllMusicFolders()); |
|
|
|
allArtists.forEach(artist -> System.out.println(artist.getName() + "#" + artist.getAlbumCount())); |
|
|
|
allArtists.forEach(artist -> System.out.println(artist.getName() + "#" + artist.getAlbumCount())); |
|
|
|
System.out.println("--- *********************** ---"); |
|
|
|
System.out.println("--- *********************** ---"); |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("--- List of all albums ---"); |
|
|
|
System.out.println("--- List of all albums ---"); |
|
|
|
System.out.println("name#artist"); |
|
|
|
System.out.println("name#artist"); |
|
|
|
List<Album> allAlbums = albumDao.getAlphabeticalAlbums(0, 0, true, true, musicFolderDao.getAllMusicFolders()); |
|
|
|
List<Album> allAlbums = albumDao.getAlphabeticalAlbums(0, Integer.MAX_VALUE, true, true, musicFolderDao.getAllMusicFolders()); |
|
|
|
allAlbums.forEach(album -> System.out.println(album.getName() + "#" + album.getArtist())); |
|
|
|
allAlbums.forEach(album -> System.out.println(album.getName() + "#" + album.getArtist())); |
|
|
|
Assert.assertEquals(5, allAlbums.size()); |
|
|
|
Assert.assertEquals(5, allAlbums.size()); |
|
|
|
System.out.println("--- *********************** ---"); |
|
|
|
System.out.println("--- *********************** ---"); |
|
|
@ -196,14 +196,14 @@ public class MediaScannerServiceTestCase { |
|
|
|
folders.add(musicFolder); |
|
|
|
folders.add(musicFolder); |
|
|
|
|
|
|
|
|
|
|
|
// Test that the artist is correctly imported
|
|
|
|
// Test that the artist is correctly imported
|
|
|
|
List<Artist> allArtists = artistDao.getAlphabetialArtists(0, 0, folders); |
|
|
|
List<Artist> allArtists = artistDao.getAlphabetialArtists(0, Integer.MAX_VALUE, folders); |
|
|
|
Assert.assertEquals(1, allArtists.size()); |
|
|
|
Assert.assertEquals(1, allArtists.size()); |
|
|
|
Artist artist = allArtists.get(0); |
|
|
|
Artist artist = allArtists.get(0); |
|
|
|
Assert.assertEquals("TestArtist", artist.getName()); |
|
|
|
Assert.assertEquals("TestArtist", artist.getName()); |
|
|
|
Assert.assertEquals(1, artist.getAlbumCount()); |
|
|
|
Assert.assertEquals(1, artist.getAlbumCount()); |
|
|
|
|
|
|
|
|
|
|
|
// Test that the album is correctly imported, along with its MusicBrainz release ID
|
|
|
|
// Test that the album is correctly imported, along with its MusicBrainz release ID
|
|
|
|
List<Album> allAlbums = albumDao.getAlphabeticalAlbums(0, 0, true, true, folders); |
|
|
|
List<Album> allAlbums = albumDao.getAlphabeticalAlbums(0, Integer.MAX_VALUE, true, true, folders); |
|
|
|
Assert.assertEquals(1, allAlbums.size()); |
|
|
|
Assert.assertEquals(1, allAlbums.size()); |
|
|
|
Album album = allAlbums.get(0); |
|
|
|
Album album = allAlbums.get(0); |
|
|
|
Assert.assertEquals("TestAlbum", album.getName()); |
|
|
|
Assert.assertEquals("TestAlbum", album.getName()); |
|
|
|