Very good mod
But i get fail in the log with lots of files:
ERROR MediaScannerService - Failed to Update Album for file: /mnt/music/andet/you are.mp3
org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into album (id, path, name, SetName, artist, albumartist, song_count, duration_seconds, cover_art_path, play_count, last_played, comment, created, last_scanned, present, mediaFileId, genre, year) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; Attempt to insert null into a non-nullable column: column: NAME table: ALBUM in statement [insert into album (id, path, name, SetName, artist, albumartist, song_count, duration_seconds, cover_art_path, play_count, last_played, comment, created, last_scanned, present, mediaFileId, genre, year) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is java.sql.SQLException: Attempt to insert null into a non-nullable column: column: NAME table: ALBUM in statement [insert into album (id, path, name, SetName, artist, albumartist, song_count, duration_seconds, cover_art_path, play_count, last_played, comment, created, last_scanned, present, mediaFileId, genre, year) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:792)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:850)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:858)
at net.sourceforge.subsonic.dao.AbstractDao.update(AbstractDao.java:71)
at net.sourceforge.subsonic.dao.AlbumDao.createOrUpdateAlbum(AlbumDao.java:155)
at net.sourceforge.subsonic.service.MediaScannerService.updateAlbum(MediaScannerService.java:327)
at net.sourceforge.subsonic.service.MediaScannerService.scanFile(MediaScannerService.java:234)
at net.sourceforge.subsonic.service.MediaScannerService.scanFile(MediaScannerService.java:219)
at net.sourceforge.subsonic.service.MediaScannerService.doScanLibrary(MediaScannerService.java:170)
at net.sourceforge.subsonic.service.MediaScannerService.access$000(MediaScannerService.java:47)
at net.sourceforge.subsonic.service.MediaScannerService$2.run(MediaScannerService.java:146)
Caused by: java.sql.SQLException: Attempt to insert null into a non-nullable column: column: NAME table: ALBUM in statement [insert into album (id, path, name, SetName, artist, albumartist, song_count, duration_seconds, cover_art_path, play_count, last_played, comment, created, last_scanned, present, mediaFileId, genre, year) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:798)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
... 11 more
There also a little problem with the Statistics it dont show the right number of files