Commit Graph
571 Commits
Author SHA1 Message Date
jvoisinandjvoisin 584ee96f61 Replace wz_toolip with jquery-ui 2020-02-13 20:39:43 +00: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 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
jvoisin faa4973738 Remove jsonpath 2020-02-08 15:42:27 +01:00
jvoisin c6eed14db5 Catch Exceptions instead of only Throwables in JAudiotaggerParser
Since JAudioTagger isn't the rock-solidest software
in the world, we should catch as much things as possible
2020-02-02 18:26:17 +01:00
jvoisinandGitHub a13552b6f5 Clean up a bit the jaudiotagger wrapper
- ID3v24 are now fully supported by jaudiotagger,
  there is no need to have special code to handle
  them
- Inline a couple of one-line'n'useless methods
- Replace isImageAvailable with getArtwork
- Make some methods static
- Specialise some exceptions
2020-02-01 12:55:29 +00:00
Andrew DeMaria 03a607d659 Merge remote-tracking branch 'origin/pr/1468' 2020-01-27 21:05:44 -07:00
Andrew DeMaria 165701bcdc Merge remote-tracking branch 'origin/pr/1466' 2020-01-27 21:00:48 -07:00
Randomnicodeandjvoisin a6a0327b97 Set limit in random track query itself instead of in connection to optimize query plan
This is a direct backport of
https://github.com/airsonic-advanced/airsonic-advanced/commit/f84644ae3df80fe4918844b62035b6bffeeed824
2020-01-12 21:20:49 +01:00
Andrew DeMaria 64fad6a4c5 Merge remote-tracking branch 'origin/pr/1465' 2020-01-11 16:11:54 -07:00
Andrew DeMaria eafb128138 Merge remote-tracking branch 'origin/pr/1464' 2020-01-11 16:11:23 -07:00
Andrew DeMaria 8af5541792 Merge remote-tracking branch 'origin/pr/1463' 2020-01-11 16:10:01 -07:00
Andrew DeMaria e7ded45009 Merge remote-tracking branch 'origin/pr/1459' 2020-01-11 16:07:52 -07:00
jvoisin d4002ef6ce Fix two possible nullptr deref 2020-01-11 11:27:35 +01:00
jvoisin e4d58e434a Please checkstyle 2020-01-11 11:14:19 +01:00
jvoisin 43ab59807a Make a couple of inner classes static
This might marginally improve the memory consumption,
but the main goal here is to make the code separation
between inner and outer class explicit.
2020-01-11 11:11:20 +01:00
jvoisin 13c73cc2dc Remove use of raw types
Make use of parametrised types where possible,
to please the java compiler and to make it easier
to find potential issues.
2020-01-11 10:59:48 +01:00
jvoisin 4d52a9cc62 Minor simplification of UrlTag
- Remove yet an other custom implementation of Pair
- Make a method static
2020-01-11 10:27:43 +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
jvoisin 0e8056c06a Minor refactoring in theme resolver
This should please our beloved static analysers,
and speed up by _at least_ 0.2ms the themes
selector loading time!
2020-01-05 21:40:19 +01:00
jvoisin 2a7e3cb846 Fix the boldness of the main submenu
This should close #1424
2020-01-05 17:02:44 +01:00
Andrew DeMaria 27c174a4d6 Merge remote-tracking branch 'origin/pr/1452' 2020-01-04 11:23:47 -07:00
François-Xavier Thomas d5f10e4c4c Turn off Airsonic banner during tests 2020-01-03 23:59:46 +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
Evan Harris 1e21967303 Fix checkstyle issues for merge 2019-12-16 22:04:02 -06:00
Evan Harris a6cdba4a44 Added a warning if stream output exceeds predicted size 2019-12-16 22:04:02 -06:00
Evan Harris 6cfbe0ff88 Moved expected content length calculation to TranscodingService 2019-12-16 22:04:01 -06:00
Evan Harris b28ffb0d1a Added isRangeAllowed() function for transcoded sources
This isn't a perfect solution, but it should help increase confidence
that the transcoder in use is likely to produce an approximately
correct-sized stream.
2019-12-16 22:04:01 -06:00
Evan Harris e691c80774 Change back to allow transcodes to allow seeking
This switches back to allowing range rather than chunked requests so that
seeking works in the web player, but does so by safer means than previous
solutions, by slightly over-estimating the transcoded size, then sending
dummy bytes to the client to fill any gap.  Fixes #1117.  Addresses #685.
2019-12-16 22:03:44 -06:00
Andrew DeMaria 2f75254010 Merge remote-tracking branch 'origin/pr/1433' 2019-12-08 13:50:48 -07:00
Evan Harris ac45a9b7dc Added checkstyles for brace placement 2019-12-06 03:19:49 -06:00
Evan Harris 510314a9d8 Added SingleSpaceSeparator checkstyle 2019-12-06 03:14:19 -06:00
Evan Harris f476fd7c33 Added checkstyle for trailing whitespace 2019-12-06 03:10:06 -06:00
François-Xavier Thomas d7c5e3ab60 Add 'add to play queue' actions to playlist pages (#1226) 2019-12-05 22:27:49 +01:00
tesshucom dba8610ff7 Apply stopwords dedicated to music search
- Iterate index version.
2019-12-04 02:08:59 +09:00