Commit Graph

1729 Commits

Author SHA1 Message Date
casey langen
47dc8d836b Fix SystemService crashes on Oreo devices. 2018-02-21 18:13:15 -08:00
casey langen
afb061aaf4 Ensure PlaybackService gets destroyed before the Library instance --
otherwise the play queue will not be serialized properly on exit.
2018-02-20 00:35:03 -08:00
casey langen
59fe25ec2d - Fixed the win32 build script
- Don't restore playback session if the setting is disabled
2018-02-20 00:28:11 -08:00
casey langen
c0284e2f82 Version bump for musikdroid release. 2018-02-19 23:49:34 -08:00
casey langen
9c0695c7ab Made SaveSettingsOnExit enabled by default now that it seems stable. 2018-02-19 23:48:31 -08:00
casey langen
a1cc7c5422 Addded a new setting to musikdroid that allows automatic playback
transfer from client to server when a headset is disconnected.
2018-02-19 14:40:24 -08:00
casey langen
15c59437cd Moved play context saving/restoration to core library, and run it
automatically in PlaybackService ctor/dtor. Also, updated
PlaybackService to allow for custom transports, but initialize itself
with a MasterTransport if one is not specified. This simplifies things
in the app-layer.
2018-02-19 12:08:19 -08:00
Casey Langen
504d7ec70b Re-arrange play context load/save to happen in the main app setup,
before views are created or the indexer is kicked off -- this makes the
app appear more quickly.
2018-02-18 22:19:00 -08:00
casey langen
dbd15acd0c Updated sqlite to v3.22.0. Previous version was more than a year and a
half old.
2018-02-18 21:51:48 -08:00
casey langen
c96f873e69 Post build tweak. 2018-02-18 15:35:32 -08:00
casey langen
177cf1851e Round out session resumption: remember and restore the play head. 2018-02-18 15:02:26 -08:00
casey langen
8550e62b1d Use SourceCodePro font by default, and also hide the Font/Paste menu
bar. This makes the app much better looking by default.
2018-02-18 15:02:26 -08:00
casey langen
a840728083 Merged upstream clangen/PDCurses changes that allow for specifying a
preferred font, and default menu bar visibility.
2018-02-18 15:02:26 -08:00
casey langen
c2fa156dc9 Merged our PDCurses with upstream master. 2018-02-18 15:02:26 -08:00
casey langen
d0e3e35d94 Added missing constant mapping for new PlaybackPrepared state. 2018-02-18 02:20:24 +00:00
casey langen
3dd4bbbad7 Experimental changes to support automatically enqueuing of previously
playing track. Required minor surgery to the ITransport interface, both
transport types, and PlaybackService.
2018-02-17 16:57:53 -08:00
casey langen
a22c346293 Cleaned up warnings on *nix 2018-02-17 12:48:05 -08:00
casey langen
6a4e9ae9c3 Initial work to support saving app session on exit, then restoring it on
startup.
2018-02-17 11:29:57 -08:00
Casey Langen
a2dc03ffaa Version bump for next release. 2018-02-15 09:27:55 -08:00
Casey Langen
b96c2e6c17 Added the ability to start playback directly from the directory pane in
DirectoryLayout by using the context menu key.
2018-02-15 09:27:50 -08:00
casey langen
82931b3669 Fixed *nix compile. 2018-02-12 23:26:23 -08:00
casey langen
005bfeeb3a Fixed a bug where OnChildVisibilityChanged() was calling up to
super::OnParentVisibilityChanged(). Oops.
2018-02-12 23:21:24 -08:00
casey langen
ab79b4bdbe Fixed up DirectoryLayout's TrackList title. 2018-02-12 21:37:29 -08:00
casey langen
acf9befb86 Don't show path chooser if there is only one indexed path. Also:
remember the previously selected directory.
2018-02-12 21:21:59 -08:00
casey langen
d8d2fc7da0 Fixed focus order issue in DirectoryLayout when hiding/showing directory
list.
2018-02-12 20:55:55 -08:00
casey langen
1f88974620 Fixed bugs related to LayoutBase not properly re-indexing focusable
targets when views are hidden or shown. Added new
IWindow::OnChildVisibilityChanged that is automatically called by all
child Windows to notify containers of visibility changes.
2018-02-12 20:55:02 -08:00
casey langen
5dbb2c6abc A handful of additional small bugfixes for directory browsing:
1. Update the tracklist on indexer progress
2. Optimized DirectoryAdapter::HasSubdirectories()
3. Added directory name to tracklist title
4. Hide direcotry chooser for root paths without any subdirs
2018-02-12 09:45:17 -08:00
casey langen
e5d82dc868 A couple small bug fixes in the directory browser. 2018-02-12 08:10:38 -08:00
casey langen
80a10ffe5f Don't requery unless we need to. 2018-02-12 00:21:10 -08:00
casey langen
0cf2274745 Browsing metadata by directory is now pretty much working. 2018-02-12 00:08:16 -08:00
casey langen
8885651ea7 More boilerplate -- added an overlay to BrowseOverlays to allow the user
to select the browse root, then pass it through all relevant components.
Also added some localized strings.
2018-02-11 13:09:23 -08:00
casey langen
8673eddda4 - Added DirectoryTrackListQuery.
- Updated 'directories' table so columns are compatible with generic
"regular" category (and category tracklist) queries.
2018-02-11 01:15:52 -08:00
casey langen
0ba98925ba Stubbed DirectoryLayout for browse by directories functionality.
Required moving some functionality from BrowseLayout LibraryLayout.
2018-02-11 00:25:03 -08:00
casey langen
4a033ae0c6 Index track directory metadata as well -- this is the first step towards
directory browsing.
2018-02-10 23:50:47 -08:00
casey langen
bcec9dc7ca Added scrollbar support to ListOverlay. 2018-02-10 13:03:06 -08:00
Casey Langen
bc565f31b3 Fixed the macOS packaging process. 2018-02-02 10:30:25 -08:00
casey langen
aaaea49025
Update CMakeLists.txt 2018-02-01 19:35:48 -08:00
casey langen
e44d24e8c8 Exit with failure if "--stop" fails. Also give the daemon a couple more seconds to clean up. 2018-02-01 19:13:21 -08:00
casey langen
27d4696971 Fix RPATH handling in CMakeLists.txt 2018-02-01 19:12:28 -08:00
casey langen
2655c8a265 Ensure arguments get forwarded from wrapper script to executable 2018-02-01 01:10:18 -08:00
casey langen
c1a0708089 Enabled SO_REUSEADDR for server sockets. 2018-01-31 20:13:12 -08:00
Casey Langen
084f888d14 Added support for a basic set of command line options: --start, --stop,
--running, --version and --help.
2018-01-31 12:33:10 -08:00
casey langen
8d142fefcd More musikcubed code cleanup -- verified working on FreeBSD now. 2018-01-30 23:29:54 +00:00
casey langen
35689bb143 Cleaned up exitIfRunning() and simplified LOCKFILE 2018-01-31 06:24:50 +00:00
Casey Langen
b04aa4e529 Use libev to drive daemon event loop. This prevents the hacky periodic
wakeups to check the (now unnecessary) global quit flag.
2018-01-30 21:44:57 -08:00
Casey Langen
c8b81162f3 Ensure MessageQueue wait time calculations always use the same time
unit!
2018-01-30 09:39:22 -08:00
Casey Langen
0fdb83d643 MaxKellermann@ correctly pointed out the SIGTERM signal handler was not safe, and
may result in deadlock. Updated code to avoid allocations and just set
the quit flag. Required minor surgery to IMessageQueue and impl to add
a timeout to WaitAndDispatch().
2018-01-30 09:21:04 -08:00
casey langen
b18ed5ab18 The play queue now shows sequential track numbers instead of ones read
from metadata.
2018-01-29 22:58:10 -08:00
casey langen
402aab9d2c Ensure musikcubed shuts down cleanly on SIGTERM. 2018-01-29 20:59:13 -08:00
Héctor Molinero Fernández
cf3cbfd7f6 Include fstream 2018-01-29 21:19:44 +01:00
casey langen
1a0bc55a15 Updated to boost 1.66.0 on Windows. 2018-01-29 09:10:21 -08:00
casey langen
4c758af5ac MessageQueue implementation now uses checked weak_ptr receivers for
broadcasts. This solves an issue where the message queue may prevent
components (like views) from getting cleaned up if they don't unregister
before they are discarded.
2018-01-29 09:08:54 -08:00
casey langen
5df2881a46 Ensure playlist browse uses sequential track numbers, instead of track
numbers from metadata.
2018-01-29 09:07:13 -08:00
casey langen
4fd9d358a5 More small string updates. 2018-01-28 23:40:34 -08:00
casey langen
e009adeb24 Minor string change to the API version mismatch warning. 2018-01-28 23:20:26 -08:00
casey langen
b8fe116836 Fixed daemon lock checking on BSD. 2018-01-28 16:52:24 +00:00
casey langen
7fc95e553b Version bump for next release. 2018-01-28 16:18:17 -08:00
casey langen
c1574960db - Check to see if musikcubed is already running before allowing the process to start.
- Fixed rpath linking in musikcubed CMakeLists.
- CMake "install" fixes to properly include shared library and daemon.
- Experimental changes to use a shared libmusikcore library, instead of
  a static one.
