Commit graph

2372 commits

Author SHA1 Message Date
OxygenCobalt
d2350de12a Optimize queue restore slightly
Reduce the amount of iterations the restoration process has to go through when restoring the queue by making it traverse albums and then album songs.
2020-11-21 11:13:40 -07:00
OxygenCobalt
d09ce20e02 Persist Queue
Implement some very unoptimized queue persistence, Ill have to make it better in the future but for now it works.
2020-11-20 20:59:39 -07:00
OxygenCobalt
da224ffda0 Fix persistence bugs with notification
Fix issues where the notification for Auxio will show up incomplete during the restore process.
2020-11-17 11:23:14 -07:00
OxygenCobalt
27777bf352 Add animation to BottomNavigationView nav
Add an animation to the navigation that occurs when an item from BottomNavigationView is selected.
2020-11-17 08:47:45 -07:00
OxygenCobalt
c19680c1f7 Temporarily remove playback nav
Remove the ability to navigate to the parent album from CompactPlaybackFragment for now, as it was causing issues.
2020-11-16 21:37:45 -07:00
OxygenCobalt
c3a61e6071 Switch from ViewPager to BottomNavigationView
Use BottomNavigationView as the main navigator of Auxio instead of a ViewPager + BottomNavigationView, primarily to fix some memory leaks and give Auxio a better UI design overall.
2020-11-16 21:09:55 -07:00
OxygenCobalt
212ffbf2c7 Fix persistence bugs
Fix some edge cases with the persistent PlaybackState restoration.
2020-11-15 20:07:40 -07:00
OxygenCobalt
6d809f4303 Implement persistence
Implement the ability for [most of] the playback state to persist even after the app's process has been killed.
2020-11-14 16:53:35 -07:00
OxygenCobalt
ee95bc1a9e Fix more queue bugs
Fix bugs with QueueAdapter where removing the last item from the user queue or the next queue would cause weird behavior or a crash.
2020-11-13 20:49:53 -07:00
OxygenCobalt
2ebee41ed0 Make QueueAdapter Adapter instead of ListAdapter
Fix a stupid amount of bugs by changing QueueAdapter to a normal adapter with a differ and addition/movement functions instead of a ListAdapter.
2020-11-13 14:56:06 -07:00
OxygenCobalt
2aa630948b Prevent the addition of duplicate queue items
Band-aid over a bug with DiffCallback that causes weird behavior with duplicate queue items by disallowing the addition of queue items if theyre already allowed.
2020-11-12 19:25:43 -07:00
OxygenCobalt
604145fb69 Improve code slightly
Add some documentation and remove useless code/bugs.
2020-11-11 19:27:38 -07:00
OxygenCobalt
2c783beaba Redesign headers/menus
Redesign the header items so they look nicer, update the PopupMenus with some new things as well.
2020-11-10 20:00:38 -07:00
OxygenCobalt
67d10009d4 Unify Queue
Make QueueFragment contain both the user queue and the next queue, instead of having viewpager between the two.
2020-11-09 15:39:13 -07:00
OxygenCobalt
b5552411b6 Add nav to playing song's album
Add the ability to navigate from CompactPlaybackFragment to the album where the current song is.
2020-11-08 15:39:18 -07:00
OxygenCobalt
a192fb52c3 Make queue a fragment instead of a dialog
Make QueueFragment an actual fragment instead of a BottomSheetDialogFragment. Really dont want to deal with the garbage BottomSheetDialogFragment does.
2020-11-08 14:37:13 -07:00
OxygenCobalt
4fb4120342 Add ability to play from user queue
Add the ability to play from the user queue, also append some extra song actions.
2020-11-08 10:11:27 -07:00
OxygenCobalt
2be7d34601 Add user queue
Add a user-generated queue, currently it isnt played from.
2020-11-07 16:06:47 -07:00
OxygenCobalt
bc7950e7af Make Queue nav destination
Fix a heisenleak by making QueueFragment a navigation destination instead of being directly instantiated.
2020-11-07 09:38:09 -07:00
OxygenCobalt
c664d22a43 Fix bugs with Queue
- Fix a bug where the queue would scroll up when the player moved to another song.
- Fix bug where queue would show even with no songs.
- Fix a crash from removing the last song of a queue.
2020-11-06 20:06:23 -07:00
OxygenCobalt
1cab11ba9c Fix compatibility
Do some minor compatibility fixes for older versions of android.
2020-11-02 19:58:11 -07:00
OxygenCobalt
188d7e047f Make Notification show currently played model
Make the playback notification show the currently played music model [e.g the genre/artist/album thats being played].
2020-11-01 19:58:20 -07:00
OxygenCobalt
344e566aa3 Update resources
Improve resource structure/naming.
2020-11-01 15:56:53 -07:00
OxygenCobalt
660f4c0eb7 Add ability to exit notification
Add an exit button to the notification so that one can exit it.
2020-11-01 15:37:01 -07:00
OxygenCobalt
5da3fa866b Refactor notification management
Remove PlaybackNotificationHolder and replace it with a util file that is easier to work with.
2020-11-01 13:58:47 -07:00
OxygenCobalt
08bd0ece3a Add media controls to notification
Add media controls to the Playback Notification [Loop, Last, Play/Pause, Next, Shuffle]
2020-11-01 11:06:26 -07:00
OxygenCobalt
09971afb42 Make PlaybackService perpetually foreground
Make PlaybackService never leave the foreground unless forced to, will add an option to close the service later.
2020-10-31 20:03:42 -06:00
OxygenCobalt
afa50ad531 Update icon
Make the Auxio icon look nicer.
2020-10-31 17:47:36 -06:00
OxygenCobalt
909cea01fa Make PlaybackStateManager use millis
Make PlaybackStateManager use millis for the current position instead of seconds, in order to be more in line with the rest of the code.
2020-10-31 14:32:44 -06:00
OxygenCobalt
e00930cc5f Add Playback Notification
Add a MediaStyle Notification for music playback.
2020-10-31 11:50:42 -06:00
OxygenCobalt
a4f55873ec Add Audio Focus
Use the built-in ExoPlayer AudioFocus functionality to implement Audio Focus [hopefully].
2020-10-30 16:07:41 -06:00
OxygenCobalt
535fc95f71 Add looping
Add the ability to loop songs either once or infinitely.
2020-10-30 14:51:49 -06:00
OxygenCobalt
ce96dd6e94 Extend Headset Functionality
Add callbacks for when rewind/close buttons are pressed on a headset, and when headsets are connected/disconnected.
2020-10-30 12:24:27 -06:00
OxygenCobalt
6fc034e376 Minor playback improvements
Improve the code design and fix some bugs with PlaybackService and friends.
2020-10-30 11:39:55 -06:00
OxygenCobalt
2ded706445 Add external media controls
Add the ability to listen to external media controls, such as through a bluetooth headset.
2020-10-26 20:08:22 -06:00
OxygenCobalt
3251b84e23 Fix memory leak with PlaybackViewModel
Fix a memory leak involving a stray context that PlaybackViewModel would store.
2020-10-26 18:39:39 -06:00
OxygenCobalt
85475b5c61 Make PlaybackService persistent
Make PlaybackService solely rely on PlaybackStateManager, allowing the service to run beyond the main Auxio activity.
2020-10-26 16:13:20 -06:00
OxygenCobalt
ac5e6ba140 Fix issues with PlaybackFragment seekbar
Fix bugs where PlaybackFragment's seekbar would update the player on the fly/flip out if PlaybackService updated the position while it was seeking.
2020-10-26 12:06:17 -06:00
OxygenCobalt
1afaae7b0a Add playback updates to PlaybackService
Add the ability for PlaybackService to move to the next song when the current one ends, update the duration, and also be played/paused.
2020-10-26 11:04:22 -06:00
OxygenCobalt
42325c456e Refactor playback management
Move playback management from PlaybackViewModel to a dedicated class, update naming of playback functions heavily.
2020-10-26 09:39:45 -06:00
OxygenCobalt
25142bba48 Add basic playback functionaliity
Implement ExoPlayer in a basic form so that songs can be actually played.
2020-10-25 18:18:59 -06:00
OxygenCobalt
32fe24e001 Update ViewHolder structure
Make some minor improvements to the ViewHolder structure.
2020-10-24 12:32:05 -06:00
OxygenCobalt
55ed55c5dc Improve queue editing
Fix issue where moving queue items would swap them, not move them, also prevent QueueAdapter from scrolling uncontrollably if the first item is moved.
2020-10-23 19:15:10 -06:00
OxygenCobalt
912d296e92 Add ability to edit queue
Add the [somewhat rough] ability to move/remove items from the queue.
2020-10-21 20:16:11 -06:00
OxygenCobalt
219d1c2c24 Add queue display
Add a fragment for displaying the current queue.
2020-10-20 15:16:28 -06:00
OxygenCobalt
3337747cb7 Fix empty genre bug
Bandaid MusicSorter to remove any genres that dont have anything in them, because that happens now. Also prevent a crash just in case an empty music model does get played.
2020-10-18 15:38:59 -06:00
OxygenCobalt
c4c115274b Move detail controls to Toolbar
Move the play/shuffle buttons from the header of the DetailFragments to their Toolbar, it makes far more sense for them to be there honestly.
2020-10-18 15:13:03 -06:00
OxygenCobalt
d01aa3ea4a Prevent animated icons from animation on startup
Make ImageButtons that use animated icons not animate when the fragment is initially created.
2020-10-18 13:45:13 -06:00
OxygenCobalt
2811c83543 Improve semantics
Remove some useless TODOs, update naming in places.
2020-10-18 09:06:16 -06:00
OxygenCobalt
00667151dc Add shuffle buttons to Detail Fragments
Add shuffle buttons to AlbumDetailFragment & ArtistDetailFragment.
2020-10-15 15:31:06 -06:00