diff --git a/libresonic-main/pom.xml b/libresonic-main/pom.xml index 8d6c564a..3e40f989 100644 --- a/libresonic-main/pom.xml +++ b/libresonic-main/pom.xml @@ -12,6 +12,10 @@ 6.1.beta2 + + 3.1.0 + + @@ -26,6 +30,15 @@ ${project.version} + + + io.dropwizard.metrics + metrics-core + ${metrics.version} + test + + + org.springframework spring-webmvc diff --git a/libresonic-main/src/main/java/org/libresonic/player/service/MediaScannerService.java b/libresonic-main/src/main/java/org/libresonic/player/service/MediaScannerService.java index 9b81e11e..445e79b5 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/service/MediaScannerService.java +++ b/libresonic-main/src/main/java/org/libresonic/player/service/MediaScannerService.java @@ -70,6 +70,11 @@ public class MediaScannerService { schedule(); } + public void initNoSchedule() { + deleteOldIndexFiles(); + statistics = settingsService.getMediaLibraryStatistics(); + } + /** * Schedule background execution of media library scanning. */ diff --git a/libresonic-main/src/test/java/org/libresonic/player/TestCaseUtils.java b/libresonic-main/src/test/java/org/libresonic/player/TestCaseUtils.java new file mode 100644 index 00000000..f6ac5d45 --- /dev/null +++ b/libresonic-main/src/test/java/org/libresonic/player/TestCaseUtils.java @@ -0,0 +1,123 @@ +package org.libresonic.player; + +import org.apache.commons.io.FileUtils; +import org.libresonic.player.dao.DaoHelper; +import org.libresonic.player.service.MediaScannerService; +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public class TestCaseUtils { + + private static final String LIBRESONIC_HOME_FOR_TEST = "/tmp/libresonic"; + + private static File libresonicHomeDirForTest = null; + + /** + * Returns the path of the LIBRESONIC_HOME directory to use for tests. + * This will create a temporary directory. + * + * @return LIBRESONIC_HOME directory path. + * @throws RuntimeException if it fails to create the temp directory. + */ + public static String libresonicHomePathForTest() { + + if (libresonicHomeDirForTest == null) { + try { + libresonicHomeDirForTest = Files.createTempDirectory("libresonic_test_").toFile(); + } catch (IOException e) { + throw new RuntimeException("Error while creating temporary LIBRESONIC_HOME directory for tests"); + } + System.out.println("LIBRESONIC_HOME directory will be "+libresonicHomeDirForTest.getAbsolutePath()); + } + return libresonicHomeDirForTest.getAbsolutePath(); + } + + + /** + * Cleans the LIBRESONIC_HOME directory used for tests. + * + * @throws IOException + */ + public static void cleanLibresonicHomeForTest() throws IOException { + + File libresonicHomeDir = new File(libresonicHomePathForTest()); + if (libresonicHomeDir.exists() && libresonicHomeDir.isDirectory()) { + System.out.println("Delete libresonic home (ie. "+libresonicHomeDir.getAbsolutePath()+")."); + try { + FileUtils.deleteDirectory(libresonicHomeDir); + } catch (IOException e) { + System.out.println("Error while deleting libresonic home."); + e.printStackTrace(); + throw e; + } + } + + } + + /** + * Constructs a map of records count per table. + * + * @param daoHelper DaoHelper object + * @return Map table name -> records count + */ + public static Map recordsInAllTables(DaoHelper daoHelper) { + List tableNames = daoHelper.getJdbcTemplate().queryForList("" + + "select table_name " + + "from information_schema.system_tables " + + "where table_name not like 'SYSTEM%'" + , String.class); + Map nbRecords = + tableNames.stream() + .collect(Collectors.toMap(table -> table, table -> recordsInTable(table,daoHelper))); + + return nbRecords; + } + + /** + * Counts records in a table. + * + * @param tableName + * @param daoHelper + * @return + */ + public static Integer recordsInTable(String tableName, DaoHelper daoHelper) { + return daoHelper.getJdbcTemplate().queryForInt("select count(1) from " + tableName); + } + + + public static ApplicationContext loadSpringApplicationContext(String baseResources) { + String applicationContextService = baseResources + "applicationContext-service.xml"; + String applicationContextCache = baseResources + "applicationContext-cache.xml"; + + String[] configLocations = new String[]{ + TestCaseUtils.class.getClass().getResource(applicationContextCache).toString(), + TestCaseUtils.class.getClass().getResource(applicationContextService).toString() + }; + return new ClassPathXmlApplicationContext(configLocations); + } + + + /** + * Scans the music library * @param mediaScannerService + */ + public static void execScan(MediaScannerService mediaScannerService) { + mediaScannerService.scanLibrary(); + + while (mediaScannerService.isScanning()) { + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + } + +} diff --git a/libresonic-main/src/test/java/org/libresonic/player/dao/DaoTestCaseBase.java b/libresonic-main/src/test/java/org/libresonic/player/dao/DaoTestCaseBase.java index 426fb89c..57897cfd 100644 --- a/libresonic-main/src/test/java/org/libresonic/player/dao/DaoTestCaseBase.java +++ b/libresonic-main/src/test/java/org/libresonic/player/dao/DaoTestCaseBase.java @@ -1,6 +1,7 @@ package org.libresonic.player.dao; import junit.framework.TestCase; +import org.libresonic.player.TestCaseUtils; import org.libresonic.player.util.FileUtil; import org.springframework.jdbc.core.JdbcTemplate; @@ -61,7 +62,7 @@ public abstract class DaoTestCaseBase extends TestCase { } private static void deleteDatabase() { - File libresonicHome = new File("/tmp/libresonic"); + File libresonicHome = new File(TestCaseUtils.libresonicHomePathForTest()); File dbHome = new File(libresonicHome, "db"); System.setProperty("libresonic.home", libresonicHome.getPath()); diff --git a/libresonic-main/src/test/java/org/libresonic/player/dao/MusicFolderDaoMock.java b/libresonic-main/src/test/java/org/libresonic/player/dao/MusicFolderDaoMock.java new file mode 100644 index 00000000..f4127d44 --- /dev/null +++ b/libresonic-main/src/test/java/org/libresonic/player/dao/MusicFolderDaoMock.java @@ -0,0 +1,39 @@ +package org.libresonic.player.dao; + +import org.libresonic.player.domain.MusicFolder; + +import java.io.File; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MusicFolderDaoMock extends MusicFolderDao { + + private static String baseResources = "/MEDIAS/"; + + public static String resolveBaseMediaPath() { + String baseDir = MusicFolderDaoMock.class.getResource(baseResources).toString().replace("file:",""); + return baseDir; + } + + public static String resolveMusicFolderPath() { + return (MusicFolderDaoMock.resolveBaseMediaPath() + "Music"); + } + + public static String resolveMusic2FolderPath() { + return (MusicFolderDaoMock.resolveBaseMediaPath() + "Music2"); + } + + @Override + public List getAllMusicFolders() { + List liste = new ArrayList<>(); + File musicDir = new File(MusicFolderDaoMock.resolveMusicFolderPath()); + MusicFolder musicFolder = new MusicFolder(1,musicDir,"Music",true,new Date()); + liste.add(musicFolder); + + File music2Dir = new File(MusicFolderDaoMock.resolveMusic2FolderPath()); + MusicFolder musicFolder2 = new MusicFolder(2,music2Dir,"Music2",true,new Date()); + liste.add(musicFolder2); + return liste; + } +} diff --git a/libresonic-main/src/test/java/org/libresonic/player/service/MediaScannerServiceTestCase.java b/libresonic-main/src/test/java/org/libresonic/player/service/MediaScannerServiceTestCase.java new file mode 100644 index 00000000..12f76490 --- /dev/null +++ b/libresonic-main/src/test/java/org/libresonic/player/service/MediaScannerServiceTestCase.java @@ -0,0 +1,120 @@ +package org.libresonic.player.service; + +import com.codahale.metrics.ConsoleReporter; +import com.codahale.metrics.JmxReporter; +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.Timer; +import junit.framework.Assert; +import junit.framework.TestCase; +import org.libresonic.player.TestCaseUtils; +import org.libresonic.player.dao.*; +import org.libresonic.player.domain.Album; +import org.libresonic.player.domain.Artist; +import org.libresonic.player.domain.MediaFile; +import org.springframework.context.ApplicationContext; + +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * A unit test class to test the MediaScannerService. + * + * This class uses the Spring application context configuration present in the + * /org/libresonic/player/service/mediaScannerServiceTestCase/ directory. + * + * The media library is found in the /MEDIAS directory. + * It is composed of 2 musicFolders (Music and Music2) and several little weight audio files. + * + * At runtime, the subsonic_home dir is set to target/test-classes/org/libresonic/player/service/mediaScannerServiceTestCase. + * An empty database is created on the fly. + * + */ +public class MediaScannerServiceTestCase extends TestCase { + + private static String baseResources = "/org/libresonic/player/service/mediaScannerServiceTestCase/"; + + private final MetricRegistry metrics = new MetricRegistry(); + + + private MediaScannerService mediaScannerService = null; + private MediaFileDao mediaFileDao = null; + private MusicFolderDao musicFolderDao = null; + private DaoHelper daoHelper = null; + private MediaFileService mediaFileService = null; + private ArtistDao artistDao = null; + private AlbumDao albumDao = null; + + + @Override + protected void setUp() throws Exception { + super.setUp(); + + System.setProperty("libresonic.home", TestCaseUtils.libresonicHomePathForTest()); + + TestCaseUtils.cleanLibresonicHomeForTest(); + + // load spring context + ApplicationContext context = TestCaseUtils.loadSpringApplicationContext(baseResources); + + mediaScannerService = (MediaScannerService)context.getBean("mediaScannerService"); + mediaFileDao = (MediaFileDao)context.getBean("mediaFileDao"); + musicFolderDao = (MusicFolderDao) context.getBean("musicFolderDao"); + daoHelper = (DaoHelper) context.getBean("daoHelper"); + mediaFileService = (MediaFileService) context.getBean("mediaFileService"); + artistDao = (ArtistDao) context.getBean("artistDao"); + albumDao = (AlbumDao) context.getBean("albumDao"); + } + + + /** + * Tests the MediaScannerService by scanning the test media library into an empty database. + */ + public void testScanLibrary() { + + Timer globalTimer = metrics.timer(MetricRegistry.name(MediaScannerServiceTestCase.class, "Timer.global")); + + Timer.Context globalTimerContext = globalTimer.time(); + TestCaseUtils.execScan(mediaScannerService); + globalTimerContext.stop(); + + System.out.println("--- Report of records count per table ---"); + Map records = TestCaseUtils.recordsInAllTables(daoHelper); + records.keySet().forEach(tableName -> System.out.println(tableName+" : "+records.get(tableName).toString() )); + System.out.println("--- *********************** ---"); + + + // Music Folder Music must have 3 children + List listeMusicChildren = mediaFileDao.getChildrenOf(MusicFolderDaoMock.resolveMusicFolderPath()); + Assert.assertEquals(3,listeMusicChildren.size()); + // Music Folder Music2 must have 1 children + List listeMusic2Children = mediaFileDao.getChildrenOf(MusicFolderDaoMock.resolveMusic2FolderPath()); + Assert.assertEquals(1,listeMusic2Children.size()); + + System.out.println("--- List of all artists ---"); + System.out.println("artistName#albumCount"); + List allArtists = artistDao.getAlphabetialArtists(0,0,musicFolderDao.getAllMusicFolders()); + allArtists.forEach(artist -> System.out.println(artist.getName()+"#"+artist.getAlbumCount())); + System.out.println("--- *********************** ---"); + + System.out.println("--- List of all albums ---"); + System.out.println("name#artist"); + List allAlbums = albumDao.getAlphabetialAlbums(0,0,true,musicFolderDao.getAllMusicFolders()); + allAlbums.forEach(album -> System.out.println(album.getName()+"#"+album.getArtist())); + Assert.assertEquals(5,allAlbums.size()); + System.out.println("--- *********************** ---"); + + List listeSongs = mediaFileDao.getSongsByGenre("Baroque Instrumental",0,0,musicFolderDao.getAllMusicFolders()); + Assert.assertEquals(2,listeSongs.size()); + + // display out metrics report + ConsoleReporter reporter = ConsoleReporter.forRegistry(metrics) + .convertRatesTo(TimeUnit.SECONDS.SECONDS) + .convertDurationsTo(TimeUnit.MILLISECONDS) + .build(); + reporter.report(); + + System.out.print("End"); + } + +} diff --git a/libresonic-main/src/test/java/org/libresonic/player/service/SettingsServiceTestCase.java b/libresonic-main/src/test/java/org/libresonic/player/service/SettingsServiceTestCase.java index 449e47cd..c2c29f21 100644 --- a/libresonic-main/src/test/java/org/libresonic/player/service/SettingsServiceTestCase.java +++ b/libresonic-main/src/test/java/org/libresonic/player/service/SettingsServiceTestCase.java @@ -25,6 +25,7 @@ import java.util.Date; import java.util.Locale; import junit.framework.TestCase; +import org.libresonic.player.TestCaseUtils; /** * Unit test of {@link SettingsService}. @@ -33,19 +34,18 @@ import junit.framework.TestCase; */ public class SettingsServiceTestCase extends TestCase { - private static final File LIBRESONIC_HOME = new File("/tmp/libresonic"); - private SettingsService settingsService; @Override protected void setUp() throws Exception { - System.setProperty("libresonic.home", LIBRESONIC_HOME.getPath()); - new File(LIBRESONIC_HOME, "libresonic.properties").delete(); + String libresonicHome = TestCaseUtils.libresonicHomePathForTest(); + System.setProperty("libresonic.home", libresonicHome); + new File(libresonicHome, "libresonic.properties").delete(); settingsService = new SettingsService(); } public void testLibresonicHome() { - assertEquals("Wrong Libresonic home.", LIBRESONIC_HOME, SettingsService.getLibresonicHome()); + assertEquals("Wrong Libresonic home.", TestCaseUtils.libresonicHomePathForTest(), SettingsService.getLibresonicHome().getAbsolutePath()); } public void testDefaultValues() { diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Céline Frisch- Café Zimmermann - Bach- Goldberg Variations, Canons [Disc 1]/01 - Bach- Goldberg Variations, BWV 988 - Aria.flac b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Céline Frisch- Café Zimmermann - Bach- Goldberg Variations, Canons [Disc 1]/01 - Bach- Goldberg Variations, BWV 988 - Aria.flac new file mode 100644 index 00000000..79172c3a Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Céline Frisch- Café Zimmermann - Bach- Goldberg Variations, Canons [Disc 1]/01 - Bach- Goldberg Variations, BWV 988 - Aria.flac differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Céline Frisch- Café Zimmermann - Bach- Goldberg Variations, Canons [Disc 1]/02 - Bach- Goldberg Variations, BWV 988 - Variatio 1 A 1 Clav..flac b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Céline Frisch- Café Zimmermann - Bach- Goldberg Variations, Canons [Disc 1]/02 - Bach- Goldberg Variations, BWV 988 - Variatio 1 A 1 Clav..flac new file mode 100644 index 00000000..1b54bb9c Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Céline Frisch- Café Zimmermann - Bach- Goldberg Variations, Canons [Disc 1]/02 - Bach- Goldberg Variations, BWV 988 - Variatio 1 A 1 Clav..flac differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Céline Frisch- Café Zimmermann - Bach- Goldberg Variations, Canons [Disc 1]/Folder.jpg b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Céline Frisch- Café Zimmermann - Bach- Goldberg Variations, Canons [Disc 1]/Folder.jpg new file mode 100644 index 00000000..f1222e13 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Céline Frisch- Café Zimmermann - Bach- Goldberg Variations, Canons [Disc 1]/Folder.jpg differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Chamber Music With Voice/01 - Sonata Violin & Cello I. Allegro.ogg b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Chamber Music With Voice/01 - Sonata Violin & Cello I. Allegro.ogg new file mode 100644 index 00000000..59c70b41 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Chamber Music With Voice/01 - Sonata Violin & Cello I. Allegro.ogg differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Chamber Music With Voice/02 - Sonata Violin & Cello II. Tres Vif.ogg b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Chamber Music With Voice/02 - Sonata Violin & Cello II. Tres Vif.ogg new file mode 100644 index 00000000..165a7804 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Chamber Music With Voice/02 - Sonata Violin & Cello II. Tres Vif.ogg differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Chamber Music With Voice/Folder.jpg b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Chamber Music With Voice/Folder.jpg new file mode 100644 index 00000000..b902207b Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Chamber Music With Voice/Folder.jpg differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Complete Piano Works/01 - Gaspard de la Nuit - i. Ondine.mp3 b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Complete Piano Works/01 - Gaspard de la Nuit - i. Ondine.mp3 new file mode 100644 index 00000000..16b10e42 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Complete Piano Works/01 - Gaspard de la Nuit - i. Ondine.mp3 differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Complete Piano Works/02 - Gaspard de la Nuit - ii. Le Gibet.mp3 b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Complete Piano Works/02 - Gaspard de la Nuit - ii. Le Gibet.mp3 new file mode 100644 index 00000000..47b685a7 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Complete Piano Works/02 - Gaspard de la Nuit - ii. Le Gibet.mp3 differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Complete Piano Works/Folder.jpeg b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Complete Piano Works/Folder.jpeg new file mode 100644 index 00000000..6542198c Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Ravel/_DIR_ Ravel - Complete Piano Works/Folder.jpeg differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/Sixteen Horsepower - 01 I Seen What I Saw.mp3 b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/Sixteen Horsepower - 01 I Seen What I Saw.mp3 new file mode 100644 index 00000000..a18dc230 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/Sixteen Horsepower - 01 I Seen What I Saw.mp3 differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/Sixteen Horsepower - 02 Black Soul Choir.mp3 b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/Sixteen Horsepower - 02 Black Soul Choir.mp3 new file mode 100644 index 00000000..54bb890d Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/Sixteen Horsepower - 02 Black Soul Choir.mp3 differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/Sixteen Horsepower - 10 Reed Neck Reel.mp3 b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/Sixteen Horsepower - 10 Reed Neck Reel.mp3 new file mode 100644 index 00000000..c0022556 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/Sixteen Horsepower - 10 Reed Neck Reel.mp3 differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/cover.jpg b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/cover.jpg new file mode 100644 index 00000000..0c2e6181 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music/_DIR_ Sixteen Horsepower/_DIR_ Sackcloth 'n' Ashes/cover.jpg differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music2/_DIR_ chrome hoof - 2004/02 eyes like dull hazlenuts.mp3 b/libresonic-main/src/test/resources/MEDIAS/Music2/_DIR_ chrome hoof - 2004/02 eyes like dull hazlenuts.mp3 new file mode 100644 index 00000000..cf1f4646 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music2/_DIR_ chrome hoof - 2004/02 eyes like dull hazlenuts.mp3 differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music2/_DIR_ chrome hoof - 2004/10 telegraph hill.mp3 b/libresonic-main/src/test/resources/MEDIAS/Music2/_DIR_ chrome hoof - 2004/10 telegraph hill.mp3 new file mode 100644 index 00000000..da30d5e6 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music2/_DIR_ chrome hoof - 2004/10 telegraph hill.mp3 differ diff --git a/libresonic-main/src/test/resources/MEDIAS/Music2/_DIR_ chrome hoof - 2004/Folder.jpg b/libresonic-main/src/test/resources/MEDIAS/Music2/_DIR_ chrome hoof - 2004/Folder.jpg new file mode 100644 index 00000000..3bdbd8b3 Binary files /dev/null and b/libresonic-main/src/test/resources/MEDIAS/Music2/_DIR_ chrome hoof - 2004/Folder.jpg differ diff --git a/libresonic-main/src/test/resources/org/libresonic/player/service/mediaScannerServiceTestCase/applicationContext-cache.xml b/libresonic-main/src/test/resources/org/libresonic/player/service/mediaScannerServiceTestCase/applicationContext-cache.xml new file mode 100644 index 00000000..da4c296a --- /dev/null +++ b/libresonic-main/src/test/resources/org/libresonic/player/service/mediaScannerServiceTestCase/applicationContext-cache.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/libresonic-main/src/test/resources/org/libresonic/player/service/mediaScannerServiceTestCase/applicationContext-service.xml b/libresonic-main/src/test/resources/org/libresonic/player/service/mediaScannerServiceTestCase/applicationContext-service.xml new file mode 100644 index 00000000..2d0b320f --- /dev/null +++ b/libresonic-main/src/test/resources/org/libresonic/player/service/mediaScannerServiceTestCase/applicationContext-service.xml @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +