Commit Graph

1619 Commits

Author SHA1 Message Date
casey langen
e0bfe2c987 Added some more error-checking around the HttpServer's range header to
ensure we don't try to read invalid offsets.
2017-11-28 09:51:06 -08:00
casey langen
d8b0aef307 Fixed a bug in HttpServer where the byte range response header's "to"
field may be larger than the size.
2017-11-28 01:35:51 -08:00
casey langen
fb869e27b3 A few spotlight tweaks after testing on physical hardware. 2017-11-27 19:25:28 -08:00
casey langen
a6d0f1d351 Added a spotlight feature that shows the user how to switch between
remote and streaming mode. Also updated GaplessHeaderService to require
less bandwidth, with more error checking.
2017-11-27 19:15:45 -08:00
casey langen
bbc6dda144 re-enable auth; things are stable now 2017-11-26 23:59:36 -08:00
casey langen
19db8456c8 Fleshed out GaplessHeaderService (and DAO/DB friends). Tracks downloaded
via realtime transcoder are now patched up after-the-fact, so subsequent
plays are gapless.  Also added a new, custom version of
AndroidVideoCache that supports receiving response headers.
2017-11-26 23:43:53 -08:00
casey langen
33d3c1544c More improvements to dependency injection -- databases and more service
related things are injected with correct scoping rules. Removed
remaining static state from Application subclass.
2017-11-26 15:46:51 -08:00
casey langen
5d9e24019d Fixed Linux (and hopefully macOS) compile and linker errors. 2017-11-25 23:31:19 -08:00
casey langen
1a15e084c7 Major surgery to websocket_remote:
- Renamed websocket_remote plugin to "server"
- Added IEncoder, IEncoderFactory interfaces to SDK. Updated
IEnvironment and related plumbing; plugins can now declare encoders and
other plugins can request instances through the SDK.
- Removed LAME encoding from websocket_server plugin, created new
stockencoders plugin that includes both LAME and Ogg Vorbis encoders.
- Moved to dynamic libraries for ogg, vorbis, libvorbis so it can be
shared between encoding and decoding plugins.
- Plumbing for new "format" URL param through HttpServer, Transcoder,
and TranscodingDataStream. Use new IEncoder functionality to deal with
on-the-fly re-encoding
2017-11-25 23:06:29 -08:00
casey langen
0a6851544e Added the ability to select playback engine (ExoPlayer, ExoPlayer
Gapless, or MediaPlayer).
2017-11-21 14:31:07 -08:00
casey langen
b065751b0a Initial work to support ExoPlayer gapless playback. 2017-11-21 11:58:44 -08:00
casey langen
4340de3c57 Fixed a race condition (that generally only shows up in the debugger) --
need to use a ReplaySubject instead of a PublishSubject in case the
result comes back before the subscribe.
2017-11-21 11:57:57 -08:00
casey langen
a932c34b9d Upgraded to ExoPlayer 2.5.4 and Android Studio 3.0.1 2017-11-21 11:57:57 -08:00
casey langen
93f1980b77 Added context menu to PlayQueueActivity and PlayQueueAdapter. 2017-11-21 11:57:57 -08:00
casey langen
a573265092 More context menu handling fixes. Lots of cross linkage! 2017-11-21 11:57:57 -08:00
casey langen
c41e89367c Fixed volume up / down key not working for remote playback, caused by
recent refactors.
2017-11-21 11:57:57 -08:00
casey langen
eeafa9d7e8 Cleaned up, and (mostly) finished new context menus for tracks, artists,
albums, genres, and playlists. Also fixed a messed up string.
2017-11-21 11:57:57 -08:00
casey langen
584c41cc1a Resource and prefs cleanups. 2017-11-21 11:57:56 -08:00
casey langen
b6fd556fcf Added the ability to create playlists in the Android app. 2017-11-21 11:57:56 -08:00
casey langen
8534225c55 Added a playlist list specific context menu, which allows the user to
delete the selected playlist, or play it immediately.
2017-11-21 11:57:56 -08:00
casey langen
6573194dac Intermediate commit with a bunch of important changes:
1. Renamed "Components" to "Mixins" to avoid confusion with Dagger
2. Implemented a bunch of mixins -- DataProviderMixin,
ItemContextMenuMixin, PlaybackMixin, RunnerMixin, ViewModelMixin to
modularize functionality and slim down base classes
3. Started implementing new context menu for browsing predicated
categories
4. Some other general cleanup -- more properties instead of methods,
function expressions, etc
2017-11-21 11:57:56 -08:00
casey langen
b950ae0259 Added a super simple, bare-bones component system. We'll use this to
swap functionality at runtime in the near future. Or not, and we'll end
up removing it.
2017-11-21 11:57:56 -08:00
casey langen
4edd5476a3 Restructured package layout to be more scalable. 2017-11-21 11:57:56 -08:00
casey langen
9d3e87f32e Some versions of the Android OS seem to have problems redrawing the lock
screen if the media session is updated too quickly. Installed a
debouncer to ensure we only ever update, at most, twice a second.
2017-11-21 11:57:56 -08:00
casey langen
35c3e4b534 Load album art from the musikcube server by default, if thumbnails
exist. Otherwise farm out to lastfm.
2017-11-21 11:57:56 -08:00
casey langen
850664a519 Removed AlbumArtModel in favor of AlbumArtLookup utility module and a
custom OkHttp interceptor to automatically redirect to the requested
resource. This simplifies a number of interactions related to loading
(and preloading) album art. The changes also ensure we don't make
duplicate requests against the backend unless necessary.
2017-11-21 11:57:56 -08:00
casey langen
328911d868 Fixed Glide to inject auth headers when requesting album art against a
musikcube server.
2017-11-21 11:57:56 -08:00
casey langen
1d7e97005e Upgraded to Glide v4 from Glide v3. Also, added some accessor methods
for track and album thumbnail ids.
2017-11-21 11:57:56 -08:00
casey langen
93156e99aa Updated build dependencies, and also switched to a new fastscroller
library for RecyclerView that seems to work more smoothly on older
devices. Also, the implementation of it seems pretty simple, and should
be relatively easy to debug if problems arise.
2017-11-21 11:57:56 -08:00
casey langen
5ce66d22a0 Updated WebSocketService.observe() to use a PublishSubject to (1) make
things easier to follow, and (2) allow for subscription and observation
on background threads.
2017-11-21 11:57:56 -08:00
casey langen
633bed9034 Added Android implementation for query_tracks_by_external_ids 2017-11-21 11:57:56 -08:00
casey langen
2c1dc1006d * Added the ability to create and append to playlists using external IDs.
* Added the ability to remove tracks from playlists
2017-11-21 11:57:56 -08:00
casey langen
9f865eeec0 Added createPlaylist(), renamePlaylist(), and deletePlaylist()
functionality to IDataProvider and RemoteDataProvider
2017-11-21 11:57:56 -08:00
casey langen
aba807b00f Added IDataProvider.appendToPlaylist() 2017-11-21 11:57:55 -08:00
casey langen
a2fa7cd890 Repaired album filtering. 2017-11-21 11:57:55 -08:00
casey langen
71ae2831d9 BaseActivity naming and property cleanup 2017-11-21 11:57:55 -08:00
casey langen
5c71000bcc Cleaned up PlaybackService interface to expose the currently playing
ITrack, instead of the awkward getPlayingString() and getPlayingLong()
methods.
2017-11-21 11:57:55 -08:00
casey langen
c62daae9d5 Removed some junk, cleaned up some method names. 2017-11-21 11:57:55 -08:00
casey langen
1d51882036 Experimental changes migrating data access to an Observable layer,
implemented using RxJava.

