Commit Graph
1388 Commits
Author SHA1 Message Date
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
Evan Harris a85642c797 Merge branch 'origin/pr/1248' 2019-09-21 18:48:44 -05:00
jvoisin bc832d0034 Use a constant for encoding
Replace string.getBytes("UTF-8") with
string.getBytes(CONSTANT).
2019-09-21 18:16:40 +02:00
frankdelange 1e7cbcc190 Upgrade jackson-* to 2.10.0.pr3 to fix CVE-2019-16335, CVE-2019-14540 2019-09-20 12:46:06 +02:00
Evan Harris 117e8c7fd1 Improve transcoder info text and formatting 2019-09-20 03:59:14 -05:00
jvoisinandGitHub 3d8f3ed21d Gracefully handle failed version check attempts
This issue what found by darkling, and reported on irc
2019-09-19 19:54:58 +00:00
jvoisin 53d835e6ed Make the logout icon/image cliquable
This should close #1178
2019-09-19 20:49:45 +02:00
Evan HarrisandAndrew DeMaria b02fd9ad6c Change integration tests from parallel to single
This is an attempt to make the Travis CI integration tests more reliable,
and changes from parallel to single forking mode.
This is a temporary measure until cucumber-jvm-parallel-plugin (which is no
longer supported) is ripped out (see #1240)

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-09-18 22:23:51 -06:00
Evan Harris d4aff1dca5 Added checkstyle to prohibit windows line endings
Suggestion taken from jvoisin in #1121.
2019-09-13 13:11:01 -05:00
tesshucomandAndrew DeMaria 5c3c558923 Update Lucene from 3.0.3 to the current version 8.2.0
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-09-12 16:33:44 -06:00
SidandAndrew DeMaria 8e279a2d2a Fix to clean up docker instance on RunTimeException in Integration Tests
Signed-off-by: Sid <shyamindra@gmail.com>
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-09-10 14:44:10 -06:00
CeledhrimandAndrew DeMaria c16fa9d159 Update db-changelog.xml to support mariadb
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-09-10 14:22:43 -06:00
jvoisinandAndrew DeMaria c6540d707e Simplify a bit the annotations
There is no need to specify `value` every single time

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-09-10 13:51:35 -06:00
jvoisinandEvan Harris eb4c5a04ff Make the systemd unit compatible with tomcat9
- Use ReadWritePaths by default, since it doesn't
  cause any harm
- Rephrase the ProtectSystem comment, to make it more clear
- Fix verbs in a comment
2019-09-03 04:54:43 -05:00
Evan Harris 83ca97e21c Improve error handling for jaudiotaggerParser artwork fetch 2019-09-01 13:24:26 -05:00
jvoisin 6f57c6e313 Remove an unused/unuseable/half-done cache 2019-09-01 18:11:48 +02:00
jvoisin 46d806df1d Fix two issues found by LGTM 2019-09-01 18:11:48 +02:00
jvoisin c0fa01206a Ignore yet an other jackson vulnerability 2019-09-01 18:11:48 +02:00
jvoisinandGitHub e085d77635 Remove use useless arrays creation 2019-09-01 15:16:14 +00:00
Evan Harris 4679bac08d Added handling for LyricsService ConnectTimeoutException 2019-08-31 08:44:25 -05:00
Evan Harris 73768b94ea Handle Lyrics fetch HttpResponseException
Also marked 503 error as retryable and added log message for socket error
2019-08-31 08:44:10 -05:00
Shen-Ta Hsieh 394dfa1ce7 upgrade jackson-databind and commons-beanutils for CVEs
Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com>
2019-08-31 15:40:59 +08:00
Shen-Ta Hsieh 16c1e42b97 normalize license expire date to prevent outstanding value on Java 12
Date(Long.MAX_VALUE) is 292278994-08-17T07:12:55.807Z on Java 12, and
make Ultrasonic failed to parse.

Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com>
2019-08-31 10:11:30 +08:00
Evan Harris 6e8ae8971c Enable checkstyle OverloadMethodsDeclarationOrder 2019-08-16 18:08:42 -05:00
Evan Harris 1acfacb4c6 Enable checkstyle FileTabCharacter 2019-08-15 18:40:04 -05:00
Evan Harrisandjvoisin 16039d5e81 Enable checkstyle UniqueProperties 2019-08-15 22:07:53 +00:00
Evan Harrisandjvoisin fcc68febc8 Enable several more code checkstyles 2019-08-15 22:07:32 +00:00
Evan Harrisandjvoisin 389db3f1b4 Enable checkstyle for simple boolean expressions 2019-08-11 20:10:06 +00:00
Evan Harrisandjvoisin f738819625 Enable additional checkstyles for whitespace
* Enable checkstyle WhitespaceAround
* Enable checkstyle NoWhitespaceBefore
* Enable checkstyle MethodParamPad
2019-08-11 20:09:40 +00:00
Evan Harrisandjvoisin 86a5b8708d Enable checkstyle OneStatementPerLine 2019-08-08 21:26:01 +00:00
Evan Harrisandjvoisin 153ad19b6b Enable several more checkstyle modules
* Enable checkstyle ParenPadCheck
* Enable checkstyle EmptyLineSeparator
* Enable checkstyle TypecastParenPad
2019-08-07 22:46:10 +00:00
jvoisinandGitHub 7578ee9537 Enable checkstyle's Indentation module 2019-08-07 20:13:29 +00:00
jvoisinandGitHub fabed228da Enable EqualsAvoidNull in checkstyle 2019-08-07 19:12:04 +00:00
Evan Harrisandjvoisin 3c5735e03e Fix null exception when creating a new podcast channel
Until the podcast channel has been updated to provide it with a title, there
is no point to doing any further processing since the directory where episodes
are stored is derived from the title.

While this change is unrelated to #176, it fixes the traceback shown in that
issue.
2019-08-07 09:14:18 +00:00
jvoisin 49c6e89f73 Ignore CVE-2019-14439 too 2019-08-07 02:09:52 +02:00
jvoisin 8260fed1b3 Ignore CVE-2019-14379 2019-08-07 01:57:54 +02:00
jvoisin b650ac70d6 Temporarily skip a test
Based on tesshucom's #1192
2019-08-07 01:52:17 +02:00
jvoisinandGitHub 9a5f3f9483 Replace a now-defunct maven repo with a working one 2019-08-04 21:02:51 +00:00
jvoisin 4a85cdbc7a Sort the checkstyle modules 2019-08-01 10:46:26 +02:00
jvoisin 0d6ed81b83 Add a check for InnerAssignment in checkstyle.xml 2019-08-01 10:36:51 +02:00
jvoisin ba9d3ff539 Remove an empty statement 2019-08-01 10:30:26 +02:00
jvoisin 61c8fbc5e2 Add more style checks 2019-08-01 10:21:54 +02:00
jvoisin 10b41160c0 Enabled StringLiteralEquality in CheckStyle 2019-07-31 00:26:58 +02:00
jvoisin 167d1d9c20 Enable EqualsHashCode in CheckStyle 2019-07-31 00:23:18 +02:00
jvoisinandGitHub 8ba97026a4 Synchronize on activeAudioPlayers when changing them 2019-07-27 16:28:51 +00:00
Andrew DeMariaandjvoisin e7bd5da6fa Precompile jsp
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
2019-07-27 16:25:59 +00:00
tesshucomandAndrew DeMaria ff08f6dd02 Fix #1139 2019-07-25 19:26:01 -06:00
Evan Harris 093f7c028d Fix podcast download issues
Some podcast feeds use circular redirects (with query parameters).
Fixes #1013
Avoids HttpClient cookie handling producing "Invalid cookie" errors due to
not handling latest "expires" attribute formats.
2019-07-24 23:30:40 -05:00
jvoisin d256386cbb Use titles in some <img> tags 2019-07-22 22:49:11 +02:00