2018-01-28 15:47:23 -08:00
casey langen
369f9054ba Added musikcubed daemon. 2018-01-27 23:25:26 -08:00
casey langen
5807fafe1b - Updated transfer/copy copy to (hopefully) make things slightly less
confusing.
- Updated exoplayer and arch components to latest versions
- Added a "server mismatch" dialog
2018-01-27 01:46:28 -08:00
casey langen
87178e2a7d Updated checkbox styling to be more standard. 2018-01-26 11:00:07 -08:00
Casey Langen
592430615e Fixed macOS compile 2018-01-25 00:02:43 -08:00
casey langen
02096234f2 Fixed a bug where incorrect metadata may be loaded from a stale cache
after transfering playback context from server -> android.
2018-01-24 23:27:03 -08:00
casey langen
b107bd9aab Added multi-client play queue snapshotting support to the web socket
server. Also added an additional optional, but strongly recommended
field called "device_id" to all requests from clients.
2018-01-24 20:30:47 -08:00
casey langen
06192f53a2 Fixed a Track memory leak. 2018-01-24 00:00:37 -08:00
casey langen
ab8517fd89 Playback context switcher now buried behind a long press menu in the
toolbar.
2018-01-23 22:00:21 -08:00
casey langen
0eacb53904 Added Popup to let users decide between seamless switching and new
sessions.
2018-01-23 20:18:33 -08:00
casey langen
136076cc3e Fix a crash in StreamingPlaybackService.resolveNextIndex when the queue
size is 1 and random is enabled. Oops.
2018-01-23 19:00:07 -08:00
casey langen
b96934dbfc Removed MediaPlayerWrapper, ExoPlayerWrapper. GaplessExoPlayerWrapper is
the way forward!
2018-01-23 18:57:25 -08:00
casey langen
5b356c4991 Refactor and additions to support play queue snapshotting, and the
ability to transfer playback context seamlessly between server and
device.
2018-01-23 17:16:04 -08:00
casey langen
0b3e1b2f19 Added the ability for remote clients to request playback of a previously
snapshotted queue. Also fixed a bug in TrackList where the wrong type of
wrapped ITrack was getting returned, potentially leading to
read-after-free bugs.
2018-01-23 16:46:57 -08:00
casey langen
2b8d40126a Added the ability to snapshot the current playlist in the
WebSocketServer layer. We'll eventually use this to transfer play queue
context.
2018-01-22 23:31:20 -08:00
casey langen
38709f4e2f A couple bug fixes to PlaybackService and WebSocketServer. 2018-01-21 23:38:13 -08:00
casey langen
933709be4e Intermediate commit -- make sure server supports resuming playback from
an optionally specified time.
2018-01-21 21:16:16 -08:00
casey langen
486bc9c96d Small changes to allow for blocking seek in GaplessExoPlayerWrapper. 2018-01-19 15:59:30 -08:00
casey langen
cce2dbdb18 Added the ability to browse by arbitrary categories (whatever is returned by
the backend)
2018-01-18 18:46:34 -08:00
casey langen
c29f8cedc7 Don't depend on musikglue anymore. It doesn't exist. 2018-01-18 08:52:58 -08:00
casey langen
1b927ed96d Margin normalization on the remote management Activity. 2018-01-17 23:19:00 -08:00
casey langen
1496148a38 Promoted "playlists" button to main activity, and also added an explicit
"play queue" button above.
2018-01-17 21:03:08 -08:00
casey langen
3729aff107 update_gain_settings -> set_gain_settings in musikdroid 2018-01-17 20:59:27 -08:00
casey langen
3b6ab78ba5 Renamed ProxyTransport -> MasterTransport and update_gain_settings to
set_gain_settings.
2018-01-17 20:57:53 -08:00
casey langen
95a7fa3010 Updated default playback engine, remote admin layout, and kotlin
version.
2018-01-16 23:38:36 -08:00
casey langen
04b62ef345 Fix crasher bug in RemoteSettingsActivity when server doesn't support
the new queries. Also, fixed a long-standing bug in WebSocketService
where errors weren't getting properly dispatched (they were getting
dispatched as success).
2018-01-16 20:08:58 -08:00
casey langen
246dd038fb Added a new "EnvironmentUpdated" broadcast that is sent by Plugins.cpp's
IEnvironment implementation whenever settings change. SettingsLayout
registers for this, and redraws accordingly.
2018-01-16 18:38:29 -08:00
casey langen
1215917ccb Removed "glue" sub-project. Moved related functionality to core. This
makes things a bit simpler.
2018-01-15 21:59:15 -08:00
casey langen
a1bb0a86d6 Removed MasterTransport from glue's CMakeLists. glue will go away entirely, soon. 2018-01-15 21:46:43 -08:00
casey langen
27c74b1d3b Added the ability to modify the playback transport from the android
client.
2018-01-15 21:37:19 -08:00
casey langen
7bc5928e5a Moved glue::MasterTransport to core::ProxyTransport. Added the ability
to get and set the transport in sdk::IEnvironment, and plumbed it
through to the server.
2018-01-15 21:36:32 -08:00
casey langen
2fd6b36030 Additional bug fixes and index validation around output device/driver
selection in RemoteSettingsActivity on android.
2018-01-15 15:36:35 -08:00
casey langen
2d2b721072 Wired up remaining remote management stuff in RemoteSettingsActivity 2018-01-15 13:56:42 -08:00
casey langen
a270ae7984 Fixed a bug in set_output_driver message -- the correctt deviceId wasn't
always getting selected (default was broken)
2018-01-15 13:56:08 -08:00
casey langen
a698bf90a8 Ensure the default preamp gain is 0.0, not 1.0. 2018-01-15 12:18:51 -08:00
casey langen
8d27927860 Added most boilerplate and some boring implementation details for remote
management in the android client.
2018-01-15 11:27:45 -08:00
casey langen
f327b63dbc Fixed "list_outputs" message so it also returns the selected output. 2018-01-15 00:00:01 -08:00
casey langen
628366a700 Updated explicit dependencies in CMakeLists, then added a postbuild script to execute cmake . to glob all the plugins together proprly. This removes the awkward, second cmake . step. 2018-01-14 15:46:47 -08:00
casey langen
b24c13abe2 Added support for reading and writing replay and preamp gain settings in
musikdroid.
2018-01-14 14:40:33 -08:00
casey langen
e047cc91c0 Added the ability to change replay and preamp gain settings from
IEnvironment. Plumbed it through to the server layer as well.
2018-01-14 14:39:59 -08:00
casey langen
26f94a4c9a - Added the ability to query and set device outputs in the API layer.
Fixed some bugs in the process.
- Added the ability to query and set device outputs in the Android
client. current unused.
2018-01-14 00:37:05 -08:00
casey langen
b0cfc893ff Added IPlaybackService::ReloadOutput(). Playback is no longer reset when
the selected output device changes -- it now picks up where it left off.
2018-01-13 21:40:56 -08:00
casey langen
c451c6a5be Added a new indexer overlay. The user can select a regular rescan or a
library rebuild.
2018-01-13 19:02:21 -08:00
casey langen
0db66f19c8 - Added the ability to query IOutputs from IEnvironment.
- Added the ability to schedule metadata rebuilds and reindexes in
IEnvironment
- Updated WebSocketServer to allow for remote reindexes
2018-01-13 16:48:47 -08:00
casey langen
f868eeac9e FreeBSD still seems to have problems with scrollbars -- disable on that
platform for now.
2018-01-11 19:54:33 -08:00
casey langen
51417d01a1 A few string updates for release. 2018-01-11 19:53:29 -08:00
casey langen
612f2d454b Fixed a ReplayGain NPE, and also fixed the transport readout. 2018-01-11 17:09:49 -08:00
Casey Langen
d0bd1beabd Version bump for 0.35.0. Only thing remaining for release is the FreeBSD scrollbar issue. 2018-01-07 12:54:15 -08:00
casey langen
c8ff159056 Fixed bug mentioned in #145 -- themes get reset after upgrade. Added the
ability to put themes in ~/.musikcube/themes/ so they don't get wiped
out.
2018-01-06 22:43:21 -08:00
casey langen
fcc817ab6a Added a Replay Gain indicator to the transport view when the current
song has RG applied to it.
2018-01-06 20:44:30 -08:00
casey langen
42075e3e7f Remove slightly better looking Win32 scroll indicators to make things
more compatable.
2018-01-06 19:09:47 -08:00
casey langen
2e66777ba0 Ensure Input and List overlay titles are centered like the other
overlays.
2018-01-06 15:08:23 -08:00
casey langen
cbd2d3f4d2 Fixed unix compile. 2018-01-06 12:09:03 +00:00
casey langen
2f1c4ebe04 Added the ability to view extended metadata by category in the browse
view -- default keyboard shortcut is "6", and will show a dialog to let
the user select which field to browse by.
2018-01-06 12:59:44 -08:00
casey langen
4523c2d28a Ensure extended key/value pairs attached to tracks are properly deduped. 2018-01-06 12:15:38 -08:00
casey langen
3df8105dcd SDK and WebSocket layers now support multiple-predicate queries for both
categories and tracks.
2018-01-06 00:59:28 -08:00
casey langen
7d70bd694c Fixed Linux compile. 2018-01-05 14:11:30 -08:00
casey langen
016de4fed4 Added "ListCatgories" functionality to ISimpleDataProvider,
LocalSimpleDataProvider, WebSocketServer, and the Android IDataProvider.
2018-01-04 21:37:26 -08:00
casey langen
654f26f9b6 Extracted IValue, IValueList wrapper functionality from
CategoryListQuery and into new SdkWrappers helper that is available to
all queries.

