Commit Graph
100 Commits
Author SHA1 Message Date
François-Xavier Thomas 6a14c256a5 Update index version following Lucene upgrade to 8.4.1
When upgrading from an existing index built with Lucene 8.2.0, Airsonic
fails to start with the following error:

    java.lang.IllegalArgumentException: Could not load codec 'Lucene80'.  Did you forget to add lucene-backward-codecs.jar?
      at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:420) ~[lucene-core-8.4.1.jar!/:8.4.1 832bf13dd9187095831caf69783179d41059d013 - ishan - 2020-01-10 13:35:00]
      ...
      at org.apache.lucene.search.SearcherManager.<init>(SearcherManager.java:125) ~[lucene-core-8.4.1.jar!/:8.4.1 832bf13dd9187095831caf69783179d41059d013 - ishan - 2020-01-10 13:35:00]
      at org.airsonic.player.service.search.IndexManager.getSearcher(IndexManager.java:309) ~[classes!/:10.6.0-SNAPSHOT]
      at org.airsonic.player.service.search.IndexManager.getStatistics(IndexManager.java:269) ~[classes!/:10.6.0-SNAPSHOT]
      at org.airsonic.player.service.MediaScannerService.neverScanned(MediaScannerService.java:121) ~[classes!/:10.6.0-SNAPSHOT]
      at org.airsonic.player.service.MediaScannerService.schedule(MediaScannerService.java:114) ~[classes!/:10.6.0-SNAPSHOT]
      at org.airsonic.player.service.MediaScannerService.init(MediaScannerService.java:77) ~[classes!/:10.6.0-SNAPSHOT]
2020-02-13 22:23:03 +01:00
François-Xavier ThomasandGitHub df668d8a28 Merge pull request #1505 from airsonic/dependabot/maven/org.fourthline.cling-cling-support-2.1.2
Bump cling-support from 2.0.1 to 2.1.2
2020-02-13 08:49:32 +01:00
François-Xavier Thomasandjvoisin 87c414dfc7 Also bump lucene-analyzers-common to 8.4.1 2020-02-13 07:23:41 +00:00
François-Xavier ThomasandGitHub e738fbc25f Merge pull request #1515 from airsonic/dependabot/maven/org.xmlunit-xmlunit-core-2.6.3
Bump xmlunit-core from 2.6.2 to 2.6.3
2020-02-12 23:11:29 +01:00
François-Xavier Thomasandjvoisin 73a06879b5 Internal help: Fix crash when no transcoders are installed 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 6a3d301517 Internal help: Add basic controller tests 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin bd4153962f Internal help: Add database server version 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 3acd06e91b Internal help: Fix crash with MariaDB and uppercase table names 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 09fa486bb0 Internal help: Only show db filesystem size for legacy profile 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 50b6da075e Internal help: Add 'more rows' indicator for inconsistent rows 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 6c54f1f7c8 Internal help: Refactor detailed db/index stats 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 9d3ec88796 Internal help: Support table stats for external dbs 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 1cde8accc7 Internal help: Add internationalization 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 6df42736e6 Internal help: Only show link if user is admin 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 55f9a41673 Internal help: Warn for potential db corruption issues 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 768968d075 Internal help: Add transcoding info 2020-02-12 21:41:47 +00:00
François-Xavier Thomasandjvoisin 7a27e08106 Add "internal help" page with diagnostic information 2020-02-12 21:41:47 +00:00
François-Xavier Thomas 77a95b0e86 Also bump seamless-util to 1.1.2 2020-02-12 21:56:24 +01:00
François-Xavier Thomas 73747db980 Also bump cling-core to 2.1.2 2020-02-12 21:54:24 +01:00
François-Xavier Thomas 8944368c24 Also bump xmlunit-matchers to 2.6.3 2020-02-12 21:51:49 +01:00
François-Xavier ThomasandGitHub dd1ac3b251 Merge pull request #1510 from airsonic/dependabot/maven/org.apache.maven.plugins-maven-assembly-plugin-3.2.0
Bump maven-assembly-plugin from 3.1.0 to 3.2.0
2020-02-11 21:05:49 +01:00
François-Xavier ThomasandGitHub ba0e6b00a0 Merge pull request #1491 from airsonic/dependabot/maven/org.mariadb.jdbc-mariadb-java-client-2.5.4
Bump mariadb-java-client from 2.1.2 to 2.5.4
2020-02-10 23:02:39 +01:00
François-Xavier ThomasandGitHub 2a088521c8 Merge pull request #1461 from fxthomas/1255-fix-missing-web-xml
Add empty web.xml to fix DWR warnings
2020-02-10 22:46:24 +01:00
François-Xavier ThomasandGitHub 6d0c8be354 Merge pull request #1489 from airsonic/dependabot/maven/org.jvnet.staxex-stax-ex-1.8.2
Bump stax-ex from 1.8.1 to 1.8.2
2020-02-10 22:45:36 +01:00
François-Xavier ThomasandGitHub 0c859475d2 Merge pull request #1492 from airsonic/dependabot/maven/org.apache.commons-commons-lang3-3.9
Bump commons-lang3 from 3.8.1 to 3.9
2020-02-10 22:34:08 +01:00
François-Xavier ThomasandGitHub 616788d799 Merge pull request #1493 from airsonic/dependabot/maven/org.eclipse.persistence-org.eclipse.persistence.moxy-2.7.6
Bump org.eclipse.persistence.moxy from 2.7.3 to 2.7.6
2020-02-10 22:33:58 +01:00
François-Xavier ThomasandGitHub cff2ed638f Merge pull request #1495 from airsonic/dependabot/maven/org.apache.maven-maven-artifact-3.6.3
Bump maven-artifact from 3.6.0 to 3.6.3
2020-02-10 22:33:44 +01:00
François-Xavier ThomasandGitHub f7df8b2555 Merge pull request #1496 from jvoisin/remove_jsonpath
Remove jsonpath
2020-02-10 22:30:05 +01:00
François-Xavier ThomasandGitHub dc5a3020d3 Merge pull request #1455 from jvoisin/fix_bold_submenu
Fix the boldness of the main submenu
2020-01-09 20:59:19 +01:00
François-Xavier Thomas 015c7c54be Avoid exceptions if Lucene index is not ready on first startup
If the library is large enough, Airsonic finishes loading the
application before the first (automatic) scan is completed. The
exception is then shown on the home page until the scan completes.