Also experimental changes to Dagger 2 implementation, trying to make it
more idiomatic based on current "best practices."

No idea if any of this will actually get merged back.
2017-11-21 11:57:55 -08:00
casey langen
ee22b5f6f6 OK, now gapless transcoding should work for reals. 2017-11-21 11:57:19 -08:00
casey langen
e85f40bdec Updated TranscodingDataStream to be more gapless friendly. 2017-11-21 00:32:59 -08:00
casey langen
3e3af3c6d2 A bit of naming cleanup -- implementation details were leaking into the
API.
2017-11-19 13:02:08 -08:00
casey langen
1f8f40f0a3 Revert "Added support for artist and artistId (in addition to albumArtist,"
This reverts commit 9a8f486658.
2017-11-19 01:59:43 -08:00
casey langen
6e05c5f728 Whoa. Fixed a super old bug in
WebSocketService::RespondWithInvalidRequest where the message type was
not properly formed.
2017-11-19 01:08:48 -08:00
casey langen
9a8f486658 Added support for artist and artistId (in addition to albumArtist,
albumArtistId) in album resource type response.
2017-11-19 00:46:55 -08:00
casey langen
48841bce98 Added basic predicated category queries, like "all albums for genre X"
or "all genres for artist Y".
2017-11-17 21:43:09 -08:00
casey langen
e9468cd911 Fixed clang/gcc compile. 2017-11-12 22:16:34 -08:00
casey langen
41f1020ac9 HttpServer audio and thumbnail lookups explicitly only support GET -- I
think we were doing some unnecessary process with HEAD (and potentially
OPTIONS) requests.
2017-11-12 20:48:15 -08:00
casey langen
2f7fa348bf Fixed thumbnail HTTP response status code in HttpServer. 2017-11-12 01:41:49 -08:00
casey langen
68370ded14 Added some blanket exception handling and error logging to
LocalSimpleDataProvider. This sort of code is generally bad practice,
but this will help prevent unstable plugins from causing the app to
crash.
2017-11-08 21:13:49 -08:00