mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-14 00:17:15 +03:00
Merge remote-tracking branch 'origin/master' into mergeBack
This commit is contained in:
commit
691bfbe594
15
fastlane/metadata/android/en-US/changelogs/124.txt
Normal file
15
fastlane/metadata/android/en-US/changelogs/124.txt
Normal file
@ -0,0 +1,15 @@
|
||||
Features:
|
||||
- Search is accessible through a new icon on the main screen
|
||||
- Modernize Back Handling
|
||||
- Reenable R8 Code minification
|
||||
- Add a "Play Random Songs" shortcut
|
||||
|
||||
Bug fixes:
|
||||
- Readd the "Star" button to the Now Playing screen
|
||||
- Fix a rare crash when shuffling playlists with duplicate entries
|
||||
- Fix a crash when choosing "Play next" on an empty playlist.
|
||||
- Tracks buttons flash a scrollbar sometimes in Android 13
|
||||
- Fix EndlessScrolling in genre listing
|
||||
- Couldn't delete a track when shuffle was active
|
||||
- Upgrade material to 1.9.0
|
||||
|
15
fastlane/metadata/android/en-US/changelogs/125.txt
Normal file
15
fastlane/metadata/android/en-US/changelogs/125.txt
Normal file
@ -0,0 +1,15 @@
|
||||
Features:
|
||||
- Search is accessible through a new icon on the main screen
|
||||
- Modernize Back Handling
|
||||
- Reenable R8 Code minification
|
||||
- Add a "Play Random Songs" shortcut
|
||||
|
||||
Bug fixes:
|
||||
- Avoid triggering a bug in Supysonic
|
||||
- Readd the "Star" button to the Now Playing screen
|
||||
- Fix a rare crash when shuffling playlists with duplicate entries
|
||||
- Fix a crash when choosing "Play next" on an empty playlist.
|
||||
- Tracks buttons flash a scrollbar sometimes in Android 13
|
||||
- Fix EndlessScrolling in genre listing
|
||||
- Couldn't delete a track when shuffle was active
|
||||
|
15
fastlane/metadata/android/en-US/changelogs/126.txt
Normal file
15
fastlane/metadata/android/en-US/changelogs/126.txt
Normal file
@ -0,0 +1,15 @@
|
||||
Features:
|
||||
- Search is accessible through a new icon on the main screen
|
||||
- Modernize Back Handling
|
||||
- Reenable R8 Code minification
|
||||
- Add a "Play Random Songs" shortcut
|
||||
|
||||
Bug fixes:
|
||||
- Fix a few crashes
|
||||
- Avoid triggering a bug in Supysonic
|
||||
- Readd the "Star" button to the Now Playing screen
|
||||
- Fix a rare crash when shuffling playlists with duplicate entries
|
||||
- Fix a crash when choosing "Play next" on an empty playlist.
|
||||
- Tracks buttons flash a scrollbar sometimes in Android 13
|
||||
- Fix EndlessScrolling in genre listing
|
||||
- Couldn't delete a track when shuffle was active
|
@ -9,8 +9,8 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.moire.ultrasonic"
|
||||
versionCode 123
|
||||
versionName "4.6.0"
|
||||
versionCode 126
|
||||
versionName "4.6.3"
|
||||
|
||||
minSdkVersion versions.minSdk
|
||||
targetSdkVersion versions.targetSdk
|
||||
|
@ -248,7 +248,10 @@ class MediaPlayerManager(
|
||||
mediaControllerFuture = MediaController.Builder(
|
||||
context,
|
||||
sessionToken
|
||||
).buildAsync()
|
||||
)
|
||||
// Specify mainThread explicitely
|
||||
.setApplicationLooper(Looper.getMainLooper())
|
||||
.buildAsync()
|
||||
|
||||
mediaControllerFuture?.addListener({
|
||||
controller = mediaControllerFuture?.get()
|
||||
|
@ -12,6 +12,11 @@ import org.moire.ultrasonic.domain.Track
|
||||
|
||||
class RxBus {
|
||||
|
||||
/**
|
||||
* IMPORTANT: methods like .delay() or .throttle() will implicitly change the thread to the
|
||||
* RxComputationScheduler. Always use the function call with the additional arguments of the
|
||||
* desired scheduler
|
||||
**/
|
||||
companion object {
|
||||
|
||||
fun mainThread(): Scheduler = AndroidSchedulers.mainThread()
|
||||
@ -52,7 +57,8 @@ class RxBus {
|
||||
playerStatePublisher
|
||||
.replay(1)
|
||||
.autoConnect(0)
|
||||
.throttleLatest(300, TimeUnit.MILLISECONDS)
|
||||
// Need to specify thread, see comment at beginning
|
||||
.throttleLatest(300, TimeUnit.MILLISECONDS, mainThread())
|
||||
|
||||
val playlistPublisher: PublishSubject<List<Track>> =
|
||||
PublishSubject.create()
|
||||
@ -64,7 +70,8 @@ class RxBus {
|
||||
playlistPublisher
|
||||
.replay(1)
|
||||
.autoConnect(0)
|
||||
.throttleLatest(300, TimeUnit.MILLISECONDS)
|
||||
// Need to specify thread, see comment at beginning
|
||||
.throttleLatest(300, TimeUnit.MILLISECONDS, mainThread())
|
||||
|
||||
val trackDownloadStatePublisher: PublishSubject<TrackDownloadState> =
|
||||
PublishSubject.create()
|
||||
|
@ -235,11 +235,9 @@ class CacheCleaner : CoroutineScope by CoroutineScope(Dispatchers.IO), KoinCompo
|
||||
|
||||
private fun findFilesToNotDelete(): Set<String> {
|
||||
val filesToNotDelete: MutableSet<String> = HashSet(5)
|
||||
val mediaController = inject<MediaPlayerManager>(
|
||||
MediaPlayerManager::class.java
|
||||
)
|
||||
val mediaPlayerManager: MediaPlayerManager by inject()
|
||||
|
||||
val playlist = mainScope.future { mediaController.value.playlist }.get()
|
||||
val playlist = mainScope.future { mediaPlayerManager.playlist }.get()
|
||||
for (item in playlist) {
|
||||
val track = item.toTrack()
|
||||
filesToNotDelete.add(track.getPartialFile())
|
||||
|
Loading…
x
Reference in New Issue
Block a user