Fixes #1402
2020-01-09 20:56:18 +01:00
François-Xavier Thomas a3d9951102 Add empty web.xml in order to prevent DWR warnings
Fixes #1255
2020-01-07 23:26:47 +01:00
François-Xavier Thomas c900af9fa3 Avoid exceptions if database is not ready and fully migrated on first startup
In particular, this should fix an issue described in #884 (and
reproduced since), where Airsonic tries to access the database while
Liquibase has not finished running all the migrations.

    2020-01-07 23:00:26.697 ERROR --- o.a.p.service.PodcastService             : Failed to initialize PodcastService: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select id, url, title, description, image_url, status, error_message from podcast_channel]; nested exception is java.sql.SQLException: Table not found in statement [select id, url, title, description, image_url, status, error_message from podcast_channel]

    org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select id, url, title, description, image_url, status, error_message from podcast_channel]; nested exception is java.sql.SQLException: Table not found in statement [select id, url, title, description, image_url, status, error_message from podcast_channel]
            at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:230) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:654) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:688) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:720) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:730) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:780) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.airsonic.player.dao.AbstractDao.query(AbstractDao.java:93) ~[classes!/:10.6.0-SNAPSHOT]
            at org.airsonic.player.dao.PodcastDao.getAllChannels(PodcastDao.java:73) ~[classes!/:10.6.0-SNAPSHOT]
            at org.airsonic.player.dao.PodcastDao$$FastClassBySpringCGLIB$$9fcd2715.invoke(<generated>) ~[classes!/:10.6.0-SNAPSHOT]
            at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736) ~[spring-aop-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671) ~[spring-aop-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.airsonic.player.dao.PodcastDao$$EnhancerBySpringCGLIB$$b59c1dc5.getAllChannels(<generated>) ~[classes!/:10.6.0-SNAPSHOT]
            at org.airsonic.player.service.PodcastService.getAllChannels(PodcastService.java:185) ~[classes!/:10.6.0-SNAPSHOT]
            at org.airsonic.player.service.PodcastService.init(PodcastService.java:112) ~[classes!/:10.6.0-SNAPSHOT]
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
            at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
            at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:311) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:134) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1622) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:211) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:123) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
            at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:666) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
            at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:353) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:300) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
            at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:135) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
            at org.airsonic.player.Application.main(Application.java:207) ~[classes!/:10.6.0-SNAPSHOT]
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
            at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
            at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[airsonic.war:10.6.0-SNAPSHOT]
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[airsonic.war:10.6.0-SNAPSHOT]
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[airsonic.war:10.6.0-SNAPSHOT]
            at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) ~[airsonic.war:10.6.0-SNAPSHOT]
    Caused by: java.sql.SQLException: Table not found in statement [select id, url, title, description, image_url, status, error_message from podcast_channel]
            at org.hsqldb.jdbc.Util.throwError(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
            at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
            at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
            at org.springframework.jdbc.core.JdbcTemplate$SimplePreparedStatementCreator.createPreparedStatement(JdbcTemplate.java:1525) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
            ... 61 common frames omitted
2020-01-07 23:11:40 +01:00
François-Xavier Thomas d5f10e4c4c Turn off Airsonic banner during tests 2020-01-03 23:59:46 +01:00
François-Xavier Thomas a4118c1cf5 Suppress CVE-2019-12418 2020-01-03 23:59:28 +01:00
François-Xavier Thomas fa1fbb49dc Suppress CVE-2019-17563 2020-01-03 23:48:52 +01:00
François-Xavier Thomas 5bd841afb7 Change avatar storage column to bytea for PostgreSQL
In PostgreSQL, Liquibase maps the `blob` type to an `oid` column by
default[1]. That column type is not supported[2] very well when using
the `valueBlobFile` attribute, which expects a `bytea` column instead.

This was confirmed on all PostgreSQL versions starting from 9.6.

The `validCheckSum` attribute does not need to be updated since it was
already for the previous (binary_type, varchar_type) combination in
an unrelated commit (78a99d5860).

Fixes #1213.

[1] https://liquibase.jira.com/browse/CORE-1863
[2] https://github.com/liquibase/liquibase/pull/605
2020-01-03 19:42:47 +01:00
François-Xavier ThomasandGitHub 70de4c8f25 Merge pull request #1123 from eharris/seekable-transcodes
Change back to allow transcodes to allow seeking
2019-12-27 15:19:12 +01:00
François-Xavier Thomas d7c5e3ab60 Add 'add to play queue' actions to playlist pages (#1226) 2019-12-05 22:27:49 +01:00
François-Xavier ThomasandGitHub 2d30a37208 Merge pull request #1235 from tesshucom/improve-search-accuracy
Improve search accuracy
2019-12-03 21:17:42 +01:00
François-Xavier Thomas d4a26ed691 Merge remote-tracking branch 'prschopf/master' 2019-11-27 21:19:37 +01:00
François-Xavier ThomasandGitHub 0041fd7951 Merge pull request #1393 from muff1nman/pmd-with-source-refs
Add jxr plugin for pmd refs
2019-11-10 19:54:41 +01:00
François-Xavier ThomasandGitHub 821d8d6b8c Merge pull request #1387 from randomnicode/fixtestqueries
Fix test queries for limits
2019-11-02 14:46:20 +01:00
François-Xavier ThomasandGitHub b37cbf6617 Merge pull request #1359 from randomnicode/minorfixtostatictimeunit
Minor fix to static time unit call
2019-10-22 21:33:39 +02:00
François-Xavier ThomasandGitHub 320e2a7b77 Merge pull request #1352 from fxthomas/1333-allow-previous-migration-checksums-for-mariadb
Allow previous Liquibase migration checksums for MariaDB
2019-10-22 20:27:53 +02:00
François-Xavier Thomas 78a99d5860 Allow previous Liquibase migration checksums for MariaDB
If someone was using MariaDB before #1188, they were probably doing so
by using the MySQL JDBC driver to pass the migration (which had the
proper workarounds in place for some column types).

This commit assumes that the migrations done that way were valid and
produced the same result as running the MariaDB migrations after #1188.
2019-10-21 22:00:37 +02:00
François-Xavier ThomasandGitHub 2438044c5d Merge pull request #1265 from benferreri/master
Add discogs search link to main album page
2019-10-20 16:08:16 +02:00
François-Xavier Thomas 6b2c7e338d Remove white underline from player controls 2019-10-12 01:03:51 +02:00
François-Xavier Thomas 09808b170e Update dark icons for the 'groove' theme 2019-10-12 00:49:09 +02:00
François-Xavier Thomas 8b72964086 Display file id and path in debug scanning logs 2019-10-11 23:40:19 +02:00
François-Xavier ThomasandGitHub 2b73a82a88 Merge pull request #1254 from fxthomas/1160-fix-mejs-race-condition
Fix remaining race condition in media playback
2019-09-28 16:05:06 +02:00
François-Xavier Thomas 40ef5501ea Fix race condition in MediaElement.js (#685, #1160)
This commit is hopefully the final fix on Airsonic's side for #685.  It
also fixes #1160, which was caused by temporary workarounds introduced
in #1080 while we were looking for a solution.

The root cause of the issue is the fact that, when we go to the next
track in an Airsonic play queue, we change the media source in the
`ended` event.

In MEJS, this translates as the following two things:

* In Airsonic's 'ended' event, we change the media source (set the `src`
  attribute) and call the `load()` method, followed by the `play()`
  method.

* The 'ended' event was also used internally by the MEJS player, and
  one of these internal uses called the `pause()` method (presumably in
  order to make sure that playback was stopped on some media renderers).

Unfortunately, the order in which these events are called depends (in
all modern browsers) on the order in which they are registered.

In our case, the first one is registered inside the `<body>` tag, but
the second one is registered with `$(document).ready(...)`. This means
that the first event handler is called before the second.

This means that, in some cases (when we're unlucky, hence the seemingly
random nature of the bug), `pause()` is called after `load()`
but before the media has finished loading.

Apparently, this causes the `AbortError: The fetching process for the
media resource was aborted by the user agent at the user's request.`
message to appear (which indicates exactly what's described in the last
paragraph), and the playback of the next song is aborted.
2019-09-22 18:48:21 +02:00
François-Xavier ThomasandGitHub c834bde48b Merge pull request #1080 from fxthomas/try-to-fix-playback-intermittent-stops
Fix remaining issues with playback stopping intermittently
2019-07-03 01:04:47 +02:00
François-Xavier Thomas 073b7e35e1 Add simple test cases for internet radios 2019-07-02 23:00:03 +02:00
François-Xavier Thomas 86510a4d42 Use the clear action to stop the internet radio 2019-07-02 23:00:03 +02:00
François-Xavier Thomas 19082afc11 Mark cached internet radio sources as a final variable 2019-07-02 23:00:03 +02:00
François-Xavier Thomas 53b174a8f4 Follow HTTP redirects when loading internet radio playlists 2019-07-02 23:00:03 +02:00
François-Xavier Thomas 9ff5536d9b Do not try to load radio playlists in the browser when clicking on a radio 2019-07-02 23:00:03 +02:00
François-Xavier Thomas 760a6e957a Limit the amount of data we parse from remote internet radio playlists 2019-07-02 23:00:03 +02:00
François-Xavier Thomas afa037611d Show an error is an internet radio has no sources to load 2019-07-02 23:00:03 +02:00
François-Xavier Thomas 5cb9b6c029 Hide play queue actions while playing internet radios 2019-07-02 23:00:01 +02:00
François-Xavier Thomas b1185601d5 Tweak logging for internet radio playlists 2019-07-02 22:25:19 +02:00
François-Xavier Thomas aeabfa1044 Add internet radio source cache
This helps us avoid loading and parsing the external playlists each time
we try to load an internet radio.
2019-07-02 22:25:19 +02:00
François-Xavier Thomas cab3f60a25 Refactor internet radio loading into a service 2019-07-02 22:25:19 +02:00
François-Xavier Thomas 02d373d9ec Play internet radios in MediaElement (fix #408)
This allows the user to control playback for the internet radios, which
were previously started outside of the main player without any
possibility for direct control.
2019-07-02 22:25:19 +02:00
François-Xavier Thomas 2e0134259d Try to show a progress bar in the media player
This commit is kind of a hack to force MediaElement.js to show a
progress bar when we are loading a song.

Normally, in vanilla HTML5 MediaElement, we'd explicitely call 'play()'
when loading a song. Here, we cannot ensure playback will work well if
we don't wait for the 'canplay' event to be fired, but the progress bar
won't show up without 'play()'...

This commit emits a fake 'waiting' event to let the MEJS know that it
should update the UI.
2019-07-02 22:23:01 +02:00
François-Xavier Thomas 5a72322772 Work around play queue not going to the next song automatically
This commit works around a race caused by some of our JS code trying to
run play() for the next song while the MEJS player is still cleaning up
the last song.

MEJS issue: https://github.com/mediaelement/mediaelement/issues/2650
2019-07-02 22:21:30 +02:00
François-Xavier Thomas f57ad3f27b Fix typo in anonymous user name (#663) 2019-04-29 23:30:02 +02:00
François-Xavier Thomas 8a90d9f77b Add system properties for persisting the 'remember me' key
This adds the 'airsonic.rememberMeKey' system property (can be set from
command-line with `-Dairsonic.rememberMeKey=<value>`) as well as a
'RememberMeKey' setting in airsonic.properties, so that the key used for
generating 'remember me' tokens can be persisted across server restarts.

It also adds a default, insecure key in case we are running in
development mode with the 'airsonic.development' property set.
2019-04-28 16:51:46 +02:00
François-Xavier Thomas 820a4faec2 Avoid logging sensitive URL parameters in the Subsonic API
In case of exceptions, Airsonic logs the full URL that triggered it
since 417583cc, including possibly sensitive query parameters such as
the authentication password/tokens passed to the Subsonic API.

This replaces the value set for this parameter in the URL by the
"<hidden>" string.
2019-04-26 22:18:23 +02:00
François-Xavier Thomas d9f164499f Fix cancel button colors in 'Groove' dark theme 2019-04-22 15:15:36 +02:00
François-Xavier Thomas 3f4a49c95a Fix dependency error with org.eclipse.jetty.jetty
This is only used by reflection, and should be provided by the servlet
container (Tomcat or Jetty).
2019-04-02 22:14:03 +02:00
François-Xavier Thomas 51b738053f Make it work even if Tomcat-specific exceptions are not available
When Tomcat is not available (for example, when using Jetty), the
ClientAbortException is not available either, causing an error when
starting the server.

This commit fixes that, and instead catches that exception (or its Jetty
equivalent) via reflection.
2019-04-02 21:23:47 +02:00
François-Xavier Thomas ec96b9711d Show more informative messages while streaming
When streaming, log messages now show the URL and IP of the originating
request, so that it's easier to determine what client is listening to
something on the server.
2019-04-02 21:22:44 +02:00
François-Xavier Thomas 417583ccaa Do not show stack trace for client-side connection errors
The `ClientAbortException` exception indicates that the connection was
closed by the client, usually for something the server can do nothing
about (e.g. navigating outside of the page while it's loading).

Since this error happens often, this commit displays shorter error
messages when it does, without a large stack trace.

All other exceptions are handled just as before.
2019-04-02 21:20:40 +02:00
François-Xavier Thomas bcc5f8d7a6 Fix StringIndexOutOfBounds errors thrown by DWR/YUI 2019-03-28 22:08:26 +01:00
François-Xavier Thomas 2c1b5205e8 Write new db maintenance logs as 'debug' instead of 'info' 2019-03-16 17:32:00 +01:00
François-Xavier Thomas 7510b04efc Make checkpoint() method void (return value is not used) 2019-03-16 17:29:00 +01:00
François-Xavier Thomas 8c46d39569 Do not log message about hsqldb-defrag migration on each launch
The FILES DEFRAG / FILES LOG SIZE properties are kept when upgrading to
2.x; it's enough that they were set once on 1.8. For new installations
the migration will still run with the correct SQL statements.
2019-03-10 20:53:56 +01:00
François-Xavier Thomas b753e48632 Log more information when running the 'cleanup db' action 2019-03-09 13:33:59 +01:00
François-Xavier Thomas 76e8abd219 Move HSQLDB checkpoint/shutdown to a bean specific to the legacy profile 2019-03-09 13:33:59 +01:00
François-Xavier Thomas b88bdb37c9 Properly shutdown embedded HSQLDB database on exit 2019-03-08 23:48:32 +01:00
François-Xavier Thomas 54e444b03c Make CHECKPOINT / DEFRAG syntax work for both HSQLDB 1 & 2 2019-03-08 22:40:05 +01:00
François-Xavier Thomas c0f3606091 Force database checkpoints on 'Clean-up' and 'Scan' actions
This will only affect the (embedded/legacy) HSQLDB driver. Even though
cff97ea9 should prevent the db log from getting uncontrollably large,
the 'Clean-up database' and 'Scan' actions will additionally force a
checkpoint to ensure this happens on big operations.
2019-03-08 22:40:05 +01:00
François-Xavier Thomas d6ba6de7e1 Run a first defrag before enabling auto defrag on HSQLDB 2019-01-09 22:27:40 +01:00
François-Xavier Thomas 21eff917b6 PlayQueue: Fix broken keyboard shortcuts
Using the "space" key to resume playback, as well as +/- to
increase/decrease volume, were not working properly.
2019-01-09 21:28:40 +01:00
François-Xavier Thomas cff97ea9be Fix #778: Defragment embedded HSQLDB database more frequently 2019-01-03 20:47:15 +01:00
François-Xavier ThomasandJonas L caa1dac3a2 Use dark media player theme on groove theme (#777) 2018-08-09 22:41:58 +02:00
François-Xavier Thomas b3f432a545 Issue #164: Add tests for reading MusicBrainz release tags 2018-05-22 23:33:27 +02:00
François-Xavier Thomas c76a92746d Issue #164: Show link to MusicBrainz release on album pages 2018-05-22 23:17:33 +02:00
François-Xavier Thomas b9be3fef1d REST: Avoid Lucene crashes when searching for 0 documents 2017-05-17 00:26:48 +02:00
François-Xavier Thomas 1a12976c72 Fix status page crash 2017-02-11 01:25:53 +01:00
François-Xavier Thomas 4316292ce7 Fix replaced CSRF token for shuffle radio
For convenience, shuffle radio filters were saved and restored when
loading the `more.view` page. This also happened for the `_csrf` field,
which caused it to take an old and invalid value.
2017-02-11 00:55:32 +01:00
François-Xavier Thomas 6b81f0f6d5 Fix: Allow POST method for db.view form 2017-02-09 23:48:12 +01:00
François-Xavier Thomas 4efa7ccbf6 Doc: Add warning about HAProxy 1.7 2017-02-03 00:27:36 +01:00
François-Xavier Thomas fedcddc060 Doc: Fix haproxy documentation (#242) 2017-02-02 22:42:14 +01:00
François-Xavier Thomas 7326378f0a Tweak Tomcat performance
This commit does the following things :

* Increase Tomcat resource cache size to be able to actually store
  something in there.
* Increase Tomcat resource cache TTL to avoid costly evictions
* Put Jasper in production mode to avoid recompiling JSPs
2017-01-17 21:27:48 +01:00
François-Xavier Thomas cd348fe21e Fix typo in 'next song' keyboard shortcut help 2016-12-23 21:41:01 +01:00
François-Xavier Thomas df345f0342 Hide cover art overflows again when needed 2016-12-23 21:40:52 +01:00
François-Xavier Thomas 22fe408818 Migrate random play queues to Spring 4 2016-12-14 12:05:31 +01:00
François-Xavier Thomas 6d8df63a7e Implement shuffle radio feature (#145) 2016-12-11 15:18:15 +01:00