Implemented "AllCategoriesQuery" for retrieving a sorted list of all
normal and extended categories that can be queried.
2018-01-04 21:19:15 -08:00
casey langen
3705c278d3 Fixed a bug in AlbumBrowseActivity that was causing unnecessary
requeries against the backend.
2018-01-03 23:45:17 -08:00
casey langen
03e134aab9 Updated AlbumListQuery to support extended property predicates. 2018-01-03 23:45:10 -08:00
casey langen
14ba4ea1bb A couple small bug fixes to recent refactors so the metadata server runs
queries properly again.
2018-01-03 22:44:28 -08:00
casey langen
6c354f513b Updated CategoryTrackListQuery to support predicate lists, just like
CategoryListQuery.
2018-01-03 21:02:42 -08:00
casey langen
273212bd0d Refactored predicate and argument stuff into util module that can be
reused in CategoryTrackListQuery.
2018-01-03 19:14:39 -08:00
casey langen
3659395af5 Rounds out a rough implementation of CategoryListQuery that supports
multiple predicates, including extended metadata. Needs to be
generalized so it can work with AlbumListQuery and
CategoryTrackListQuery.
2018-01-03 00:41:30 -08:00
casey langen
912bf13ef3 A bit more refactoring -- but I think this is gonna get merged together
with some subsequent work. I think I have working queries now.
2018-01-02 22:25:47 -08:00
casey langen
14442d8a0b Intermediate progress -- refactored some of CategoryListQuery but I
think it needs to be rebuilt in a better way.
2018-01-01 17:03:44 -08:00
casey langen
c8fd640a0a Fixed bug in IndexerTrack update logic -- sometimes some properties
weren't getting properly saved (fallout from removal of 'year' column in
'tracks' table).
2018-01-01 00:45:00 -08:00
casey langen
d5ff695eed Fixed broken TrackMetadataQuery, and also implemented generic metadata
queries in CategoryTrackListQuery. CategoryListQuery still unsupported
-- that's gonna be the hard one.
2018-01-01 00:36:20 -08:00
casey langen
14c823fb63 Updated ITagStore interface, and also (1) removed "year" from the
"tracks" table, it's now stored as extended metadata, and (2) fixed bug
where extended metadata was not always getting properly inserted into
the "track_meta" table due to an "optimization".
2017-12-31 22:49:16 -08:00
casey langen
28dfeeb3be Ensure very long album names are properly truncated in TrackListView
header rows.
2017-12-28 13:57:30 -08:00
casey langen
0cade3f4cb Added the ability to configure the selected device id for SndioOut via preferences. 2017-12-23 23:48:45 +00:00
casey langen
dc3f9f3c6c Android client version bump. 2017-12-25 21:21:56 -08:00
casey langen
86e18d015a Fixed a URL formatting issue that could cause non-downsampled media to
not play on the Android client.
2017-12-25 21:21:16 -08:00
casey langen
e9d0461d70 Fixed compiler error on BSD. 2017-12-23 00:12:23 +00:00
casey langen
afcd50d252 Another potential fix for weird scrollbar behavior on FreeBSD. Really
wish I could repro this problem locally.
2017-12-25 16:08:47 -08:00
casey langen
394eca93c8 Another potential fix for the BSD scrollbar issue. 2017-12-24 18:03:52 -08:00
casey langen
23eae5a765 Use correct character type when using waddch() in ListWindow drawing the
scrollbar. Hopefully this fixes redraw issues some users are seeing on
BSD systems.
2017-12-24 15:22:14 -08:00
casey langen
1721f8adf7 Fixed clipping when dealing with float -> short conversion, and added
very simple triangle dithering.
2017-12-21 17:46:38 +00:00
Greg Fitzgerald
7e1fb2e197 Fix bash path to be more linux/bsd agnostic 2017-12-22 22:24:48 -05:00
casey langen
650f349710 Initial implementation of sndio output driver for BSD. 2017-12-21 12:46:36 +00:00
casey langen
402008e148 Added a skeleton plugin for sndio. Also updated build script stuff to not include ALSA for FreeBSD. 2017-12-21 09:12:39 +00:00
casey langen
e2f247669a Added the ability to switch between IPV4 and IPV6 in the server plugin. 2017-12-21 23:19:37 -08:00
casey langen
70a8aad86d The version of libmicrohttpd that ships with FreeBSD has a bug that causes the server to hang on shutdown. This patch adds on-demand fetching and compiling of the library on FreeBSD systems. 2017-12-21 05:16:05 +00:00
casey langen
88b7e994a5 FreeBSD compiles and links... but doesn't run very well. 2017-12-20 22:29:29 +00:00
Casey Langen
ba5a081b1b Compressed settings layout a bit. 2017-12-18 08:46:30 -08:00
casey langen
ba0e110e1b Added a new "PreampOverlay" that allows the user to configure not only
replay gain support, but generic preamp functionality as well.
2017-12-18 00:20:28 -08:00
casey langen
debe708bec Added core work required for preamp support. 2017-12-17 21:18:17 -08:00
casey langen
b7157b768e Updated replay gain readout in the setting screen to display the current
mode. Also added some missing exception handling in PreferencesKeys.
2017-12-17 11:49:17 -08:00
casey langen
42c91065a5 Make sure orphaned replay_gain resources are removed from the database.
Also, ensure we don't insert invalid/default replay_gain values for
tracks during indexer time.
2017-12-17 11:00:45 -08:00
casey langen
536cac1266 Added replay gain support for ogg, flac, and mp4. 2017-12-16 23:54:34 -08:00
casey langen
eae2f896f9 Updated FfmpegDecoder CMakeLists comments. 2017-12-16 23:17:34 -08:00
casey langen
24b714ff4b - use the new musikcube-bin git repo as a submodule for including
binaries. this will help keep the main repo binary-free.
- properly isolate ffmpegdecoder from the main project file in windows.
2017-12-16 23:17:34 -08:00