From 869ab8aadb8dd6ef66b179e3246abee5329486b7 Mon Sep 17 00:00:00 2001 From: Nolan Hoenert Date: Thu, 11 Dec 2025 19:28:44 -0600 Subject: [PATCH 01/15] Show library size in About screen --- .../org/oxycblt/auxio/music/MusicViewModel.kt | 6 ++-- .../oxycblt/auxio/settings/AboutFragment.kt | 6 ++++ .../java/org/oxycblt/auxio/util/SizeUtil.kt | 28 +++++++++++++++++++ app/src/main/res/layout/fragment_about.xml | 11 ++++++++ app/src/main/res/values/strings.xml | 1 + 5 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/org/oxycblt/auxio/util/SizeUtil.kt diff --git a/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt b/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt index c2546baaf..a5977fc2c 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt @@ -100,7 +100,8 @@ constructor( library.albums.size, library.artists.size, library.genres.size, - library.songs.sumOf { it.durationMs }) + library.songs.sumOf { it.durationMs }, + library.songs.sumOf { it.size }) L.d("Updated statistics: ${_statistics.value}") } @@ -362,7 +363,8 @@ constructor( val albums: Int, val artists: Int, val genres: Int, - val durationMs: Long + val durationMs: Long, + val totalSizeBytes: Long ) } diff --git a/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt b/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt index 0f42da56d..7bbd253f1 100644 --- a/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt @@ -36,6 +36,7 @@ import org.oxycblt.auxio.playback.formatDurationMs import org.oxycblt.auxio.ui.ViewBindingFragment import org.oxycblt.auxio.util.collectImmediately import org.oxycblt.auxio.util.openInBrowser +import org.oxycblt.auxio.util.formatFileSize import org.oxycblt.auxio.util.startIntent import org.oxycblt.auxio.util.systemBarInsetsCompat @@ -98,6 +99,11 @@ class AboutFragment : ViewBindingFragment() { getString( R.string.fmt_lib_total_duration, (statistics?.durationMs ?: 0).formatDurationMs(false)) + + binding.aboutTotalSize.text = + getString( + R.string.fmt_lib_total_size, + (statistics?.totalSizeBytes ?: 0L).formatFileSize()) } private fun Context.sendEmail(recipient: String) { diff --git a/app/src/main/java/org/oxycblt/auxio/util/SizeUtil.kt b/app/src/main/java/org/oxycblt/auxio/util/SizeUtil.kt new file mode 100644 index 000000000..44f93e821 --- /dev/null +++ b/app/src/main/java/org/oxycblt/auxio/util/SizeUtil.kt @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2025 Auxio Project + * SizeUtil.kt is part of Auxio. + */ + +package org.oxycblt.auxio.util + +import java.util.Locale + +/** + * Format a byte count into a human readable string (B, KB, MB, GB, ...). + */ +fun Long.formatFileSize(): String { + if (this <= 0L) return "0 B" + var size = this.toDouble() + val units = arrayOf("B", "KB", "MB", "GB", "TB") + var unitIndex = 0 + while (size >= 1024.0 && unitIndex < units.size - 1) { + size /= 1024.0 + unitIndex++ + } + val formatted = when { + size >= 100 -> String.format(Locale.getDefault(), "%.0f", size) + size >= 10 -> String.format(Locale.getDefault(), "%.1f", size) + else -> String.format(Locale.getDefault(), "%.2f", size) + } + return "$formatted ${units[unitIndex]}" +} diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index d574f8e79..2e61a90ea 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -364,6 +364,17 @@ app:layout_constraintTop_toBottomOf="@+id/about_licenses" tools:text="Total duration: 16:16:16" /> + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ad5f7308f..add1a2309 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -470,6 +470,7 @@ Genres loaded: %d Total duration: %s + Total size: %s %d song From 6a88755b7d7b8d4518cce4f732f2f6f557bff9bf Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 27 Dec 2025 20:57:23 -0500 Subject: [PATCH 02/15] playback: attempt to fix queue sheet insets --- .../auxio/playback/queue/QueueBottomSheetBehavior.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt index 8e56dad16..10608aa6e 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt @@ -83,9 +83,11 @@ class QueueBottomSheetBehavior(context: Context, attributeSet: Attribu override fun applyWindowInsets(child: View, insets: WindowInsets): WindowInsets { super.applyWindowInsets(child, insets) // Offset our expanded panel by the size of the playback bar, as that is shown when - // we slide up the panel. + // we slide up the panel. Use ideal bar height as fallback when the bar hasn't been + // measured yet (can occur when window insets are applied before onDependentViewChanged). val bars = insets.systemBarInsetsCompat - expandedOffset = barHeight + barSpacing + val effectiveBarHeight = if (barHeight > 0) barHeight else getIdealBarHeight(child.context) + expandedOffset = effectiveBarHeight + barSpacing return insets.replaceSystemBarInsetsCompat( bars.left, bars.top, bars.right, expandedOffset + bars.bottom) } From a69908e986f19a559e415b798daf948cfad33d57 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Wed, 31 Dec 2025 18:34:13 -0700 Subject: [PATCH 03/15] build: upgrade deps --- app/build.gradle | 26 +++++++++++++++----------- build.gradle | 14 +++++++------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 55dc72cba..89a6f6898 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { id "com.android.application" id "kotlin-android" @@ -10,9 +12,9 @@ plugins { } android { - compileSdk target_sdk // Auxio implicitly depends on the native modules, explicitly specify it // here so the libraries are still stripped. + compileSdk target_sdk ndkVersion ndk_version namespace "org.oxycblt.auxio" @@ -33,11 +35,6 @@ android { targetCompatibility JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = "17" - freeCompilerArgs += "-Xjvm-default=all" - } - buildTypes { debug { applicationIdSuffix ".debug" @@ -71,6 +68,13 @@ android { } } +kotlin { + compilerOptions { + jvmTarget = JvmTarget.JVM_17 + freeCompilerArgs.add("-Xjvm-default=all") + } +} + dependencies { // Kotlin implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" @@ -85,7 +89,7 @@ dependencies { // General implementation "androidx.core:core-ktx:$core_version" implementation "androidx.appcompat:appcompat:1.7.1" - implementation "androidx.activity:activity-ktx:1.10.1" + implementation "androidx.activity:activity-ktx:1.12.2" // noinspection GradleDependency implementation "androidx.fragment:fragment-ktx:1.6.2" @@ -101,7 +105,7 @@ dependencies { implementation "androidx.viewpager2:viewpager2:1.0.0" // Lifecycle - def lifecycle_version = "2.9.2" + def lifecycle_version = "2.10.0" implementation "androidx.lifecycle:lifecycle-common:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" @@ -112,7 +116,7 @@ dependencies { implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version" // Media - implementation "androidx.media:media:1.7.0" + implementation "androidx.media:media:1.7.1" // Android Auto implementation "androidx.car.app:app:1.7.0" @@ -145,7 +149,7 @@ dependencies { // Material // TODO: Exactly figure out the conditions that the 1.7.0 ripple bug occurred so you can just // PR a fix. - implementation "com.google.android.material:material:1.13.0-beta01" + implementation "com.google.android.material:material:1.13.0" // Dependency Injection implementation "com.google.dagger:dagger:$hilt_version" @@ -163,5 +167,5 @@ dependencies { implementation 'com.joaomgcd:taskerpluginlibrary:0.4.10' // Fuzzy search - implementation 'org.apache.commons:commons-text:1.14.0' + implementation 'org.apache.commons:commons-text:1.15.0' } diff --git a/build.gradle b/build.gradle index 43e9f3778..cb1651cea 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ buildscript { ext { - agp_version = '8.11.1' + agp_version = '8.13.2' kotlin_version = '2.2.0' kotlin_coroutines_version = '1.10.2' - navigation_version = "2.9.2" - hilt_version = '2.57' - room_version = '2.7.2' - core_version = '1.16.0' + navigation_version = "2.9.6" + hilt_version = '2.57.2' + room_version = '2.8.4' + core_version = '1.17.0' desugaring_version = '2.1.3' min_sdk = 24 @@ -18,7 +18,7 @@ buildscript { dependencies { // Hilt isn't compatible with the new plugin syntax yet. classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version" - classpath "org.jetbrains.dokka:dokka-gradle-plugin:2.0.0" + classpath "org.jetbrains.dokka:dokka-gradle-plugin:2.1.0" } } @@ -32,7 +32,7 @@ plugins { id "org.jetbrains.kotlin.android" version "$kotlin_version" apply false id "com.google.devtools.ksp" version '2.2.0-2.0.2' apply false // We use spotless in the root build.gradle to apply to all modules. - id "com.diffplug.spotless" version "6.25.0" apply true + id "com.diffplug.spotless" version "8.1.0" apply true } spotless { From 5cda3b08d42c40e30b4d609cabfa5fd061360ad3 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Wed, 31 Dec 2025 20:39:55 -0700 Subject: [PATCH 04/15] all: reformat --- app/src/main/java/org/oxycblt/auxio/Auxio.kt | 13 +- .../java/org/oxycblt/auxio/AuxioService.kt | 10 +- .../java/org/oxycblt/auxio/MainActivity.kt | 3 +- .../java/org/oxycblt/auxio/MainFragment.kt | 84 +++-- .../auxio/detail/AlbumDetailFragment.kt | 20 +- .../auxio/detail/ArtistDetailFragment.kt | 17 +- .../detail/ContinuousAppBarLayoutBehavior.kt | 4 +- .../oxycblt/auxio/detail/DetailGenerator.kt | 4 +- .../oxycblt/auxio/detail/DetailViewModel.kt | 38 ++- .../auxio/detail/GenreDetailFragment.kt | 17 +- .../auxio/detail/PlaylistDetailFragment.kt | 39 ++- .../oxycblt/auxio/detail/ReadOnlyTextInput.kt | 4 +- .../auxio/detail/decision/ArtistShowChoice.kt | 6 +- .../decision/DetailDecisionViewModel.kt | 1 + .../auxio/detail/list/DetailListAdapter.kt | 2 +- .../detail/list/PlaylistDetailListAdapter.kt | 10 +- .../auxio/detail/list/PlaylistDragCallback.kt | 6 +- .../auxio/detail/list/SongPropertyAdapter.kt | 6 +- .../auxio/detail/sort/GenreSongSortDialog.kt | 3 +- .../detail/sort/PlaylistSongSortDialog.kt | 3 +- .../oxycblt/auxio/home/ErrorDetailsDialog.kt | 3 +- .../org/oxycblt/auxio/home/HomeFragment.kt | 22 +- .../org/oxycblt/auxio/home/HomeSettings.kt | 7 +- .../org/oxycblt/auxio/home/HomeViewModel.kt | 2 +- .../oxycblt/auxio/home/ThemedSpeedDialView.kt | 35 ++- .../auxio/home/list/AlbumListFragment.kt | 9 +- .../auxio/home/list/ArtistListFragment.kt | 6 +- .../auxio/home/list/GenreListFragment.kt | 6 +- .../auxio/home/list/PlaylistListFragment.kt | 11 +- .../auxio/home/list/SongListFragment.kt | 9 +- .../auxio/home/sort/AlbumSortDialog.kt | 3 +- .../oxycblt/auxio/home/sort/SongSortDialog.kt | 3 +- .../java/org/oxycblt/auxio/home/tabs/Tab.kt | 9 +- .../org/oxycblt/auxio/home/tabs/TabAdapter.kt | 3 +- .../auxio/home/tabs/TabDragCallback.kt | 6 +- .../org/oxycblt/auxio/image/BitmapProvider.kt | 8 +- .../org/oxycblt/auxio/image/CoverProvider.kt | 4 +- .../java/org/oxycblt/auxio/image/CoverView.kt | 52 ++- .../org/oxycblt/auxio/image/ImageSettings.kt | 16 +- .../oxycblt/auxio/image/coil/CoilModule.kt | 2 +- .../image/coil/CoverCollectionFetcher.kt | 10 +- .../oxycblt/auxio/image/coil/CoverFetcher.kt | 3 +- .../image/coil/RoundedRectTransformation.kt | 11 +- .../auxio/image/covers/SettingCovers.kt | 5 +- .../org/oxycblt/auxio/list/ListSettings.kt | 38 ++- .../java/org/oxycblt/auxio/list/Listeners.kt | 4 +- .../auxio/list/adapter/FlexibleListAdapter.kt | 17 +- .../list/adapter/PlayingIndicatorAdapter.kt | 1 + .../java/org/oxycblt/auxio/list/menu/Menu.kt | 2 +- .../auxio/list/menu/MenuDialogFragmentImpl.kt | 17 +- .../auxio/list/recycler/DialogRecyclerView.kt | 6 +- .../list/recycler/FastScrollRecyclerView.kt | 38 ++- .../list/recycler/MaterialDragCallback.kt | 27 +- .../auxio/list/recycler/ViewHolders.kt | 6 +- .../java/org/oxycblt/auxio/list/sort/Sort.kt | 2 +- .../org/oxycblt/auxio/list/sort/SortDialog.kt | 2 +- .../oxycblt/auxio/music/MusicRepository.kt | 2 +- .../org/oxycblt/auxio/music/MusicSettings.kt | 36 ++- .../org/oxycblt/auxio/music/MusicViewModel.kt | 23 +- .../music/decision/AddToPlaylistDialog.kt | 6 +- .../music/decision/DeletePlaylistDialog.kt | 6 +- .../music/decision/ExportPlaylistDialog.kt | 8 +- .../auxio/music/decision/NewPlaylistDialog.kt | 3 +- .../decision/NewPlaylistFooterAdapter.kt | 3 +- .../music/decision/PlaylistChoiceAdapter.kt | 3 +- .../music/decision/PlaylistPickerViewModel.kt | 14 +- .../music/decision/RenamePlaylistDialog.kt | 9 +- .../auxio/music/locations/LocationAdapter.kt | 6 +- .../auxio/music/locations/LocationsDialog.kt | 32 +- .../music/service/IndexerNotifications.kt | 7 +- .../auxio/music/service/IndexingHolder.kt | 22 +- .../music/service/MediaItemTranslation.kt | 22 +- .../auxio/music/service/MusicBrowser.kt | 14 +- .../music/service/MusicServiceFragment.kt | 17 +- .../auxio/playback/PlaybackBarFragment.kt | 7 +- .../playback/PlaybackBottomSheetBehavior.kt | 13 +- .../auxio/playback/PlaybackPanelFragment.kt | 2 +- .../auxio/playback/PlaybackSettings.kt | 37 ++- .../auxio/playback/PlaybackViewModel.kt | 15 +- .../decision/ArtistPlaybackChoiceAdapter.kt | 3 +- .../decision/GenrePlaybackChoiceAdapter.kt | 3 +- .../playback/persist/PersistenceDatabase.kt | 5 +- .../playback/persist/PersistenceModule.kt | 3 +- .../playback/persist/PersistenceRepository.kt | 8 +- .../auxio/playback/queue/QueueAdapter.kt | 6 +- .../queue/QueueBottomSheetBehavior.kt | 11 +- .../auxio/playback/queue/QueueDragCallback.kt | 6 +- .../auxio/playback/queue/QueueFragment.kt | 9 +- .../auxio/playback/queue/QueueViewModel.kt | 2 +- .../replaygain/ReplayGainAudioProcessor.kt | 4 +- .../service/BluetoothHeadsetReceiver.kt | 4 +- .../service/ExoPlaybackStateHolder.kt | 63 ++-- .../playback/service/MediaSessionHolder.kt | 68 ++-- .../playback/service/MediaSessionInterface.kt | 10 +- .../service/PlaybackServiceFragment.kt | 11 +- .../auxio/playback/service/SystemModule.kt | 5 +- .../service/SystemPlaybackReceiver.kt | 18 +- .../auxio/playback/state/PlaybackCommand.kt | 14 +- .../playback/state/PlaybackStateHolder.kt | 21 +- .../playback/state/PlaybackStateManager.kt | 66 ++-- .../playback/ui/AnimatedMaterialButton.kt | 2 +- .../auxio/playback/ui/ControlledCoverView.kt | 12 +- .../auxio/playback/ui/ForcedLTRFrameLayout.kt | 2 +- .../playback/ui/stepper/CircleClipTapView.kt | 3 +- .../ui/stepper/PlayerFastSeekOverlay.kt | 11 +- .../auxio/playback/ui/stepper/SecondsView.kt | 22 +- .../ui/swipe/PlayerSwipeIndicatorOverlay.kt | 295 ++++++++++++++++++ .../auxio/playback/ui/swipe/SwipeClipView.kt | 137 ++++++++ .../playback/ui/swipe/SwipeIndicatorView.kt | 56 ++++ .../org/oxycblt/auxio/search/SearchEngine.kt | 11 +- .../oxycblt/auxio/search/SearchFragment.kt | 12 +- .../oxycblt/auxio/search/SearchSettings.kt | 9 +- .../oxycblt/auxio/search/SearchViewModel.kt | 6 +- .../auxio/settings/BasePreferenceFragment.kt | 2 +- .../org/oxycblt/auxio/settings/Settings.kt | 2 +- .../auxio/settings/ui/IntListPreference.kt | 11 +- .../ui/PreferenceHeaderItemDecoration.kt | 2 +- .../settings/ui/WrappedDialogPreference.kt | 2 +- .../java/org/oxycblt/auxio/tasker/Start.kt | 3 +- .../java/org/oxycblt/auxio/ui/Animations.kt | 15 +- .../auxio/ui/BottomSheetContentBehavior.kt | 10 +- .../auxio/ui/CoordinatorAppBarLayout.kt | 15 +- .../auxio/ui/DialogAwareNavigationListener.kt | 2 +- .../auxio/ui/RippleFixMaterialButton.kt | 2 +- .../java/org/oxycblt/auxio/ui/UISettings.kt | 7 +- .../ViewBindingBottomSheetDialogFragment.kt | 5 +- .../oxycblt/auxio/ui/ViewBindingFragment.kt | 2 +- .../ui/ViewBindingMaterialDialogFragment.kt | 2 +- .../org/oxycblt/auxio/ui/accent/Accent.kt | 17 +- .../oxycblt/auxio/ui/accent/AccentAdapter.kt | 2 +- .../auxio/ui/accent/AccentCustomizeDialog.kt | 3 +- .../ui/accent/AccentGridLayoutManager.kt | 2 +- .../org/oxycblt/auxio/util/ContextUtil.kt | 6 +- .../oxycblt/auxio/util/CopyleftNoticeTree.kt | 3 +- .../org/oxycblt/auxio/util/FrameworkUtil.kt | 13 +- .../java/org/oxycblt/auxio/util/StateUtil.kt | 7 +- .../oxycblt/auxio/widgets/WidgetComponent.kt | 11 +- .../oxycblt/auxio/widgets/WidgetProvider.kt | 87 +++--- .../org/oxycblt/auxio/widgets/WidgetUtil.kt | 2 +- .../layout/player_swipe_indicator_overlay.xml | 63 ++++ .../layout/player_swipe_indicator_view.xml | 44 +++ build.gradle | 2 +- musikr/src/main/cpp/taglib | 2 +- .../src/main/java/org/oxycblt/musikr/Music.kt | 9 +- .../main/java/org/oxycblt/musikr/Musikr.kt | 5 +- .../java/org/oxycblt/musikr/cache/Cache.kt | 2 +- .../oxycblt/musikr/cache/db/CacheDatabase.kt | 5 +- .../org/oxycblt/musikr/cache/db/DBCache.kt | 15 +- .../java/org/oxycblt/musikr/covers/Covers.kt | 3 +- .../org/oxycblt/musikr/covers/fs/FSCovers.kt | 13 +- .../musikr/covers/stored/StoredCovers.kt | 2 +- .../src/main/java/org/oxycblt/musikr/fs/FS.kt | 4 +- .../java/org/oxycblt/musikr/fs/Location.kt | 3 +- .../main/java/org/oxycblt/musikr/fs/Path.kt | 5 +- .../musikr/fs/mediastore/MediaStore.kt | 90 +++--- .../musikr/fs/path/DocumentPathFactory.kt | 19 +- .../fs/path/MediaStorePathInterpreter.kt | 7 +- .../org/oxycblt/musikr/fs/saf/QueryUtil.kt | 4 +- .../java/org/oxycblt/musikr/fs/saf/SAF.kt | 42 ++- .../musikr/fs/track/LocationObserver.kt | 2 +- .../org/oxycblt/musikr/graph/MusicGraph.kt | 20 +- .../org/oxycblt/musikr/metadata/Metadata.kt | 2 +- .../org/oxycblt/musikr/model/ArtistImpl.kt | 3 +- .../oxycblt/musikr/model/LibraryFactory.kt | 13 +- .../org/oxycblt/musikr/model/LibraryImpl.kt | 4 +- .../oxycblt/musikr/pipeline/EvaluateStep.kt | 5 +- .../oxycblt/musikr/pipeline/ExploreStep.kt | 8 +- .../oxycblt/musikr/pipeline/ExtractStep.kt | 13 +- .../oxycblt/musikr/pipeline/PipelineItem.kt | 2 +- .../playlist/ExternalPlaylistManager.kt | 7 +- .../oxycblt/musikr/playlist/PlaylistFile.kt | 2 +- .../musikr/playlist/db/PlaylistDatabase.kt | 21 +- .../oxycblt/musikr/playlist/db/RawPlaylist.kt | 7 +- .../playlist/db/StoredPlaylistHandle.kt | 2 +- .../musikr/playlist/db/StoredPlaylists.kt | 3 +- .../playlist/interpret/PlaylistInterpreter.kt | 3 +- .../musikr/playlist/interpret/PrePlaylist.kt | 2 +- .../org/oxycblt/musikr/playlist/m3u/M3U.kt | 21 +- .../main/java/org/oxycblt/musikr/tag/Date.kt | 8 +- .../main/java/org/oxycblt/musikr/tag/Name.kt | 10 +- .../org/oxycblt/musikr/tag/ReleaseType.kt | 6 +- .../java/org/oxycblt/musikr/tag/format/ID3.kt | 3 +- .../oxycblt/musikr/tag/interpret/PreMusic.kt | 7 +- .../musikr/tag/interpret/TagInterpreter.kt | 28 +- .../oxycblt/musikr/tag/parse/ParsedTags.kt | 2 +- .../org/oxycblt/musikr/tag/parse/TagFields.kt | 8 +- .../org/oxycblt/musikr/tag/parse/TagParser.kt | 3 +- .../java/org/oxycblt/musikr/util/LangUtil.kt | 2 +- .../java/org/oxycblt/musikr/tag/DateTest.kt | 8 +- .../org/oxycblt/musikr/tag/ReleaseTypeTest.kt | 38 ++- .../musikr/tag/interpret/SeparatorsTest.kt | 7 +- .../oxycblt/musikr/tag/parse/TagFieldsTest.kt | 52 +-- .../oxycblt/musikr/tag/parse/TagParserTest.kt | 21 +- .../tag/parse/TagParsingEdgeCasesTest.kt | 40 ++- .../oxycblt/musikr/tag/parse/TagUtilTest.kt | 13 +- 195 files changed, 2054 insertions(+), 836 deletions(-) create mode 100644 app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/PlayerSwipeIndicatorOverlay.kt create mode 100644 app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/SwipeClipView.kt create mode 100644 app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/SwipeIndicatorView.kt create mode 100644 app/src/main/res/layout/player_swipe_indicator_overlay.xml create mode 100644 app/src/main/res/layout/player_swipe_indicator_view.xml diff --git a/app/src/main/java/org/oxycblt/auxio/Auxio.kt b/app/src/main/java/org/oxycblt/auxio/Auxio.kt index 2304a626b..9f138e99e 100644 --- a/app/src/main/java/org/oxycblt/auxio/Auxio.kt +++ b/app/src/main/java/org/oxycblt/auxio/Auxio.kt @@ -47,8 +47,10 @@ class Auxio : Application() { override fun onCreate() { super.onCreate() @Suppress("KotlinConstantConditions") - if (BuildConfig.APPLICATION_ID != "org.oxycblt.auxio" && - BuildConfig.APPLICATION_ID != "org.oxycblt.auxio.debug") { + if ( + BuildConfig.APPLICATION_ID != "org.oxycblt.auxio" && + BuildConfig.APPLICATION_ID != "org.oxycblt.auxio.debug" + ) { Timber.plant(CopyleftNoticeTree()) } else if (BuildConfig.DEBUG) { Timber.plant(Timber.DebugTree()) @@ -72,8 +74,11 @@ class Auxio : Application() { .setIcon(IconCompat.createWithResource(this, R.drawable.ic_shortcut_shuffle_24)) .setIntent( Intent(this, MainActivity::class.java) - .setAction(INTENT_KEY_SHORTCUT_SHUFFLE)) - .build())) + .setAction(INTENT_KEY_SHORTCUT_SHUFFLE) + ) + .build() + ), + ) } companion object { diff --git a/app/src/main/java/org/oxycblt/auxio/AuxioService.kt b/app/src/main/java/org/oxycblt/auxio/AuxioService.kt index bb2d7b1af..40a218fa0 100644 --- a/app/src/main/java/org/oxycblt/auxio/AuxioService.kt +++ b/app/src/main/java/org/oxycblt/auxio/AuxioService.kt @@ -94,7 +94,7 @@ class AuxioService : override fun onGetRoot( clientPackageName: String, clientUid: Int, - rootHints: Bundle? + rootHints: Bundle?, ): BrowserRoot { return musicFragment.getRoot() } @@ -111,7 +111,7 @@ class AuxioService : override fun onLoadChildren( parentId: String, result: Result>, - options: Bundle + options: Bundle, ) { val maximumRootChildLimit = getRootChildrenLimit() musicFragment.getChildren(parentId, maximumRootChildLimit, result, options.getPage()) @@ -123,7 +123,9 @@ class AuxioService : private fun getRootChildrenLimit(): Int { return browserRootHints?.getInt( - MediaConstants.BROWSER_ROOT_HINTS_KEY_ROOT_CHILDREN_LIMIT, 4) ?: 4 + MediaConstants.BROWSER_ROOT_HINTS_KEY_ROOT_CHILDREN_LIMIT, + 4, + ) ?: 4 } private fun Bundle.getPage(): MusicServiceFragment.Page? { @@ -175,7 +177,7 @@ interface ForegroundListener { enum class Change { MEDIA_SESSION, - INDEXER + INDEXER, } } diff --git a/app/src/main/java/org/oxycblt/auxio/MainActivity.kt b/app/src/main/java/org/oxycblt/auxio/MainActivity.kt index 9430e6fd6..e7287c1b5 100644 --- a/app/src/main/java/org/oxycblt/auxio/MainActivity.kt +++ b/app/src/main/java/org/oxycblt/auxio/MainActivity.kt @@ -71,7 +71,8 @@ class MainActivity : AppCompatActivity() { startService( Intent(this, AuxioService::class.java) .setAction(AuxioService.ACTION_START) - .putExtra(AuxioService.INTENT_KEY_START_ID, IntegerTable.START_ID_ACTIVITY)) + .putExtra(AuxioService.INTENT_KEY_START_ID, IntegerTable.START_ID_ACTIVITY) + ) if (!startIntentAction(intent)) { // No intent action to do, just restore the previously saved state. diff --git a/app/src/main/java/org/oxycblt/auxio/MainFragment.kt b/app/src/main/java/org/oxycblt/auxio/MainFragment.kt index 10342f1d1..0c51e1c5a 100644 --- a/app/src/main/java/org/oxycblt/auxio/MainFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/MainFragment.kt @@ -126,7 +126,8 @@ class MainFragment : sheetBackCallback = SheetBackPressedCallback( playbackSheetBehavior = playbackSheetBehavior, - queueSheetBehavior = queueSheetBehavior) + queueSheetBehavior = queueSheetBehavior, + ) val detailBackCallback = DetailBackPressedCallback(detailModel).also { detailBackCallback = it } val selectionBackCallback = @@ -145,9 +146,13 @@ class MainFragment : // Send meaningful accessibility events for bottom sheets ViewCompat.setAccessibilityPaneTitle( - binding.playbackSheet, context.getString(R.string.lbl_playback)) + binding.playbackSheet, + context.getString(R.string.lbl_playback), + ) ViewCompat.setAccessibilityPaneTitle( - binding.queueSheet, context.getString(R.string.lbl_queue)) + binding.queueSheet, + context.getString(R.string.lbl_queue), + ) if (queueSheetBehavior != null) { // In portrait mode, set up click listeners on the stacked sheets. @@ -166,7 +171,8 @@ class MainFragment : ShapeAppearanceModel.builder( context, MR.style.ShapeAppearance_Material3_Corner_ExtraLarge, - MR.style.ShapeAppearanceOverlay_Material3_Corner_Top) + MR.style.ShapeAppearanceOverlay_Material3_Corner_Top, + ) .build() fillColor = context.getAttrColorCompat(MR.attr.colorSurfaceContainerHigh) } @@ -194,7 +200,8 @@ class MainFragment : binding, homeModel.songList.value, homeModel.isFastScrolling.value, - homeModel.currentTabType.value) + homeModel.currentTabType.value, + ) // --- VIEWMODEL SETUP --- // This has to be done here instead of the playback panel to make sure that it's prioritized @@ -281,7 +288,8 @@ class MainFragment : binding, homeModel.songList.value, homeModel.isFastScrolling.value, - homeModel.currentTabType.value) + homeModel.currentTabType.value, + ) } val playbackOutRatio = 1 - min(playbackRatio * 2, 1f) @@ -295,7 +303,8 @@ class MainFragment : binding.mainSheetScrim.alpha = playbackLastStretchRatio playbackSheetBehavior.sheetBackgroundDrawable.setCornerSize( - normalCornerSize * (1 - playbackLastStretchRatio)) + normalCornerSize * (1 - playbackLastStretchRatio) + ) binding.exploreNavHost.isInvisible = playbackLastStretchRatio == 1f binding.playbackSheet.translationZ = (1 - playbackLastStretchRatio) * elevationNormal @@ -398,13 +407,18 @@ class MainFragment : requireBinding(), homeModel.songList.value, homeModel.isFastScrolling.value, - homeModel.currentTabType.value) + homeModel.currentTabType.value, + ) } private fun updateCurrentTab(tabType: MusicType) { val binding = requireBinding() updateFabVisibility( - binding, homeModel.songList.value, homeModel.isFastScrolling.value, tabType) + binding, + homeModel.songList.value, + homeModel.isFastScrolling.value, + tabType, + ) } private fun updateIndexerState(state: IndexingState?) { @@ -415,7 +429,8 @@ class MainFragment : binding, homeModel.songList.value, homeModel.isFastScrolling.value, - homeModel.currentTabType.value) + homeModel.currentTabType.value, + ) } } @@ -428,7 +443,7 @@ class MainFragment : binding: FragmentMainBinding, songs: List, isFastScrolling: Boolean, - tabType: MusicType + tabType: MusicType, ) { // If there are no songs, it's likely that the library has not been loaded, so // displaying the shuffle FAB makes no sense. We also don't want the fast scroll @@ -448,15 +463,19 @@ class MainFragment : object : FloatingActionButton.OnVisibilityChangedListener() { override fun onHidden(fab: FloatingActionButton) { super.onHidden(fab) - if (shouldHideAllFabs( - binding, - homeModel.songList.value, - homeModel.isFastScrolling.value)) { + if ( + shouldHideAllFabs( + binding, + homeModel.songList.value, + homeModel.isFastScrolling.value, + ) + ) { return } binding.homeShuffleFab.show() } - }) + } + ) } else { L.d("Showing immediately") binding.homeShuffleFab.show() @@ -473,15 +492,19 @@ class MainFragment : object : FloatingActionButton.OnVisibilityChangedListener() { override fun onHidden(fab: FloatingActionButton) { super.onHidden(fab) - if (shouldHideAllFabs( - binding, - homeModel.songList.value, - homeModel.isFastScrolling.value)) { + if ( + shouldHideAllFabs( + binding, + homeModel.songList.value, + homeModel.isFastScrolling.value, + ) + ) { return } binding.homeNewPlaylistFab.show() } - }) + } + ) } else { L.d("Showing immediately") binding.homeNewPlaylistFab.show() @@ -493,7 +516,7 @@ class MainFragment : private fun shouldHideAllFabs( binding: FragmentMainBinding, songs: List, - isFastScrolling: Boolean + isFastScrolling: Boolean, ) = binding.exploreNavHost.findNavController().currentDestination?.id != R.id.home_fragment || sheetRising == true || @@ -579,8 +602,10 @@ class MainFragment : val queueSheetBehavior = (binding.queueSheet.coordinatorLayoutBehavior ?: return) as QueueBottomSheetBehavior - if (playbackSheetBehavior.state == BackportBottomSheetBehavior.STATE_EXPANDED && - queueSheetBehavior.targetState == BackportBottomSheetBehavior.STATE_EXPANDED) { + if ( + playbackSheetBehavior.state == BackportBottomSheetBehavior.STATE_EXPANDED && + queueSheetBehavior.targetState == BackportBottomSheetBehavior.STATE_EXPANDED + ) { // Queue sheet and playback sheet is expanded, close the queue sheet so the // playback panel can shown. L.d("Collapsing queue sheet") @@ -608,8 +633,10 @@ class MainFragment : binding.playbackSheet.coordinatorLayoutBehavior as PlaybackBottomSheetBehavior val queueSheetBehavior = (binding.queueSheet.coordinatorLayoutBehavior ?: return) as QueueBottomSheetBehavior - if (playbackSheetBehavior.state == BackportBottomSheetBehavior.STATE_EXPANDED && - queueSheetBehavior.targetState == BackportBottomSheetBehavior.STATE_COLLAPSED) { + if ( + playbackSheetBehavior.state == BackportBottomSheetBehavior.STATE_EXPANDED && + queueSheetBehavior.targetState == BackportBottomSheetBehavior.STATE_COLLAPSED + ) { // Playback sheet is expanded and queue sheet is collapsed, we can expand it. queueSheetBehavior.state = BackportBottomSheetBehavior.STATE_EXPANDED } @@ -658,7 +685,7 @@ class MainFragment : private class SheetBackPressedCallback( private val playbackSheetBehavior: PlaybackBottomSheetBehavior<*>, - private val queueSheetBehavior: QueueBottomSheetBehavior<*>? + private val queueSheetBehavior: QueueBottomSheetBehavior<*>?, ) : OnBackPressedCallback(false) { override fun handleOnBackStarted(backEvent: BackEventCompat) { if (queueSheetShown()) { @@ -766,6 +793,7 @@ class MainFragment : FloatingActionButton::class, "hide", FloatingActionButton.OnVisibilityChangedListener::class, - Boolean::class) + Boolean::class, + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/detail/AlbumDetailFragment.kt b/app/src/main/java/org/oxycblt/auxio/detail/AlbumDetailFragment.kt index 48785f276..414ccd574 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/AlbumDetailFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/AlbumDetailFragment.kt @@ -76,7 +76,11 @@ class AlbumDetailFragment : DetailFragment() { collect(musicModel.playlistDecision.flow, ::handlePlaylistDecision) collect(musicModel.playlistMessage.flow, ::handlePlaylistMessage) collectImmediately( - playbackModel.song, playbackModel.parent, playbackModel.isPlaying, ::updatePlayback) + playbackModel.song, + playbackModel.parent, + playbackModel.isPlaying, + ::updatePlayback, + ) collect(playbackModel.playbackDecision.flow, ::handlePlaybackDecision) } @@ -152,7 +156,10 @@ class AlbumDetailFragment : DetailFragment() { playbackModel.shuffle(unlikelyToBeNull(detailModel.currentAlbum.value)) } updatePlayback( - playbackModel.song.value, playbackModel.parent.value, playbackModel.isPlaying.value) + playbackModel.song.value, + playbackModel.parent.value, + playbackModel.isPlaying.value, + ) } private fun updateList(list: List) { @@ -251,7 +258,8 @@ class AlbumDetailFragment : DetailFragment() { is PlaylistDecision.Add -> { L.d("Adding ${decision.songs.size} songs to a playlist") AlbumDetailFragmentDirections.addToPlaylist( - decision.songs.map { it.uid }.toTypedArray()) + decision.songs.map { it.uid }.toTypedArray() + ) } is PlaylistDecision.New, is PlaylistDecision.Import, @@ -270,7 +278,9 @@ class AlbumDetailFragment : DetailFragment() { private fun updatePlayback(song: Song?, parent: MusicParent?, isPlaying: Boolean) { albumListAdapter.setPlaying( - song.takeIf { parent == detailModel.currentAlbum.value }, isPlaying) + song.takeIf { parent == detailModel.currentAlbum.value }, + isPlaying, + ) } private fun handlePlaybackDecision(decision: PlaybackDecision?) { @@ -318,7 +328,7 @@ class AlbumDetailFragment : DetailFragment() { viewEnd: Int, boxStart: Int, boxEnd: Int, - snapPreference: Int + snapPreference: Int, ) = (boxStart + (boxEnd - boxStart) / 2) - (viewStart + (viewEnd - viewStart) / 2) diff --git a/app/src/main/java/org/oxycblt/auxio/detail/ArtistDetailFragment.kt b/app/src/main/java/org/oxycblt/auxio/detail/ArtistDetailFragment.kt index 8f672344f..1b4beed14 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/ArtistDetailFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/ArtistDetailFragment.kt @@ -75,7 +75,11 @@ class ArtistDetailFragment : DetailFragment() { collect(musicModel.playlistDecision.flow, ::handlePlaylistDecision) collect(musicModel.playlistMessage.flow, ::handlePlaylistMessage) collectImmediately( - playbackModel.song, playbackModel.parent, playbackModel.isPlaying, ::updatePlayback) + playbackModel.song, + playbackModel.parent, + playbackModel.isPlaying, + ::updatePlayback, + ) collect(playbackModel.playbackDecision.flow, ::handlePlaybackDecision) } @@ -138,7 +142,8 @@ class ArtistDetailFragment : DetailFragment() { context.getPlural(R.plurals.fmt_song_count, artist.songs.size) } else { context.getString(R.string.def_song_count) - }) + }, + ) if (artist.songs.isNotEmpty()) { // Information about the artist's genre(s) map to the sub-head text @@ -178,7 +183,10 @@ class ArtistDetailFragment : DetailFragment() { playbackModel.shuffle(unlikelyToBeNull(detailModel.currentArtist.value)) } updatePlayback( - playbackModel.song.value, playbackModel.parent.value, playbackModel.isPlaying.value) + playbackModel.song.value, + playbackModel.parent.value, + playbackModel.isPlaying.value, + ) } private fun updateList(list: List) { @@ -274,7 +282,8 @@ class ArtistDetailFragment : DetailFragment() { is PlaylistDecision.Add -> { L.d("Adding ${decision.songs.size} songs to a playlist") ArtistDetailFragmentDirections.addToPlaylist( - decision.songs.map { it.uid }.toTypedArray()) + decision.songs.map { it.uid }.toTypedArray() + ) } is PlaylistDecision.New, is PlaylistDecision.Import, diff --git a/app/src/main/java/org/oxycblt/auxio/detail/ContinuousAppBarLayoutBehavior.kt b/app/src/main/java/org/oxycblt/auxio/detail/ContinuousAppBarLayoutBehavior.kt index d2e074d8f..d02ddf65c 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/ContinuousAppBarLayoutBehavior.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/ContinuousAppBarLayoutBehavior.kt @@ -38,7 +38,7 @@ constructor(context: Context? = null, attrs: AttributeSet? = null) : override fun onInterceptTouchEvent( parent: CoordinatorLayout, child: AppBarLayout, - ev: MotionEvent + ev: MotionEvent, ): Boolean { val consumed = super.onInterceptTouchEvent(parent, child, ev) when (ev.actionMasked) { @@ -60,7 +60,7 @@ constructor(context: Context? = null, attrs: AttributeSet? = null) : override fun onTouchEvent( parent: CoordinatorLayout, child: AppBarLayout, - ev: MotionEvent + ev: MotionEvent, ): Boolean { val consumed = super.onTouchEvent(parent, child, ev) when (ev.actionMasked) { diff --git a/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt b/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt index 8ba06b5f7..83a533afe 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/DetailGenerator.kt @@ -71,7 +71,7 @@ constructor(private val listSettings: ListSettings, private val musicRepository: private class DetailGeneratorImpl( private val invalidator: DetailGenerator.Invalidator, private val listSettings: ListSettings, - private val musicRepository: MusicRepository + private val musicRepository: MusicRepository, ) : DetailGenerator, MusicRepository.UpdateListener, ListSettings.Listener { override fun attach() { listSettings.registerListener(this) @@ -225,7 +225,7 @@ sealed interface DetailSection { DEMOS(R.string.lbl_demos), APPEARANCES(R.string.lbl_appears_on), LIVE(R.string.lbl_live_group), - REMIXES(R.string.lbl_remix_group) + REMIXES(R.string.lbl_remix_group), } } diff --git a/app/src/main/java/org/oxycblt/auxio/detail/DetailViewModel.kt b/app/src/main/java/org/oxycblt/auxio/detail/DetailViewModel.kt index 4bdb7d3f3..c9996f65c 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/DetailViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/DetailViewModel.kt @@ -67,7 +67,7 @@ constructor( private val listSettings: ListSettings, private val musicRepository: MusicRepository, private val playbackSettings: PlaybackSettings, - detailGeneratorFactory: DetailGenerator.Factory + detailGeneratorFactory: DetailGenerator.Factory, ) : ViewModel(), DetailGenerator.Invalidator { private val _toShow = MutableEvent() @@ -226,7 +226,12 @@ constructor( MusicType.ARTISTS -> { val artist = detailGenerator.artist(currentArtist.value?.uid ?: return) refreshDetail( - artist, _currentArtist, _artistSongList, _artistSongInstructions, replace) + artist, + _currentArtist, + _artistSongList, + _artistSongInstructions, + replace, + ) } MusicType.GENRES -> { val genre = detailGenerator.genre(currentGenre.value?.uid ?: return) @@ -272,7 +277,8 @@ constructor( Show.SongArtistDecision(song) } else { Show.ArtistDetails(song.artists.first()) - }) + } + ) /** * Navigate to the details of one of the [Artist]s of an [Album] using the corresponding choice @@ -286,7 +292,8 @@ constructor( Show.AlbumArtistDecision(album) } else { Show.ArtistDetails(album.artists.first()) - }) + } + ) /** * Navigate to the details of an [Artist]. @@ -518,7 +525,8 @@ constructor( } else { L.d("Playlist will be empty after removal, removing header") UpdateInstructions.Remove(at - 1, 3) - }) + }, + ) } private fun refreshAudioInfo(song: Song) { @@ -541,7 +549,10 @@ constructor( add(SongProperty(R.string.lbl_bitrate, SongProperty.Value.Bitrate(song.bitrateKbps))) add( SongProperty( - R.string.lbl_sample_rate, SongProperty.Value.SampleRate(song.sampleRateHz))) + R.string.lbl_sample_rate, + SongProperty.Value.SampleRate(song.sampleRateHz), + ) + ) song.replayGainAdjustment.track?.let { add(SongProperty(R.string.lbl_replaygain_track, SongProperty.Value.Decibels(it))) } @@ -557,7 +568,7 @@ constructor( list: MutableStateFlow>, instructions: MutableEvent, replace: Int?, - songHeader: (Int) -> PlainHeader = { SortHeader(it) } + songHeader: (Int) -> PlainHeader = { SortHeader(it) }, ) { if (detail == null) { parent.value = null @@ -611,16 +622,21 @@ constructor( private fun refreshPlaylist( uid: Music.UID, - instructions: UpdateInstructions = UpdateInstructions.Diff + instructions: UpdateInstructions = UpdateInstructions.Diff, ) { L.d("Refreshing playlist list") val edited = editedPlaylist.value if (edited == null) { val playlist = detailGenerator.playlist(uid) refreshDetail( - playlist, _currentPlaylist, _playlistSongList, _playlistSongInstructions, null) { - EditHeader(it) - } + playlist, + _currentPlaylist, + _playlistSongList, + _playlistSongInstructions, + null, + ) { + EditHeader(it) + } return } val list = mutableListOf() diff --git a/app/src/main/java/org/oxycblt/auxio/detail/GenreDetailFragment.kt b/app/src/main/java/org/oxycblt/auxio/detail/GenreDetailFragment.kt index fdc40cc17..47e058882 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/GenreDetailFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/GenreDetailFragment.kt @@ -74,7 +74,11 @@ class GenreDetailFragment : DetailFragment() { collect(musicModel.playlistDecision.flow, ::handlePlaylistDecision) collect(musicModel.playlistMessage.flow, ::handlePlaylistMessage) collectImmediately( - playbackModel.song, playbackModel.parent, playbackModel.isPlaying, ::updatePlayback) + playbackModel.song, + playbackModel.parent, + playbackModel.isPlaying, + ::updatePlayback, + ) collect(playbackModel.playbackDecision.flow, ::handlePlaybackDecision) } @@ -129,7 +133,8 @@ class GenreDetailFragment : DetailFragment() { context.getString( R.string.fmt_two, context.getPlural(R.plurals.fmt_artist_count, genre.artists.size), - context.getPlural(R.plurals.fmt_song_count, genre.songs.size)) + context.getPlural(R.plurals.fmt_song_count, genre.songs.size), + ) binding.detailPlayButton?.setOnClickListener { playbackModel.play(unlikelyToBeNull(detailModel.currentGenre.value)) } @@ -143,7 +148,10 @@ class GenreDetailFragment : DetailFragment() { playbackModel.shuffle(unlikelyToBeNull(detailModel.currentGenre.value)) } updatePlayback( - playbackModel.song.value, playbackModel.parent.value, playbackModel.isPlaying.value) + playbackModel.song.value, + playbackModel.parent.value, + playbackModel.isPlaying.value, + ) } private fun updateList(list: List) { @@ -234,7 +242,8 @@ class GenreDetailFragment : DetailFragment() { is PlaylistDecision.Add -> { L.d("Adding ${decision.songs.size} songs to a playlist") GenreDetailFragmentDirections.addToPlaylist( - decision.songs.map { it.uid }.toTypedArray()) + decision.songs.map { it.uid }.toTypedArray() + ) } is PlaylistDecision.New, is PlaylistDecision.Import, diff --git a/app/src/main/java/org/oxycblt/auxio/detail/PlaylistDetailFragment.kt b/app/src/main/java/org/oxycblt/auxio/detail/PlaylistDetailFragment.kt index b29ca2bd9..36a2fe84e 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/PlaylistDetailFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/PlaylistDetailFragment.kt @@ -106,7 +106,10 @@ class PlaylistDetailFragment : // DetailViewModel handles most initialization from the navigation argument. detailModel.setPlaylist(args.playlistUid) collectImmediately( - detailModel.currentPlaylist, detailModel.editedPlaylist, ::updatePlaylist) + detailModel.currentPlaylist, + detailModel.editedPlaylist, + ::updatePlaylist, + ) collectImmediately(detailModel.playlistSongList, ::updateList) collectImmediately(detailModel.editedPlaylist, ::updateEditedList) collect(detailModel.toShow.flow, ::handleShow) @@ -115,7 +118,11 @@ class PlaylistDetailFragment : collect(musicModel.playlistDecision.flow, ::handlePlaylistDecision) collect(musicModel.playlistMessage.flow, ::handlePlaylistMessage) collectImmediately( - playbackModel.song, playbackModel.parent, playbackModel.isPlaying, ::updatePlayback) + playbackModel.song, + playbackModel.parent, + playbackModel.isPlaying, + ::updatePlayback, + ) collect(playbackModel.playbackDecision.flow, ::handlePlaybackDecision) } @@ -171,7 +178,9 @@ class PlaylistDetailFragment : override fun onOpenParentMenu() { listModel.openMenu( - R.menu.detail_playlist, unlikelyToBeNull(detailModel.currentPlaylist.value)) + R.menu.detail_playlist, + unlikelyToBeNull(detailModel.currentPlaylist.value), + ) } override fun onOpenMenu(item: Song) { @@ -198,7 +207,8 @@ class PlaylistDetailFragment : binding.detailCover.bind( editedPlaylist, binding.context.getString(R.string.desc_playlist_image, playlist.name), - R.drawable.ic_playlist_24) + R.drawable.ic_playlist_24, + ) } else { binding.detailCover.bind(playlist) } @@ -216,7 +226,8 @@ class PlaylistDetailFragment : binding.context.getString( R.string.fmt_two, binding.context.getPlural(R.plurals.fmt_song_count, songs.size), - durationMs.formatDurationMs(true)) + durationMs.formatDurationMs(true), + ) } else { binding.context.getString(R.string.def_song_count) } @@ -251,7 +262,10 @@ class PlaylistDetailFragment : } } updatePlayback( - playbackModel.song.value, playbackModel.parent.value, playbackModel.isPlaying.value) + playbackModel.song.value, + playbackModel.parent.value, + playbackModel.isPlaying.value, + ) } private fun updateList(list: List) { @@ -303,7 +317,8 @@ class PlaylistDetailFragment : L.d("Navigating to artist choices for ${show.album}") findNavController() .navigateSafe( - PlaylistDetailFragmentDirections.showArtistChoices(show.album.uid)) + PlaylistDetailFragmentDirections.showArtistChoices(show.album.uid) + ) } is Show.PlaylistDetails -> { L.d("Navigated to this playlist") @@ -362,7 +377,8 @@ class PlaylistDetailFragment : decision.playlist.uid, decision.template, decision.applySongs.map { it.uid }.toTypedArray(), - decision.reason) + decision.reason, + ) } is PlaylistDecision.Export -> { L.d("Exporting ${decision.playlist}") @@ -375,7 +391,8 @@ class PlaylistDetailFragment : is PlaylistDecision.Add -> { L.d("Adding ${decision.songs.size} songs to a playlist") PlaylistDetailFragmentDirections.addToPlaylist( - decision.songs.map { it.uid }.toTypedArray()) + decision.songs.map { it.uid }.toTypedArray() + ) } is PlaylistDecision.New -> error("Unexpected playlist decision $decision") } @@ -391,7 +408,9 @@ class PlaylistDetailFragment : private fun updatePlayback(song: Song?, parent: MusicParent?, isPlaying: Boolean) { // Prefer songs that are playing from this playlist. playlistListAdapter.setPlaying( - song.takeIf { parent == detailModel.currentPlaylist.value }, isPlaying) + song.takeIf { parent == detailModel.currentPlaylist.value }, + isPlaying, + ) } private fun handlePlaybackDecision(decision: PlaybackDecision?) { diff --git a/app/src/main/java/org/oxycblt/auxio/detail/ReadOnlyTextInput.kt b/app/src/main/java/org/oxycblt/auxio/detail/ReadOnlyTextInput.kt index 716d70c60..928cd0f16 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/ReadOnlyTextInput.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/ReadOnlyTextInput.kt @@ -38,7 +38,7 @@ class ReadOnlyTextInput constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = R.attr.editTextStyle + defStyleAttr: Int = R.attr.editTextStyle, ) : TextInputEditText(context, attrs, defStyleAttr) { init { // Enable selection, but still disable focus (i.e Keyboard opening) @@ -50,8 +50,10 @@ constructor( // Make text immutable override fun getFreezesText() = false + // Prevent editing by default override fun getDefaultEditable() = false + // Remove the movement method that allows cursor scrolling override fun getDefaultMovementMethod() = null } diff --git a/app/src/main/java/org/oxycblt/auxio/detail/decision/ArtistShowChoice.kt b/app/src/main/java/org/oxycblt/auxio/detail/decision/ArtistShowChoice.kt index 1749a22ab..6dfb5eb8e 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/decision/ArtistShowChoice.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/decision/ArtistShowChoice.kt @@ -38,7 +38,8 @@ import org.oxycblt.musikr.Artist */ class ArtistShowChoice(private val listener: ClickableListListener) : FlexibleListAdapter( - ArtistNavigationChoiceViewHolder.DIFF_CALLBACK) { + ArtistNavigationChoiceViewHolder.DIFF_CALLBACK + ) { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ArtistNavigationChoiceViewHolder.from(parent) @@ -78,7 +79,8 @@ private constructor(private val binding: ItemPickerChoiceBinding) : */ fun from(parent: View) = ArtistNavigationChoiceViewHolder( - ItemPickerChoiceBinding.inflate(parent.context.inflater)) + ItemPickerChoiceBinding.inflate(parent.context.inflater) + ) /** A comparator that can be used with DiffUtil. */ val DIFF_CALLBACK = diff --git a/app/src/main/java/org/oxycblt/auxio/detail/decision/DetailDecisionViewModel.kt b/app/src/main/java/org/oxycblt/auxio/detail/decision/DetailDecisionViewModel.kt index b3286983c..cd31361d5 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/decision/DetailDecisionViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/decision/DetailDecisionViewModel.kt @@ -98,6 +98,7 @@ sealed interface ArtistShowChoices { val uid: Music.UID /** The current [Artist] choices. */ val choices: List + /** Sanitize this instance with a [Library]. */ fun sanitize(newLibrary: Library): ArtistShowChoices? diff --git a/app/src/main/java/org/oxycblt/auxio/detail/list/DetailListAdapter.kt b/app/src/main/java/org/oxycblt/auxio/detail/list/DetailListAdapter.kt index 8feee699b..ecb56fdd9 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/list/DetailListAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/list/DetailListAdapter.kt @@ -49,7 +49,7 @@ import org.oxycblt.musikr.Music */ abstract class DetailListAdapter( private val listener: Listener<*>, - private val diffCallback: DiffUtil.ItemCallback + private val diffCallback: DiffUtil.ItemCallback, ) : SelectionIndicatorAdapter(diffCallback) { override fun getItemViewType(position: Int) = diff --git a/app/src/main/java/org/oxycblt/auxio/detail/list/PlaylistDetailListAdapter.kt b/app/src/main/java/org/oxycblt/auxio/detail/list/PlaylistDetailListAdapter.kt index b125ed558..eeb878048 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/list/PlaylistDetailListAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/list/PlaylistDetailListAdapter.kt @@ -77,7 +77,7 @@ class PlaylistDetailListAdapter(private val listener: Listener) : override fun onBindViewHolder( holder: RecyclerView.ViewHolder, position: Int, - payloads: List + payloads: List, ) { super.onBindViewHolder(holder, position, payloads) @@ -131,7 +131,9 @@ class PlaylistDetailListAdapter(private val listener: Listener) : when { oldItem is Song && newItem is Song -> PlaylistSongViewHolder.DIFF_CALLBACK.areContentsTheSame( - oldItem, newItem) + oldItem, + newItem, + ) oldItem is EditHeader && newItem is EditHeader -> EditHeaderViewHolder.DIFF_CALLBACK.areContentsTheSame(oldItem, newItem) else -> DetailListAdapter.DIFF_CALLBACK.areContentsTheSame(oldItem, newItem) @@ -242,7 +244,9 @@ private constructor(private val binding: ItemEditableSongBinding) : MaterialShapeDrawable.createWithElevationOverlay(binding.context).apply { fillColor = binding.context.getAttrColorCompat(MR.attr.colorSurface) }, - background)) + background, + ) + ) } /** diff --git a/app/src/main/java/org/oxycblt/auxio/detail/list/PlaylistDragCallback.kt b/app/src/main/java/org/oxycblt/auxio/detail/list/PlaylistDragCallback.kt index c93514e14..f33e3b521 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/list/PlaylistDragCallback.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/list/PlaylistDragCallback.kt @@ -31,10 +31,12 @@ class PlaylistDragCallback(private val detailModel: DetailViewModel) : MaterialD override fun onMove( recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, - target: RecyclerView.ViewHolder + target: RecyclerView.ViewHolder, ) = detailModel.movePlaylistSongs( - viewHolder.bindingAdapterPosition, target.bindingAdapterPosition) + viewHolder.bindingAdapterPosition, + target.bindingAdapterPosition, + ) override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) { detailModel.removePlaylistSong(viewHolder.bindingAdapterPosition) diff --git a/app/src/main/java/org/oxycblt/auxio/detail/list/SongPropertyAdapter.kt b/app/src/main/java/org/oxycblt/auxio/detail/list/SongPropertyAdapter.kt index eef657286..c1a8e857d 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/list/SongPropertyAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/list/SongPropertyAdapter.kt @@ -46,7 +46,8 @@ import org.oxycblt.musikr.tag.Date */ class SongPropertyAdapter : FlexibleListAdapter( - SongPropertyViewHolder.DIFF_CALLBACK) { + SongPropertyViewHolder.DIFF_CALLBACK + ) { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = SongPropertyViewHolder.from(parent) @@ -115,7 +116,8 @@ class SongPropertyViewHolder private constructor(private val binding: ItemSongPr context.getString(R.string.fmt_zipped_names, value, subtitle) } else { value - }) + } + ) } is SongProperty.Value.ItemDate -> { val date = property.value.date diff --git a/app/src/main/java/org/oxycblt/auxio/detail/sort/GenreSongSortDialog.kt b/app/src/main/java/org/oxycblt/auxio/detail/sort/GenreSongSortDialog.kt index b996c71f4..c578162c6 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/sort/GenreSongSortDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/sort/GenreSongSortDialog.kt @@ -58,7 +58,8 @@ class GenreSongSortDialog : SortDialog() { Sort.Mode.ByArtist, Sort.Mode.ByAlbum, Sort.Mode.ByDate, - Sort.Mode.ByDuration) + Sort.Mode.ByDuration, + ) private fun updateGenre(genre: Genre?) { if (genre == null) { diff --git a/app/src/main/java/org/oxycblt/auxio/detail/sort/PlaylistSongSortDialog.kt b/app/src/main/java/org/oxycblt/auxio/detail/sort/PlaylistSongSortDialog.kt index 090428035..75b6c50db 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/sort/PlaylistSongSortDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/sort/PlaylistSongSortDialog.kt @@ -58,7 +58,8 @@ class PlaylistSongSortDialog : SortDialog() { Sort.Mode.ByArtist, Sort.Mode.ByAlbum, Sort.Mode.ByDate, - Sort.Mode.ByDuration) + Sort.Mode.ByDuration, + ) private fun updatePlaylist(genre: Playlist?) { if (genre == null) { diff --git a/app/src/main/java/org/oxycblt/auxio/home/ErrorDetailsDialog.kt b/app/src/main/java/org/oxycblt/auxio/home/ErrorDetailsDialog.kt index 933ee6848..35daab67d 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/ErrorDetailsDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/ErrorDetailsDialog.kt @@ -77,7 +77,8 @@ class ErrorDetailsDialog : ViewBindingMaterialDialogFragment { L.d("Importing playlist") @@ -371,7 +377,8 @@ class HomeFragment : decision.playlist.uid, decision.template, decision.applySongs.map { it.uid }.toTypedArray(), - decision.reason) + decision.reason, + ) } is PlaylistDecision.Export -> { L.d("Exporting ${decision.playlist}") @@ -384,7 +391,8 @@ class HomeFragment : is PlaylistDecision.Add -> { L.d("Adding ${decision.songs.size} to a playlist") HomeFragmentDirections.addToPlaylist( - decision.songs.map { it.uid }.toTypedArray()) + decision.songs.map { it.uid }.toTypedArray() + ) } } findNavController().navigateSafe(directions) @@ -491,7 +499,7 @@ class HomeFragment : private class HomePagerAdapter( private val tabs: List, fragmentManager: FragmentManager, - lifecycleOwner: LifecycleOwner + lifecycleOwner: LifecycleOwner, ) : FragmentStateAdapter(fragmentManager, lifecycleOwner.lifecycle) { override fun getItemCount() = tabs.size diff --git a/app/src/main/java/org/oxycblt/auxio/home/HomeSettings.kt b/app/src/main/java/org/oxycblt/auxio/home/HomeSettings.kt index aadacc21d..96d6e3455 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/HomeSettings.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/HomeSettings.kt @@ -43,6 +43,7 @@ interface HomeSettings : Settings { interface Listener { /** Called when the [homeTabs] configuration changes. */ fun onTabsChanged() {} + /** Called when the [shouldHideCollaborators] configuration changes. */ fun onHideCollaboratorsChanged() {} } @@ -54,8 +55,10 @@ class HomeSettingsImpl @Inject constructor(@ApplicationContext context: Context) get() = Tab.fromIntCode( sharedPreferences.getInt( - getString(R.string.set_key_home_tabs), Tab.SEQUENCE_DEFAULT)) - ?: unlikelyToBeNull(Tab.fromIntCode(Tab.SEQUENCE_DEFAULT)) + getString(R.string.set_key_home_tabs), + Tab.SEQUENCE_DEFAULT, + ) + ) ?: unlikelyToBeNull(Tab.fromIntCode(Tab.SEQUENCE_DEFAULT)) set(value) { sharedPreferences.edit { putInt(getString(R.string.set_key_home_tabs), Tab.toIntCode(value)) diff --git a/app/src/main/java/org/oxycblt/auxio/home/HomeViewModel.kt b/app/src/main/java/org/oxycblt/auxio/home/HomeViewModel.kt index a140a4dff..1402de7b1 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/HomeViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/HomeViewModel.kt @@ -50,7 +50,7 @@ class HomeViewModel constructor( private val listSettings: ListSettings, private val playbackSettings: PlaybackSettings, - homeGeneratorFactory: HomeGenerator.Factory + homeGeneratorFactory: HomeGenerator.Factory, ) : ViewModel(), HomeGenerator.Invalidator { private val _songList = MutableStateFlow(listOf()) /** A list of [Song]s, sorted by the preferred [Sort], to be shown in the home view. */ diff --git a/app/src/main/java/org/oxycblt/auxio/home/ThemedSpeedDialView.kt b/app/src/main/java/org/oxycblt/auxio/home/ThemedSpeedDialView.kt index 7f686dec3..7e813b38b 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/ThemedSpeedDialView.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/ThemedSpeedDialView.kt @@ -75,7 +75,7 @@ class ThemedSpeedDialView : SpeedDialView { constructor( context: Context, attrs: AttributeSet?, - @AttrRes defStyleAttr: Int + @AttrRes defStyleAttr: Int, ) : super(context, attrs, defStyleAttr) private val stationaryConfig = AnimConfig.of(context, AnimConfig.STANDARD, AnimConfig.MEDIUM2) @@ -121,10 +121,12 @@ class ThemedSpeedDialView : SpeedDialView { mainFab.backgroundTintList = ColorStateList.valueOf( if (isOpen) mainFabClosedBackgroundColor - else mainFabOpenedBackgroundColor) + else mainFabOpenedBackgroundColor + ) mainFab.imageTintList = ColorStateList.valueOf( - if (isOpen) mainFabClosedIconColor else mainFabOpenedIconColor) + if (isOpen) mainFabClosedIconColor else mainFabOpenedIconColor + ) mainFabAnimator?.cancel() mainFabAnimator = createMainFabAnimator(isOpen).apply { @@ -133,12 +135,14 @@ class ThemedSpeedDialView : SpeedDialView { override fun onAnimationEnd(animation: Animator) { mainFabAnimator = null } - }) + } + ) start() } innerChangeListener?.invoke(isOpen) } - }) + } + ) } private fun createMainFabAnimator(isOpen: Boolean): Animator { @@ -150,7 +154,8 @@ class ThemedSpeedDialView : SpeedDialView { ObjectAnimator.ofArgb( mainFab, VIEW_PROPERTY_BACKGROUND_TINT, - if (isOpen) mainFabOpenedBackgroundColor else mainFabClosedBackgroundColor) + if (isOpen) mainFabOpenedBackgroundColor else mainFabClosedBackgroundColor, + ) .apply { startDelay = delay duration = partialDuration @@ -160,7 +165,8 @@ class ThemedSpeedDialView : SpeedDialView { ObjectAnimator.ofArgb( mainFab, IMAGE_VIEW_PROPERTY_IMAGE_TINT, - if (isOpen) mainFabOpenedIconColor else mainFabClosedIconColor) + if (isOpen) mainFabOpenedIconColor else mainFabClosedIconColor, + ) .apply { startDelay = delay duration = partialDuration @@ -168,7 +174,10 @@ class ThemedSpeedDialView : SpeedDialView { val levelAnimator = ObjectAnimator.ofInt( - mainFab.drawable, DRAWABLE_PROPERTY_LEVEL, if (isOpen) 10000 else 0) + mainFab.drawable, + DRAWABLE_PROPERTY_LEVEL, + if (isOpen) 10000 else 0, + ) .apply { duration = totalDuration } val animatorSet = @@ -204,7 +213,7 @@ class ThemedSpeedDialView : SpeedDialView { override fun addActionItem( actionItem: SpeedDialActionItem, position: Int, - animate: Boolean + animate: Boolean, ): FabWithLabelView? { val context = context val fabImageTintColor = context.getAttrColorCompat(androidx.appcompat.R.attr.colorPrimary) @@ -220,7 +229,8 @@ class ThemedSpeedDialView : SpeedDialView { SpeedDialActionItem.Builder( actionItem.id, // Should not be a resource, pass null to fail fast. - actionItem.getFabImageDrawable(null)) + actionItem.getFabImageDrawable(null), + ) .setLabel(actionItem.getLabel(context)) .setFabImageTintColor(fabImageTintColor.defaultColor) .setFabBackgroundColor(fabBackgroundColor.defaultColor) @@ -269,7 +279,10 @@ class ThemedSpeedDialView : SpeedDialView { override fun onSaveInstanceState(): Parcelable { val superState = BundleCompat.getParcelable( - super.onSaveInstanceState() as Bundle, "superState", Parcelable::class.java) + super.onSaveInstanceState() as Bundle, + "superState", + Parcelable::class.java, + ) return State(superState, isOpen) } diff --git a/app/src/main/java/org/oxycblt/auxio/home/list/AlbumListFragment.kt b/app/src/main/java/org/oxycblt/auxio/home/list/AlbumListFragment.kt index 23a031c21..6bda9dd9b 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/list/AlbumListFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/list/AlbumListFragment.kt @@ -94,7 +94,11 @@ class AlbumListFragment : collectImmediately(homeModel.empty, musicModel.indexingState, ::updateNoMusicIndicator) collectImmediately(listModel.selected, ::updateSelection) collectImmediately( - playbackModel.song, playbackModel.parent, playbackModel.isPlaying, ::updatePlayback) + playbackModel.song, + playbackModel.parent, + playbackModel.isPlaying, + ::updatePlayback, + ) } override fun onDestroyBinding(binding: FragmentHomeListBinding) { @@ -134,7 +138,8 @@ class AlbumListFragment : formatter, dateAddedMillis, dateAddedMillis, - DateUtils.FORMAT_ABBREV_ALL) + DateUtils.FORMAT_ABBREV_ALL, + ) .toString() } diff --git a/app/src/main/java/org/oxycblt/auxio/home/list/ArtistListFragment.kt b/app/src/main/java/org/oxycblt/auxio/home/list/ArtistListFragment.kt index addf0ff62..5951c2900 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/list/ArtistListFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/list/ArtistListFragment.kt @@ -89,7 +89,11 @@ class ArtistListFragment : collectImmediately(homeModel.empty, musicModel.indexingState, ::updateNoMusicIndicator) collectImmediately(listModel.selected, ::updateSelection) collectImmediately( - playbackModel.song, playbackModel.parent, playbackModel.isPlaying, ::updatePlayback) + playbackModel.song, + playbackModel.parent, + playbackModel.isPlaying, + ::updatePlayback, + ) } override fun onDestroyBinding(binding: FragmentHomeListBinding) { diff --git a/app/src/main/java/org/oxycblt/auxio/home/list/GenreListFragment.kt b/app/src/main/java/org/oxycblt/auxio/home/list/GenreListFragment.kt index e2a2142b3..69621541c 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/list/GenreListFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/list/GenreListFragment.kt @@ -88,7 +88,11 @@ class GenreListFragment : collectImmediately(homeModel.empty, musicModel.indexingState, ::updateNoMusicIndicator) collectImmediately(listModel.selected, ::updateSelection) collectImmediately( - playbackModel.song, playbackModel.parent, playbackModel.isPlaying, ::updatePlayback) + playbackModel.song, + playbackModel.parent, + playbackModel.isPlaying, + ::updatePlayback, + ) } override fun onDestroyBinding(binding: FragmentHomeListBinding) { diff --git a/app/src/main/java/org/oxycblt/auxio/home/list/PlaylistListFragment.kt b/app/src/main/java/org/oxycblt/auxio/home/list/PlaylistListFragment.kt index eb8de750c..e453bbaa8 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/list/PlaylistListFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/list/PlaylistListFragment.kt @@ -85,10 +85,15 @@ class PlaylistListFragment : homeModel.empty, homeModel.playlistList, musicModel.indexingState, - ::updateNoMusicIndicator) + ::updateNoMusicIndicator, + ) collectImmediately(listModel.selected, ::updateSelection) collectImmediately( - playbackModel.song, playbackModel.parent, playbackModel.isPlaying, ::updatePlayback) + playbackModel.song, + playbackModel.parent, + playbackModel.isPlaying, + ::updatePlayback, + ) } override fun onDestroyBinding(binding: FragmentHomeListBinding) { @@ -137,7 +142,7 @@ class PlaylistListFragment : private fun updateNoMusicIndicator( empty: Boolean, playlists: List, - indexingState: IndexingState? + indexingState: IndexingState?, ) { val binding = requireBinding() binding.homeRecycler.isInvisible = empty diff --git a/app/src/main/java/org/oxycblt/auxio/home/list/SongListFragment.kt b/app/src/main/java/org/oxycblt/auxio/home/list/SongListFragment.kt index 08700b6a8..3e03623f0 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/list/SongListFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/list/SongListFragment.kt @@ -92,7 +92,11 @@ class SongListFragment : collectImmediately(homeModel.empty, musicModel.indexingState, ::updateNoMusicIndicator) collectImmediately(listModel.selected, ::updateSelection) collectImmediately( - playbackModel.song, playbackModel.parent, playbackModel.isPlaying, ::updatePlayback) + playbackModel.song, + playbackModel.parent, + playbackModel.isPlaying, + ::updatePlayback, + ) } override fun onDestroyBinding(binding: FragmentHomeListBinding) { @@ -134,7 +138,8 @@ class SongListFragment : formatter, dateAddedMillis, dateAddedMillis, - DateUtils.FORMAT_ABBREV_ALL) + DateUtils.FORMAT_ABBREV_ALL, + ) .toString() } diff --git a/app/src/main/java/org/oxycblt/auxio/home/sort/AlbumSortDialog.kt b/app/src/main/java/org/oxycblt/auxio/home/sort/AlbumSortDialog.kt index 39efb1ca1..ad33d35df 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/sort/AlbumSortDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/sort/AlbumSortDialog.kt @@ -46,5 +46,6 @@ class AlbumSortDialog : SortDialog() { Sort.Mode.ByDate, Sort.Mode.ByDuration, Sort.Mode.ByCount, - Sort.Mode.ByDateAdded) + Sort.Mode.ByDateAdded, + ) } diff --git a/app/src/main/java/org/oxycblt/auxio/home/sort/SongSortDialog.kt b/app/src/main/java/org/oxycblt/auxio/home/sort/SongSortDialog.kt index a961a39c4..5112e2d71 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/sort/SongSortDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/sort/SongSortDialog.kt @@ -46,5 +46,6 @@ class SongSortDialog : SortDialog() { Sort.Mode.ByAlbum, Sort.Mode.ByDate, Sort.Mode.ByDuration, - Sort.Mode.ByDateAdded) + Sort.Mode.ByDateAdded, + ) } diff --git a/app/src/main/java/org/oxycblt/auxio/home/tabs/Tab.kt b/app/src/main/java/org/oxycblt/auxio/home/tabs/Tab.kt index 5f741bad2..14e936f5f 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/tabs/Tab.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/tabs/Tab.kt @@ -73,7 +73,8 @@ sealed class Tab(open val type: MusicType) { MusicType.ALBUMS, MusicType.ARTISTS, MusicType.GENRES, - MusicType.PLAYLISTS) + MusicType.PLAYLISTS, + ) /** * Convert an array of [Tab]s into it's integer representation. @@ -86,7 +87,8 @@ sealed class Tab(open val type: MusicType) { val distinct = tabs.distinctBy { it.type } if (tabs.size != distinct.size) { L.w( - "Tab sequences should not have duplicates [old: ${tabs.size} new: ${distinct.size}]") + "Tab sequences should not have duplicates [old: ${tabs.size} new: ${distinct.size}]" + ) } var sequence = 0 @@ -133,7 +135,8 @@ sealed class Tab(open val type: MusicType) { val distinct = tabs.distinctBy { it.type } if (tabs.size != distinct.size) { L.w( - "Tab sequences should not have duplicates [old: ${tabs.size} new: ${distinct.size}]") + "Tab sequences should not have duplicates [old: ${tabs.size} new: ${distinct.size}]" + ) } // For safety, return null if we have an empty or larger-than-expected tab array. diff --git a/app/src/main/java/org/oxycblt/auxio/home/tabs/TabAdapter.kt b/app/src/main/java/org/oxycblt/auxio/home/tabs/TabAdapter.kt index 592b808b7..e178f8ab8 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/tabs/TabAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/tabs/TabAdapter.kt @@ -117,7 +117,8 @@ class TabViewHolder private constructor(private val binding: ItemTabBinding) : MusicType.ARTISTS -> R.string.lbl_artists MusicType.GENRES -> R.string.lbl_genres MusicType.PLAYLISTS -> R.string.lbl_playlists - }) + } + ) // Unlike in other adapters, we update the checked state alongside // the tab data since they are in the same data structure (Tab) diff --git a/app/src/main/java/org/oxycblt/auxio/home/tabs/TabDragCallback.kt b/app/src/main/java/org/oxycblt/auxio/home/tabs/TabDragCallback.kt index 49af3b57b..8d0b45a9f 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/tabs/TabDragCallback.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/tabs/TabDragCallback.kt @@ -30,7 +30,7 @@ import androidx.recyclerview.widget.RecyclerView class TabDragCallback(private val adapter: TabAdapter) : ItemTouchHelper.Callback() { override fun getMovementFlags( recyclerView: RecyclerView, - viewHolder: RecyclerView.ViewHolder + viewHolder: RecyclerView.ViewHolder, ) = // Allow dragging up and down only makeFlag(ItemTouchHelper.ACTION_STATE_DRAG, ItemTouchHelper.UP or ItemTouchHelper.DOWN) @@ -41,7 +41,7 @@ class TabDragCallback(private val adapter: TabAdapter) : ItemTouchHelper.Callbac dX: Float, dY: Float, actionState: Int, - isCurrentlyActive: Boolean + isCurrentlyActive: Boolean, ) { viewHolder.itemView.translationX = dX viewHolder.itemView.translationY = dY @@ -55,7 +55,7 @@ class TabDragCallback(private val adapter: TabAdapter) : ItemTouchHelper.Callbac override fun onMove( recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, - target: RecyclerView.ViewHolder + target: RecyclerView.ViewHolder, ): Boolean { // I don't think it's possible to jump more than one position at a time, so a swap // will work just fine. diff --git a/app/src/main/java/org/oxycblt/auxio/image/BitmapProvider.kt b/app/src/main/java/org/oxycblt/auxio/image/BitmapProvider.kt index ac77b5d7a..77b1a6f68 100644 --- a/app/src/main/java/org/oxycblt/auxio/image/BitmapProvider.kt +++ b/app/src/main/java/org/oxycblt/auxio/image/BitmapProvider.kt @@ -44,7 +44,7 @@ class BitmapProvider @Inject constructor( @ApplicationContext private val context: Context, - private val imageLoader: ImageLoader + private val imageLoader: ImageLoader, ) { /** * An extension of [Disposable] with an additional [Target] to deliver the final [Bitmap] to. @@ -96,7 +96,8 @@ constructor( ImageRequest.Builder(context) .data(song.cover) // Use ORIGINAL sizing, as we are not loading into any View-like component. - .size(Size.ORIGINAL)) + .size(Size.ORIGINAL) + ) .target( onSuccess = { synchronized(this) { @@ -111,7 +112,8 @@ constructor( target.onCompleted(null) } } - }) + }, + ) currentRequest = Request(imageLoader.enqueue(imageRequest.build()), target) } diff --git a/app/src/main/java/org/oxycblt/auxio/image/CoverProvider.kt b/app/src/main/java/org/oxycblt/auxio/image/CoverProvider.kt index 286d820a7..b4e23e220 100644 --- a/app/src/main/java/org/oxycblt/auxio/image/CoverProvider.kt +++ b/app/src/main/java/org/oxycblt/auxio/image/CoverProvider.kt @@ -56,7 +56,7 @@ class CoverProvider : ContentProvider() { projection: Array?, selection: String?, selectionArgs: Array?, - sortOrder: String? + sortOrder: String?, ): Cursor = throw UnsupportedOperationException() override fun insert(uri: Uri, values: ContentValues?): Uri? = null @@ -67,7 +67,7 @@ class CoverProvider : ContentProvider() { uri: Uri, values: ContentValues?, selection: String?, - selectionArgs: Array? + selectionArgs: Array?, ): Int = 0 companion object { diff --git a/app/src/main/java/org/oxycblt/auxio/image/CoverView.kt b/app/src/main/java/org/oxycblt/auxio/image/CoverView.kt index 962dc549b..fa68e91e0 100644 --- a/app/src/main/java/org/oxycblt/auxio/image/CoverView.kt +++ b/app/src/main/java/org/oxycblt/auxio/image/CoverView.kt @@ -90,7 +90,7 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr private data class PlaybackIndicator( val view: ImageView, val playingDrawable: AnimationDrawable, - val pausedDrawable: Drawable + val pausedDrawable: Drawable, ) private val playbackIndicator: PlaybackIndicator? @@ -120,7 +120,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr context, com.google.android.material.R.style .ShapeAppearance_Material3_Corner_Medium, - -1) + -1, + ) .build() } } else { @@ -147,11 +148,14 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr ImageView(context).apply { scaleType = ImageView.ScaleType.MATRIX ImageViewCompat.setImageTintList( - this, context.getColorCompat(R.color.sel_on_cover_bg)) + this, + context.getColorCompat(R.color.sel_on_cover_bg), + ) }, context.getDrawableCompat(R.drawable.ic_playing_indicator_24) as AnimationDrawable, - context.getDrawableCompat(R.drawable.ic_paused_indicator_24)) + context.getDrawableCompat(R.drawable.ic_paused_indicator_24), + ) } else { null } @@ -193,7 +197,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr gravity = Gravity.BOTTOM or Gravity.END val spacing = context.getDimenPixels(R.dimen.spacing_tiny) updateMarginsRelative(bottom = spacing, end = spacing) - }) + }, + ) } } @@ -214,14 +219,20 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr 0f, 0f, drawable.intrinsicWidth.toFloat(), - drawable.intrinsicHeight.toFloat()) + drawable.intrinsicHeight.toFloat(), + ) indicatorMatrixDst.set(0f, 0f, iconSize.toFloat(), iconSize.toFloat()) indicatorMatrix.setRectToRect( - indicatorMatrixSrc, indicatorMatrixDst, Matrix.ScaleToFit.CENTER) + indicatorMatrixSrc, + indicatorMatrixDst, + Matrix.ScaleToFit.CENTER, + ) // Then actually center it into the icon. indicatorMatrix.postTranslate( - (measuredWidth - iconSize) / 2f, (measuredHeight - iconSize) / 2f) + (measuredWidth - iconSize) / 2f, + (measuredHeight - iconSize) / 2f, + ) } } } @@ -319,7 +330,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr bindImpl( song.cover, context.getString(R.string.desc_album_cover, song.album.name), - R.drawable.ic_album_24) + R.drawable.ic_album_24, + ) /** * Bind an [Album]'s image to this view. @@ -341,7 +353,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr bindImpl( mostProminentCover, context.getString(R.string.desc_album_cover, album.name), - R.drawable.ic_album_24) + R.drawable.ic_album_24, + ) } /** @@ -353,7 +366,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr bindImpl( artist.covers, context.getString(R.string.desc_artist_image, artist.name), - R.drawable.ic_artist_24) + R.drawable.ic_artist_24, + ) /** * Bind a [Genre]'s image to this view. @@ -364,7 +378,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr bindImpl( genre.covers, context.getString(R.string.desc_genre_image, genre.name), - R.drawable.ic_genre_24) + R.drawable.ic_genre_24, + ) /** * Bind a [Playlist]'s image to this view. @@ -375,7 +390,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr bindImpl( playlist.covers, context.getString(R.string.desc_playlist_image, playlist.name), - R.drawable.ic_playlist_24) + R.drawable.ic_playlist_24, + ) /** * Bind the covers of a generic list of [Song]s. @@ -392,14 +408,16 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr ImageRequest.Builder(context) .data(cover) .error( - StyledDrawable(context, context.getDrawableCompat(errorRes), iconSize) - .asImage()) + StyledDrawable(context, context.getDrawableCompat(errorRes), iconSize).asImage() + ) .target(image) val cornersTransformation = RoundedRectTransformation( shapeAppearance.topLeftCornerSize.getCornerSize( - RectF(left.toFloat(), top.toFloat(), right.toFloat(), bottom.toFloat()))) + RectF(left.toFloat(), top.toFloat(), right.toFloat(), bottom.toFloat()) + ) + ) if (imageSettings.forceSquareCovers) { request.transformations(SquareCropTransformation.INSTANCE, cornersTransformation) } else { @@ -419,7 +437,7 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr private class StyledDrawable( context: Context, private val inner: Drawable, - @Px val iconSize: Int? + @Px val iconSize: Int?, ) : Drawable() { init { // Re-tint the drawable to use the analogous "on surface" color for diff --git a/app/src/main/java/org/oxycblt/auxio/image/ImageSettings.kt b/app/src/main/java/org/oxycblt/auxio/image/ImageSettings.kt index 12671f822..f220825c0 100644 --- a/app/src/main/java/org/oxycblt/auxio/image/ImageSettings.kt +++ b/app/src/main/java/org/oxycblt/auxio/image/ImageSettings.kt @@ -48,16 +48,18 @@ class ImageSettingsImpl @Inject constructor(@ApplicationContext context: Context override val coverMode: CoverMode get() = CoverMode.fromIntCode( - sharedPreferences.getInt(getString(R.string.set_key_cover_mode), Int.MIN_VALUE)) - ?: CoverMode.BALANCED + sharedPreferences.getInt(getString(R.string.set_key_cover_mode), Int.MIN_VALUE) + ) ?: CoverMode.BALANCED override val forceSquareCovers: Boolean get() = sharedPreferences.getBoolean(getString(R.string.set_key_square_covers), false) override fun migrate() { // Show album covers and Ignore MediaStore covers were unified in 3.0.0 - if (sharedPreferences.contains(OLD_KEY_SHOW_COVERS) || - sharedPreferences.contains(OLD_KEY_QUALITY_COVERS)) { + if ( + sharedPreferences.contains(OLD_KEY_SHOW_COVERS) || + sharedPreferences.contains(OLD_KEY_QUALITY_COVERS) + ) { L.d("Migrating cover settings") val mode = @@ -95,8 +97,10 @@ class ImageSettingsImpl @Inject constructor(@ApplicationContext context: Context } override fun onSettingChanged(key: String, listener: ImageSettings.Listener) { - if (key == getString(R.string.set_key_cover_mode) || - key == getString(R.string.set_key_square_covers)) { + if ( + key == getString(R.string.set_key_cover_mode) || + key == getString(R.string.set_key_square_covers) + ) { L.d("Dispatching image setting change") listener.onImageSettingsChanged() } diff --git a/app/src/main/java/org/oxycblt/auxio/image/coil/CoilModule.kt b/app/src/main/java/org/oxycblt/auxio/image/coil/CoilModule.kt index 59f904d66..8f80d12e0 100644 --- a/app/src/main/java/org/oxycblt/auxio/image/coil/CoilModule.kt +++ b/app/src/main/java/org/oxycblt/auxio/image/coil/CoilModule.kt @@ -39,7 +39,7 @@ class CoilModule { coverKeyer: CoverKeyer, coverFactory: CoverFetcher.Factory, coverCollectionKeyer: CoverCollectionKeyer, - coverCollectionFactory: CoverCollectionFetcher.Factory + coverCollectionFactory: CoverCollectionFetcher.Factory, ) = ImageLoader.Builder(context) .components { diff --git a/app/src/main/java/org/oxycblt/auxio/image/coil/CoverCollectionFetcher.kt b/app/src/main/java/org/oxycblt/auxio/image/coil/CoverCollectionFetcher.kt index 286e59a93..0246a0532 100644 --- a/app/src/main/java/org/oxycblt/auxio/image/coil/CoverCollectionFetcher.kt +++ b/app/src/main/java/org/oxycblt/auxio/image/coil/CoverCollectionFetcher.kt @@ -80,7 +80,8 @@ private constructor( return SourceFetchResult( source = ImageSource(first.source().buffer(), FileSystem.SYSTEM, null), mimeType = null, - dataSource = DataSource.DISK) + dataSource = DataSource.DISK, + ) } /** Derived from phonograph: https://github.com/kabouzeid/Phonograph */ @@ -107,7 +108,9 @@ private constructor( // TODO: Work around this val bitmap = SquareCropTransformation.INSTANCE.transform( - BitmapFactory.decodeStream(stream), mosaicFrameSize) + BitmapFactory.decodeStream(stream), + mosaicFrameSize, + ) canvas.drawBitmap(bitmap, x.toFloat(), y.toFloat(), null) x += bitmap.width @@ -123,7 +126,8 @@ private constructor( return ImageFetchResult( image = mosaicBitmap.toDrawable(context.resources).asImage(), isSampled = true, - dataSource = DataSource.DISK) + dataSource = DataSource.DISK, + ) } private fun Dimension.mosaicSize(): Int { diff --git a/app/src/main/java/org/oxycblt/auxio/image/coil/CoverFetcher.kt b/app/src/main/java/org/oxycblt/auxio/image/coil/CoverFetcher.kt index bc6284ee5..843f1b206 100644 --- a/app/src/main/java/org/oxycblt/auxio/image/coil/CoverFetcher.kt +++ b/app/src/main/java/org/oxycblt/auxio/image/coil/CoverFetcher.kt @@ -37,7 +37,8 @@ class CoverFetcher private constructor(private val cover: Cover) : Fetcher { return SourceFetchResult( source = ImageSource(stream.source().buffer(), FileSystem.SYSTEM, null), mimeType = null, - dataSource = DataSource.DISK) + dataSource = DataSource.DISK, + ) } class Factory @Inject constructor() : Fetcher.Factory { diff --git a/app/src/main/java/org/oxycblt/auxio/image/coil/RoundedRectTransformation.kt b/app/src/main/java/org/oxycblt/auxio/image/coil/RoundedRectTransformation.kt index 6220f3bd7..79fc7e842 100644 --- a/app/src/main/java/org/oxycblt/auxio/image/coil/RoundedRectTransformation.kt +++ b/app/src/main/java/org/oxycblt/auxio/image/coil/RoundedRectTransformation.kt @@ -47,7 +47,7 @@ class RoundedRectTransformation( @Px private val topLeft: Float = 0f, @Px private val topRight: Float = 0f, @Px private val bottomLeft: Float = 0f, - @Px private val bottomRight: Float = 0f + @Px private val bottomRight: Float = 0f, ) : Transformation() { constructor(@Px radius: Float) : this(radius, radius, radius, radius) @@ -69,7 +69,8 @@ class RoundedRectTransformation( createBitmap( outputWidth, outputHeight, - requireNotNull(input.config) { "unsupported bitmap format" }) + requireNotNull(input.config) { "unsupported bitmap format" }, + ) output.applyCanvas { drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR) @@ -80,7 +81,8 @@ class RoundedRectTransformation( srcHeight = input.height, dstWidth = outputWidth, dstHeight = outputHeight, - scale = Scale.FILL) + scale = Scale.FILL, + ) .toFloat() val dx = (outputWidth - multiplier * input.width) / 2 val dy = (outputHeight - multiplier * input.height) / 2 @@ -121,7 +123,8 @@ class RoundedRectTransformation( srcHeight = input.height, dstWidth = size.width.pxOrElse { Int.MIN_VALUE }, dstHeight = size.height.pxOrElse { Int.MIN_VALUE }, - scale = Scale.FIT) + scale = Scale.FIT, + ) val outputWidth = (multiplier * input.width).roundToInt() val outputHeight = (multiplier * input.height).roundToInt() return outputWidth to outputHeight diff --git a/app/src/main/java/org/oxycblt/auxio/image/covers/SettingCovers.kt b/app/src/main/java/org/oxycblt/auxio/image/covers/SettingCovers.kt index 9f1d244cb..6b6494d0b 100644 --- a/app/src/main/java/org/oxycblt/auxio/image/covers/SettingCovers.kt +++ b/app/src/main/java/org/oxycblt/auxio/image/covers/SettingCovers.kt @@ -64,7 +64,10 @@ class SettingCoversImpl @Inject constructor(private val imageSettings: ImageSett val revisionedTranscoding = RevisionedTranscoding(revision, transcoding) val storedCovers = MutableStoredCovers( - EmbeddedCovers(CoverIdentifier.md5()), coverStorage, revisionedTranscoding) + EmbeddedCovers(CoverIdentifier.md5()), + coverStorage, + revisionedTranscoding, + ) val fsCovers = MutableFSCovers(context) return MutableChainedCovers(storedCovers, fsCovers) } diff --git a/app/src/main/java/org/oxycblt/auxio/list/ListSettings.kt b/app/src/main/java/org/oxycblt/auxio/list/ListSettings.kt index 7dcbfa13f..7fe5d6afe 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/ListSettings.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/ListSettings.kt @@ -68,8 +68,8 @@ class ListSettingsImpl @Inject constructor(@ApplicationContext val context: Cont override var songSort: Sort get() = Sort.fromIntCode( - sharedPreferences.getInt(getString(R.string.set_key_songs_sort), Int.MIN_VALUE)) - ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) + sharedPreferences.getInt(getString(R.string.set_key_songs_sort), Int.MIN_VALUE) + ) ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) set(value) { sharedPreferences.edit { putInt(getString(R.string.set_key_songs_sort), value.intCode) @@ -80,8 +80,8 @@ class ListSettingsImpl @Inject constructor(@ApplicationContext val context: Cont override var albumSort: Sort get() = Sort.fromIntCode( - sharedPreferences.getInt(getString(R.string.set_key_albums_sort), Int.MIN_VALUE)) - ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) + sharedPreferences.getInt(getString(R.string.set_key_albums_sort), Int.MIN_VALUE) + ) ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) set(value) { sharedPreferences.edit { putInt(getString(R.string.set_key_albums_sort), value.intCode) @@ -92,8 +92,8 @@ class ListSettingsImpl @Inject constructor(@ApplicationContext val context: Cont override var artistSort: Sort get() = Sort.fromIntCode( - sharedPreferences.getInt(getString(R.string.set_key_artists_sort), Int.MIN_VALUE)) - ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) + sharedPreferences.getInt(getString(R.string.set_key_artists_sort), Int.MIN_VALUE) + ) ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) set(value) { sharedPreferences.edit { putInt(getString(R.string.set_key_artists_sort), value.intCode) @@ -104,8 +104,8 @@ class ListSettingsImpl @Inject constructor(@ApplicationContext val context: Cont override var genreSort: Sort get() = Sort.fromIntCode( - sharedPreferences.getInt(getString(R.string.set_key_genres_sort), Int.MIN_VALUE)) - ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) + sharedPreferences.getInt(getString(R.string.set_key_genres_sort), Int.MIN_VALUE) + ) ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) set(value) { sharedPreferences.edit { putInt(getString(R.string.set_key_genres_sort), value.intCode) @@ -116,8 +116,8 @@ class ListSettingsImpl @Inject constructor(@ApplicationContext val context: Cont override var playlistSort: Sort get() = Sort.fromIntCode( - sharedPreferences.getInt(getString(R.string.set_key_playlists_sort), Int.MIN_VALUE)) - ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) + sharedPreferences.getInt(getString(R.string.set_key_playlists_sort), Int.MIN_VALUE) + ) ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) set(value) { sharedPreferences.edit { putInt(getString(R.string.set_key_playlists_sort), value.intCode) @@ -129,8 +129,10 @@ class ListSettingsImpl @Inject constructor(@ApplicationContext val context: Cont get() = Sort.fromIntCode( sharedPreferences.getInt( - getString(R.string.set_key_album_songs_sort), Int.MIN_VALUE)) - ?: Sort(Sort.Mode.ByDisc, Sort.Direction.ASCENDING) + getString(R.string.set_key_album_songs_sort), + Int.MIN_VALUE, + ) + ) ?: Sort(Sort.Mode.ByDisc, Sort.Direction.ASCENDING) set(value) { sharedPreferences.edit { putInt(getString(R.string.set_key_album_songs_sort), value.intCode) @@ -142,8 +144,10 @@ class ListSettingsImpl @Inject constructor(@ApplicationContext val context: Cont get() = Sort.fromIntCode( sharedPreferences.getInt( - getString(R.string.set_key_artist_songs_sort), Int.MIN_VALUE)) - ?: Sort(Sort.Mode.ByDate, Sort.Direction.DESCENDING) + getString(R.string.set_key_artist_songs_sort), + Int.MIN_VALUE, + ) + ) ?: Sort(Sort.Mode.ByDate, Sort.Direction.DESCENDING) set(value) { sharedPreferences.edit { putInt(getString(R.string.set_key_artist_songs_sort), value.intCode) @@ -155,8 +159,10 @@ class ListSettingsImpl @Inject constructor(@ApplicationContext val context: Cont get() = Sort.fromIntCode( sharedPreferences.getInt( - getString(R.string.set_key_genre_songs_sort), Int.MIN_VALUE)) - ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) + getString(R.string.set_key_genre_songs_sort), + Int.MIN_VALUE, + ) + ) ?: Sort(Sort.Mode.ByName, Sort.Direction.ASCENDING) set(value) { sharedPreferences.edit { putInt(getString(R.string.set_key_genre_songs_sort), value.intCode) diff --git a/app/src/main/java/org/oxycblt/auxio/list/Listeners.kt b/app/src/main/java/org/oxycblt/auxio/list/Listeners.kt index c7704e503..987e1da78 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/Listeners.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/Listeners.kt @@ -98,7 +98,7 @@ interface EditClickListListener : ClickableListListener, EditableListLi item: T, viewHolder: RecyclerView.ViewHolder, bodyView: View = viewHolder.itemView, - dragHandle: View + dragHandle: View, ) { bind(item, viewHolder, bodyView) bind(viewHolder, dragHandle) @@ -138,7 +138,7 @@ interface SelectableListListener : ClickableListListener { item: T, viewHolder: RecyclerView.ViewHolder, bodyView: View = viewHolder.itemView, - menuButton: View + menuButton: View, ) { bind(item, viewHolder, bodyView) // Map long clicks to the selection listener. diff --git a/app/src/main/java/org/oxycblt/auxio/list/adapter/FlexibleListAdapter.kt b/app/src/main/java/org/oxycblt/auxio/list/adapter/FlexibleListAdapter.kt index 4a5da90ca..99943822c 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/adapter/FlexibleListAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/adapter/FlexibleListAdapter.kt @@ -39,9 +39,11 @@ abstract class FlexibleListAdapter( @Suppress("LeakingThis") private val differ = FlexibleListDiffer(this, diffCallback) final override fun getItemCount() = differ.currentList.size + /** The current list stored by the adapter's differ instance. */ val currentList: List get() = differ.currentList + /** @see currentList */ fun getItem(at: Int) = differ.currentList[at] @@ -55,7 +57,7 @@ abstract class FlexibleListAdapter( fun update( newList: List, instructions: UpdateInstructions?, - callback: (() -> Unit)? = null + callback: (() -> Unit)? = null, ) { L.d("Updating list to ${newList.size} items with $instructions") differ.update(newList, instructions, callback) @@ -111,7 +113,7 @@ sealed interface UpdateInstructions { */ private class FlexibleListDiffer( adapter: RecyclerView.Adapter<*>, - diffCallback: DiffUtil.ItemCallback + diffCallback: DiffUtil.ItemCallback, ) { private val updateCallback = AdapterListUpdateCallback(adapter) private val config = AsyncDifferConfig.Builder(diffCallback).build() @@ -167,7 +169,7 @@ private class FlexibleListDiffer( oldList: List, newList: List, runGeneration: Int, - callback: (() -> Unit)? + callback: (() -> Unit)?, ) { // fast simple remove all if (newList.isEmpty()) { @@ -204,7 +206,7 @@ private class FlexibleListDiffer( override fun areItemsTheSame( oldItemPosition: Int, - newItemPosition: Int + newItemPosition: Int, ): Boolean { val oldItem: T? = oldList[oldItemPosition] val newItem: T? = newList[newItemPosition] @@ -216,7 +218,7 @@ private class FlexibleListDiffer( override fun areContentsTheSame( oldItemPosition: Int, - newItemPosition: Int + newItemPosition: Int, ): Boolean { val oldItem: T? = oldList[oldItemPosition] val newItem: T? = newList[newItemPosition] @@ -231,7 +233,7 @@ private class FlexibleListDiffer( override fun getChangePayload( oldItemPosition: Int, - newItemPosition: Int + newItemPosition: Int, ): Any? { val oldItem: T? = oldList[oldItemPosition] val newItem: T? = newList[newItemPosition] @@ -240,7 +242,8 @@ private class FlexibleListDiffer( } throw AssertionError() } - }) + } + ) mainThreadExecutor.execute { if (maxScheduledGeneration == runGeneration) { diff --git a/app/src/main/java/org/oxycblt/auxio/list/adapter/PlayingIndicatorAdapter.kt b/app/src/main/java/org/oxycblt/auxio/list/adapter/PlayingIndicatorAdapter.kt index 8d1721b46..b30a88fbf 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/adapter/PlayingIndicatorAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/adapter/PlayingIndicatorAdapter.kt @@ -51,6 +51,7 @@ abstract class PlayingIndicatorAdapter( onBindViewHolder(holder, position) } } + /** * Update the currently playing item in the list. * diff --git a/app/src/main/java/org/oxycblt/auxio/list/menu/Menu.kt b/app/src/main/java/org/oxycblt/auxio/list/menu/Menu.kt index 3413e03f0..b3c9549c6 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/menu/Menu.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/menu/Menu.kt @@ -64,7 +64,7 @@ sealed interface Menu { val res: Int, val songUid: Music.UID, val playWithCode: Int, - val playWithUid: Music.UID? + val playWithUid: Music.UID?, ) : Menu.Parcel } diff --git a/app/src/main/java/org/oxycblt/auxio/list/menu/MenuDialogFragmentImpl.kt b/app/src/main/java/org/oxycblt/auxio/list/menu/MenuDialogFragmentImpl.kt index 709cd7e08..2c196a68b 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/menu/MenuDialogFragmentImpl.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/menu/MenuDialogFragmentImpl.kt @@ -166,7 +166,8 @@ class ArtistMenuDialogFragment : MenuDialogFragment() { R.id.action_play_next, R.id.action_queue_add, R.id.action_playlist_add, - R.id.action_share) + R.id.action_share, + ) } else { setOf() } @@ -188,7 +189,8 @@ class ArtistMenuDialogFragment : MenuDialogFragment() { context.getPlural(R.plurals.fmt_song_count, menu.artist.songs.size) } else { getString(R.string.def_song_count) - }) + }, + ) } override fun onClick(item: MenuItem, menu: Menu.ForArtist) { @@ -239,7 +241,8 @@ class GenreMenuDialogFragment : MenuDialogFragment() { getString( R.string.fmt_two, context.getPlural(R.plurals.fmt_artist_count, menu.genre.artists.size), - context.getPlural(R.plurals.fmt_song_count, menu.genre.songs.size)) + context.getPlural(R.plurals.fmt_song_count, menu.genre.songs.size), + ) } override fun onClick(item: MenuItem, menu: Menu.ForGenre) { @@ -290,7 +293,8 @@ class PlaylistMenuDialogFragment : MenuDialogFragment() { R.id.action_queue_add, R.id.action_playlist_add, R.id.action_export, - R.id.action_share) + R.id.action_share, + ) } else { setOf() } @@ -352,7 +356,10 @@ class SelectionMenuDialogFragment : MenuDialogFragment() { override fun updateMenu(binding: DialogMenuBinding, menu: Menu.ForSelection) { binding.menuCover.bind( - menu.songs, getString(R.string.desc_selection_image), R.drawable.ic_song_24) + menu.songs, + getString(R.string.desc_selection_image), + R.drawable.ic_song_24, + ) binding.menuType.text = getString(R.string.lbl_selection) binding.menuName.text = requireContext().getPlural(R.plurals.fmt_song_count, menu.songs.size) diff --git a/app/src/main/java/org/oxycblt/auxio/list/recycler/DialogRecyclerView.kt b/app/src/main/java/org/oxycblt/auxio/list/recycler/DialogRecyclerView.kt index 9fc255ce1..01c3caa7b 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/recycler/DialogRecyclerView.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/recycler/DialogRecyclerView.kt @@ -85,12 +85,14 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr ViewGroup.getChildMeasureSpec( MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), 0, - divider.layoutParams.width) + divider.layoutParams.width, + ) val heightMeasureSpec = ViewGroup.getChildMeasureSpec( MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY), 0, - divider.layoutParams.height) + divider.layoutParams.height, + ) divider.measure(widthMeasureSpec, heightMeasureSpec) } diff --git a/app/src/main/java/org/oxycblt/auxio/list/recycler/FastScrollRecyclerView.kt b/app/src/main/java/org/oxycblt/auxio/list/recycler/FastScrollRecyclerView.kt index 18e8f9e7a..f6f17e29e 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/recycler/FastScrollRecyclerView.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/recycler/FastScrollRecyclerView.kt @@ -114,7 +114,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr TextViewCompat.setTextAppearance(this, R.style.TextAppearance_Auxio_HeadlineMedium) setTextColor( - context.getAttrColorCompat(com.google.android.material.R.attr.colorOnSecondary)) + context.getAttrColorCompat(com.google.android.material.R.attr.colorOnSecondary) + ) ellipsize = TextUtils.TruncateAt.MIDDLE gravity = Gravity.CENTER includeFontPadding = false @@ -129,7 +130,9 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr updatePaddingRelative(start = paddingStart, end = paddingEnd) layoutParams = FrameLayout.LayoutParams( - ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT) + ViewGroup.LayoutParams.WRAP_CONTENT, + ViewGroup.LayoutParams.WRAP_CONTENT, + ) .apply { marginEnd = context.getDimenPixels(R.dimen.size_touchable_small) gravity = Gravity.CENTER_HORIZONTAL or Gravity.TOP @@ -208,7 +211,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr override fun onDraw(canvas: Canvas, parent: RecyclerView, state: State) { onPreDraw() } - }) + } + ) // We use a listener instead of overriding onTouchEvent so that we don't conflict with // RecyclerView touch events. @@ -220,11 +224,12 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr override fun onInterceptTouchEvent( recyclerView: RecyclerView, - event: MotionEvent + event: MotionEvent, ): Boolean { return onItemTouch(event) } - }) + } + ) } // --- RECYCLERVIEW EVENT MANAGEMENT --- @@ -235,7 +240,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr thumbView.layoutDirection = layoutDirection thumbView.measure( MeasureSpec.makeMeasureSpec(thumbWidth, MeasureSpec.EXACTLY), - MeasureSpec.makeMeasureSpec(thumbHeight, MeasureSpec.EXACTLY)) + MeasureSpec.makeMeasureSpec(thumbHeight, MeasureSpec.EXACTLY), + ) val thumbTop = thumbPadding.top + thumbOffset val thumbLeft = if (isRtl) { @@ -278,7 +284,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr thumbWidth + popupLayoutParams.leftMargin + popupLayoutParams.rightMargin, - popupLayoutParams.width) + popupLayoutParams.width, + ) val heightMeasureSpec = ViewGroup.getChildMeasureSpec( @@ -287,7 +294,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr thumbPadding.bottom + popupLayoutParams.topMargin + popupLayoutParams.bottomMargin, - popupLayoutParams.height) + popupLayoutParams.height, + ) popupView.measure(widthMeasureSpec, heightMeasureSpec) if (showingPopup) { @@ -311,7 +319,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr (thumbTop + thumbAnchorY - popupAnchorY) .coerceAtLeast(thumbPadding.top + popupLayoutParams.topMargin) .coerceAtMost( - height - thumbPadding.bottom - popupLayoutParams.bottomMargin - popupHeight) + height - thumbPadding.bottom - popupLayoutParams.bottomMargin - popupHeight + ) popupView.layout(popupLeft, popupTop, popupLeft + popupWidth, popupTop + popupHeight) } @@ -383,9 +392,11 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr } } MotionEvent.ACTION_MOVE -> { - if (!dragging && - thumbView.isUnder(downX, thumbView.top.toFloat(), minTouchTargetSize) && - abs(eventY - downY) > touchSlop) { + if ( + !dragging && + thumbView.isUnder(downX, thumbView.top.toFloat(), minTouchTargetSize) && + abs(eventY - downY) > touchSlop + ) { if (thumbView.isUnder(downX, downY, minTouchTargetSize)) { dragStartY = lastY dragStartThumbOffset = thumbOffset @@ -487,7 +498,8 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr HapticFeedbackConstants.TEXT_HANDLE_MOVE } else { HapticFeedbackConstants.KEYBOARD_TAP - }) + } + ) } // --- LAYOUT STATE --- diff --git a/app/src/main/java/org/oxycblt/auxio/list/recycler/MaterialDragCallback.kt b/app/src/main/java/org/oxycblt/auxio/list/recycler/MaterialDragCallback.kt index af81d7629..b955ed6eb 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/recycler/MaterialDragCallback.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/recycler/MaterialDragCallback.kt @@ -48,12 +48,13 @@ abstract class MaterialDragCallback : ItemTouchHelper.Callback() { final override fun getMovementFlags( recyclerView: RecyclerView, - viewHolder: RecyclerView.ViewHolder + viewHolder: RecyclerView.ViewHolder, ) = if (viewHolder is ViewHolder && viewHolder.enabled) { makeFlag( - ItemTouchHelper.ACTION_STATE_DRAG, ItemTouchHelper.UP or ItemTouchHelper.DOWN) or - makeFlag(ItemTouchHelper.ACTION_STATE_SWIPE, ItemTouchHelper.START) + ItemTouchHelper.ACTION_STATE_DRAG, + ItemTouchHelper.UP or ItemTouchHelper.DOWN, + ) or makeFlag(ItemTouchHelper.ACTION_STATE_SWIPE, ItemTouchHelper.START) } else { 0 } @@ -63,18 +64,24 @@ abstract class MaterialDragCallback : ItemTouchHelper.Callback() { viewSize: Int, viewSizeOutOfBounds: Int, totalSize: Int, - msSinceStartScroll: Long + msSinceStartScroll: Long, ): Int { // Clamp the scroll speed to prevent the lists from freaking out // Adapted from NewPipe: https://github.com/TeamNewPipe/NewPipe val standardSpeed = super.interpolateOutOfBoundsScroll( - recyclerView, viewSize, viewSizeOutOfBounds, totalSize, msSinceStartScroll) + recyclerView, + viewSize, + viewSizeOutOfBounds, + totalSize, + msSinceStartScroll, + ) val clampedAbsVelocity = max( MINIMUM_INITIAL_DRAG_VELOCITY, - min(abs(standardSpeed), MAXIMUM_INITIAL_DRAG_VELOCITY)) + min(abs(standardSpeed), MAXIMUM_INITIAL_DRAG_VELOCITY), + ) return clampedAbsVelocity * sign(viewSizeOutOfBounds.toDouble()).toInt() } @@ -86,7 +93,7 @@ abstract class MaterialDragCallback : ItemTouchHelper.Callback() { dX: Float, dY: Float, actionState: Int, - isCurrentlyActive: Boolean + isCurrentlyActive: Boolean, ) { val holder = viewHolder as ViewHolder @@ -101,7 +108,8 @@ abstract class MaterialDragCallback : ItemTouchHelper.Callback() { .animate() .translationZ(elevation) .setDuration( - recyclerView.context.getInteger(R.integer.anim_fade_exit_duration).toLong()) + recyclerView.context.getInteger(R.integer.anim_fade_exit_duration).toLong() + ) .setUpdateListener { bg.alpha = ((holder.root.translationZ / elevation) * 255).toInt() } @@ -143,7 +151,8 @@ abstract class MaterialDragCallback : ItemTouchHelper.Callback() { .animate() .translationZ(0f) .setDuration( - recyclerView.context.getInteger(R.integer.anim_fade_exit_duration).toLong()) + recyclerView.context.getInteger(R.integer.anim_fade_exit_duration).toLong() + ) .setUpdateListener { bg.alpha = ((holder.root.translationZ / elevation) * 255).toInt() } diff --git a/app/src/main/java/org/oxycblt/auxio/list/recycler/ViewHolders.kt b/app/src/main/java/org/oxycblt/auxio/list/recycler/ViewHolders.kt index 51c247f85..c7721a303 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/recycler/ViewHolders.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/recycler/ViewHolders.kt @@ -175,7 +175,8 @@ class ArtistViewHolder private constructor(private val binding: ItemParentBindin binding.context.getPlural(R.plurals.fmt_song_count, artist.songs.size) } else { binding.context.getString(R.string.def_song_count) - }) + }, + ) } override fun updatePlayingIndicator(isActive: Boolean, isPlaying: Boolean) { @@ -232,7 +233,8 @@ class GenreViewHolder private constructor(private val binding: ItemParentBinding binding.context.getString( R.string.fmt_two, binding.context.getPlural(R.plurals.fmt_artist_count, genre.artists.size), - binding.context.getPlural(R.plurals.fmt_song_count, genre.songs.size)) + binding.context.getPlural(R.plurals.fmt_song_count, genre.songs.size), + ) } override fun updatePlayingIndicator(isActive: Boolean, isPlaying: Boolean) { diff --git a/app/src/main/java/org/oxycblt/auxio/list/sort/Sort.kt b/app/src/main/java/org/oxycblt/auxio/list/sort/Sort.kt index 64b033218..b881a0253 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/sort/Sort.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/sort/Sort.kt @@ -394,7 +394,7 @@ data class Sort(val mode: Mode, val direction: Direction) { /** The direction to sort items in. */ enum class Direction { ASCENDING, - DESCENDING + DESCENDING, } companion object { diff --git a/app/src/main/java/org/oxycblt/auxio/list/sort/SortDialog.kt b/app/src/main/java/org/oxycblt/auxio/list/sort/SortDialog.kt index 0072dd4ad..67b146e65 100644 --- a/app/src/main/java/org/oxycblt/auxio/list/sort/SortDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/list/sort/SortDialog.kt @@ -89,7 +89,7 @@ abstract class SortDialog : override fun onButtonChecked( group: MaterialButtonToggleGroup?, checkedId: Int, - isChecked: Boolean + isChecked: Boolean, ) { updateButtons() } diff --git a/app/src/main/java/org/oxycblt/auxio/music/MusicRepository.kt b/app/src/main/java/org/oxycblt/auxio/music/MusicRepository.kt index ecc8cec63..2728456b1 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/MusicRepository.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/MusicRepository.kt @@ -244,7 +244,7 @@ constructor( private val cache: MutableCache, private val storedPlaylists: StoredPlaylists, private val settingCovers: SettingCovers, - private val musicSettings: MusicSettings + private val musicSettings: MusicSettings, ) : MusicRepository { private val updateListeners = mutableListOf() private val indexingListeners = mutableListOf() diff --git a/app/src/main/java/org/oxycblt/auxio/music/MusicSettings.kt b/app/src/main/java/org/oxycblt/auxio/music/MusicSettings.kt index 3e5b98512..372630dcb 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/MusicSettings.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/MusicSettings.kt @@ -117,7 +117,9 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont get() { val mode = sharedPreferences.getInt( - getString(R.string.set_key_locations_mode), IntegerTable.LOCATION_MODE_SAF) + getString(R.string.set_key_locations_mode), + IntegerTable.LOCATION_MODE_SAF, + ) return LocationMode.fromInt(mode) ?: LocationMode.SAF } set(value) { @@ -131,18 +133,24 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont get() { val locations = unlikelyToBeNull( - sharedPreferences.getString( - getString(R.string.set_key_music_locations), "")) + sharedPreferences.getString(getString(R.string.set_key_music_locations), "") + ) .toOpenedLocations() val excludedLocations = unlikelyToBeNull( sharedPreferences.getString( - getString(R.string.set_key_excluded_locations), "")) + getString(R.string.set_key_excluded_locations), + "", + ) + ) .toUnopenedLocations() val withHidden = sharedPreferences.getBoolean(getString(R.string.set_key_with_hidden), false) return SAF.Query( - source = locations, exclude = excludedLocations, withHidden = withHidden) + source = locations, + exclude = excludedLocations, + withHidden = withHidden, + ) } set(value) { sharedPreferences.edit { @@ -157,11 +165,16 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont get() { val filterMode = sharedPreferences.getInt( - getString(R.string.set_key_filter_mode), IntegerTable.FILTER_MODE_EXCLUDE) + getString(R.string.set_key_filter_mode), + IntegerTable.FILTER_MODE_EXCLUDE, + ) val filteredLocations = unlikelyToBeNull( sharedPreferences.getString( - getString(R.string.set_key_filtered_locations), "")) + getString(R.string.set_key_filtered_locations), + "", + ) + ) .toUnopenedLocations() val excludeNonMusic = sharedPreferences.getBoolean(getString(R.string.set_key_exclude_non_music), true) @@ -173,7 +186,8 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont else -> MediaStore.FilterMode.EXCLUDE }, filtered = filteredLocations, - excludeNonMusic = excludeNonMusic) + excludeNonMusic = excludeNonMusic, + ) } set(value) { sharedPreferences.edit { @@ -184,7 +198,9 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont } putInt(getString(R.string.set_key_filter_mode), filterMode) putString( - getString(R.string.set_key_filtered_locations), value.filtered.stringify()) + getString(R.string.set_key_filtered_locations), + value.filtered.stringify(), + ) putBoolean(getString(R.string.set_key_exclude_non_music), value.excludeNonMusic) apply() } @@ -215,7 +231,7 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont getString(R.string.set_key_filtered_locations), getString(R.string.set_key_exclude_non_music), getString(R.string.set_key_separators), - getString(R.string.set_key_auto_sort_names), -> { + getString(R.string.set_key_auto_sort_names) -> { L.d("Dispatching indexing setting change for $key") listener.onIndexingSettingChanged() } diff --git a/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt b/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt index a5977fc2c..4ec8656cb 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt @@ -53,7 +53,7 @@ class MusicViewModel constructor( @ApplicationContext context: Context, private val listSettings: ListSettings, - private val musicRepository: MusicRepository + private val musicRepository: MusicRepository, ) : ViewModel(), MusicRepository.UpdateListener, MusicRepository.IndexingListener { private val externalPlaylistManager = ExternalPlaylistManager.from(context) @@ -102,6 +102,7 @@ constructor( library.genres.size, library.songs.sumOf { it.durationMs }, library.songs.sumOf { it.size }) + ) L.d("Updated statistics: ${_statistics.value}") } @@ -132,7 +133,7 @@ constructor( fun createPlaylist( name: String? = null, songs: List = listOf(), - reason: PlaylistDecision.New.Reason = PlaylistDecision.New.Reason.NEW + reason: PlaylistDecision.New.Reason = PlaylistDecision.New.Reason.NEW, ) { if (name != null) { L.d("Creating $name with ${songs.size} songs]") @@ -190,7 +191,9 @@ constructor( target, importedPlaylist.name, songs, - PlaylistDecision.Rename.Reason.IMPORT)) + PlaylistDecision.Rename.Reason.IMPORT, + ) + ) } else { musicRepository.rewritePlaylist(target, songs) _playlistMessage.put(PlaylistMessage.ImportSuccess) @@ -198,7 +201,11 @@ constructor( } else { _playlistDecision.put( PlaylistDecision.New( - songs, importedPlaylist.name, PlaylistDecision.New.Reason.IMPORT)) + songs, + importedPlaylist.name, + PlaylistDecision.New.Reason.IMPORT, + ) + ) } } } else { @@ -243,7 +250,7 @@ constructor( playlist: Playlist, name: String? = null, applySongs: List = listOf(), - reason: PlaylistDecision.Rename.Reason = PlaylistDecision.Rename.Reason.ACTION + reason: PlaylistDecision.Rename.Reason = PlaylistDecision.Rename.Reason.ACTION, ) { if (name != null) { L.d("Renaming $playlist to $name") @@ -388,7 +395,7 @@ sealed interface PlaylistDecision { enum class Reason { NEW, ADD, - IMPORT + IMPORT, } } @@ -409,11 +416,11 @@ sealed interface PlaylistDecision { val playlist: Playlist, val template: String?, val applySongs: List, - val reason: Reason + val reason: Reason, ) : PlaylistDecision { enum class Reason { ACTION, - IMPORT + IMPORT, } } diff --git a/app/src/main/java/org/oxycblt/auxio/music/decision/AddToPlaylistDialog.kt b/app/src/main/java/org/oxycblt/auxio/music/decision/AddToPlaylistDialog.kt index 321dd87ff..bdad13ef5 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/decision/AddToPlaylistDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/decision/AddToPlaylistDialog.kt @@ -100,7 +100,11 @@ class AddToPlaylistDialog : findNavController() .navigateSafe( AddToPlaylistDialogDirections.newPlaylist( - songs.map { it.uid }.toTypedArray(), null, PlaylistDecision.New.Reason.ADD)) + songs.map { it.uid }.toTypedArray(), + null, + PlaylistDecision.New.Reason.ADD, + ) + ) } private fun updatePendingSongs(songs: List?) { diff --git a/app/src/main/java/org/oxycblt/auxio/music/decision/DeletePlaylistDialog.kt b/app/src/main/java/org/oxycblt/auxio/music/decision/DeletePlaylistDialog.kt index 75b360451..39203f247 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/decision/DeletePlaylistDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/decision/DeletePlaylistDialog.kt @@ -58,7 +58,9 @@ class DeletePlaylistDialog : ViewBindingMaterialDialogFragment @@ -142,7 +143,8 @@ class ExportPlaylistDialog : ViewBindingMaterialDialogFragment R.string.lbl_new_playlist PlaylistDecision.New.Reason.IMPORT -> R.string.lbl_import_playlist - }) + } + ) .setPositiveButton(R.string.lbl_ok) { _, _ -> val pendingPlaylist = unlikelyToBeNull(pickerModel.currentPendingNewPlaylist.value) val name = diff --git a/app/src/main/java/org/oxycblt/auxio/music/decision/NewPlaylistFooterAdapter.kt b/app/src/main/java/org/oxycblt/auxio/music/decision/NewPlaylistFooterAdapter.kt index 2eee93bda..226544da5 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/decision/NewPlaylistFooterAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/decision/NewPlaylistFooterAdapter.kt @@ -78,6 +78,7 @@ private constructor(private val binding: ItemNewPlaylistChoiceBinding) : */ fun from(parent: View) = NewPlaylistFooterViewHolder( - ItemNewPlaylistChoiceBinding.inflate(parent.context.inflater)) + ItemNewPlaylistChoiceBinding.inflate(parent.context.inflater) + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/music/decision/PlaylistChoiceAdapter.kt b/app/src/main/java/org/oxycblt/auxio/music/decision/PlaylistChoiceAdapter.kt index f40137935..c3c527489 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/decision/PlaylistChoiceAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/decision/PlaylistChoiceAdapter.kt @@ -37,7 +37,8 @@ import org.oxycblt.auxio.util.inflater */ class PlaylistChoiceAdapter(val listener: ClickableListListener) : FlexibleListAdapter( - PlaylistChoiceViewHolder.DIFF_CALLBACK) { + PlaylistChoiceViewHolder.DIFF_CALLBACK + ) { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = PlaylistChoiceViewHolder.from(parent) diff --git a/app/src/main/java/org/oxycblt/auxio/music/decision/PlaylistPickerViewModel.kt b/app/src/main/java/org/oxycblt/auxio/music/decision/PlaylistPickerViewModel.kt index 799ca1667..d5a3f44ea 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/decision/PlaylistPickerViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/decision/PlaylistPickerViewModel.kt @@ -97,7 +97,8 @@ class PlaylistPickerViewModel @Inject constructor(private val musicRepository: M pendingPlaylist.preferredName, pendingPlaylist.songs.mapNotNull { library.findSong(it.uid) }, pendingPlaylist.template, - pendingPlaylist.reason) + pendingPlaylist.reason, + ) } L.d("Updated pending playlist: ${_currentPendingNewPlaylist.value?.preferredName}") @@ -150,7 +151,7 @@ class PlaylistPickerViewModel @Inject constructor(private val musicRepository: M context: Context, songUids: Array, template: String?, - reason: PlaylistDecision.New.Reason + reason: PlaylistDecision.New.Reason, ) { L.d("Opening ${songUids.size} songs to create a playlist from") val library = musicRepository.library ?: return @@ -191,7 +192,7 @@ class PlaylistPickerViewModel @Inject constructor(private val musicRepository: M playlistUid: Music.UID, applySongUids: Array, template: String?, - reason: PlaylistDecision.Rename.Reason + reason: PlaylistDecision.Rename.Reason, ) { L.d("Opening playlist $playlistUid to rename") val playlist = musicRepository.library?.findPlaylist(playlistUid) @@ -320,14 +321,14 @@ data class PendingNewPlaylist( val preferredName: String, val songs: List, val template: String?, - val reason: PlaylistDecision.New.Reason + val reason: PlaylistDecision.New.Reason, ) data class PendingRenamePlaylist( val playlist: Playlist, val applySongs: List, val template: String?, - val reason: PlaylistDecision.Rename.Reason + val reason: PlaylistDecision.Rename.Reason, ) /** @@ -338,10 +339,13 @@ data class PendingRenamePlaylist( sealed interface ChosenName { /** The current name is valid. */ data class Valid(val value: String) : ChosenName + /** The current name already exists. */ data class AlreadyExists(val prior: String) : ChosenName + /** The current name is empty. */ data object Empty : ChosenName + /** The current name only consists of whitespace. */ data object Blank : ChosenName } diff --git a/app/src/main/java/org/oxycblt/auxio/music/decision/RenamePlaylistDialog.kt b/app/src/main/java/org/oxycblt/auxio/music/decision/RenamePlaylistDialog.kt index bc0da2b65..9c08db61f 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/decision/RenamePlaylistDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/decision/RenamePlaylistDialog.kt @@ -61,7 +61,8 @@ class RenamePlaylistDialog : ViewBindingMaterialDialogFragment(private val binding: ItemMusicLocationBin */ fun from(parent: ViewGroup) = LocationViewHolder( - ItemMusicLocationBinding.inflate(parent.context.inflater, parent, false)) + ItemMusicLocationBinding.inflate(parent.context.inflater, parent, false) + ) } } @@ -154,6 +155,7 @@ class EmptyLocationViewHolder(private val binding: ItemNoLocationsBinding) : */ fun from(parent: ViewGroup) = EmptyLocationViewHolder( - ItemNoLocationsBinding.inflate(parent.context.inflater, parent, false)) + ItemNoLocationsBinding.inflate(parent.context.inflater, parent, false) + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/music/locations/LocationsDialog.kt b/app/src/main/java/org/oxycblt/auxio/music/locations/LocationsDialog.kt index 76ad21f23..3d1368100 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/locations/LocationsDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/locations/LocationsDialog.kt @@ -100,7 +100,7 @@ class LocationsDialog : ViewBindingMaterialDialogFragment @@ -257,7 +257,8 @@ class LocationsDialog : ViewBindingMaterialDialogFragment song?.let { library.findSong(it.uid) } }), - true) + heap = savedState.heap.map { song -> song?.let { library.findSong(it.uid) } }, + ), + true, + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt b/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt index d3e117ec6..ea0ef6f81 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt @@ -72,7 +72,9 @@ typealias Sugar = Bundle.(Context) -> Unit fun header(@StringRes nameRes: Int): Sugar = { putString( - MediaConstants.DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_GROUP_TITLE, it.getString(nameRes)) + MediaConstants.DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_GROUP_TITLE, + it.getString(nameRes), + ) } fun header(name: String): Sugar = { @@ -95,7 +97,8 @@ fun TabNode.toMediaItem(context: Context): MediaItem { val extras = makeExtras( context, - style(MediaConstants.DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_CATEGORY_LIST_ITEM)) + style(MediaConstants.DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_CATEGORY_LIST_ITEM), + ) val mediaSessionUID = MediaSessionUID.Tab(this) val description = MediaDescriptionCompat.Builder() @@ -140,7 +143,8 @@ fun Album.toMediaItem(context: Context, vararg sugar: Sugar): MediaItem { .setIconUri( covers.covers.firstOrNull()?.let { Uri.withAppendedPath(CoverProvider.CONTENT_URI, it.id) - }) + } + ) .setExtras(extras) .build() return MediaItem(description, MediaItem.FLAG_BROWSABLE) @@ -160,7 +164,8 @@ fun Artist.toMediaItem(context: Context, vararg sugar: Sugar): MediaItem { context.getPlural(R.plurals.fmt_song_count, songs.size) } else { context.getString(R.string.def_song_count) - }) + }, + ) val extras = makeExtras(context, *sugar) val description = MediaDescriptionCompat.Builder() @@ -171,7 +176,8 @@ fun Artist.toMediaItem(context: Context, vararg sugar: Sugar): MediaItem { .setIconUri( covers.covers.firstOrNull()?.let { Uri.withAppendedPath(CoverProvider.CONTENT_URI, it.id) - }) + } + ) .setExtras(extras) .build() return MediaItem(description, MediaItem.FLAG_BROWSABLE) @@ -194,7 +200,8 @@ fun Genre.toMediaItem(context: Context, vararg sugar: Sugar): MediaItem { .setIconUri( covers.covers.firstOrNull()?.let { Uri.withAppendedPath(CoverProvider.CONTENT_URI, it.id) - }) + } + ) .setExtras(extras) .build() return MediaItem(description, MediaItem.FLAG_BROWSABLE) @@ -218,7 +225,8 @@ fun Playlist.toMediaItem(context: Context, vararg sugar: Sugar): MediaItem { .setIconUri( covers.covers.firstOrNull()?.let { Uri.withAppendedPath(CoverProvider.CONTENT_URI, it.id) - }) + } + ) .setExtras(extras) .build() return MediaItem(description, MediaItem.FLAG_BROWSABLE) diff --git a/app/src/main/java/org/oxycblt/auxio/music/service/MusicBrowser.kt b/app/src/main/java/org/oxycblt/auxio/music/service/MusicBrowser.kt index cc5245795..8522738cb 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/service/MusicBrowser.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/service/MusicBrowser.kt @@ -45,7 +45,7 @@ private constructor( private val musicRepository: MusicRepository, private val searchEngine: SearchEngine, homeGeneratorFactory: HomeGenerator.Factory, - detailGeneratorFactory: DetailGenerator.Factory + detailGeneratorFactory: DetailGenerator.Factory, ) : HomeGenerator.Invalidator, DetailGenerator.Invalidator { class Factory @@ -54,7 +54,7 @@ private constructor( private val musicRepository: MusicRepository, private val searchEngine: SearchEngine, private val homeGeneratorFactory: HomeGenerator.Factory, - private val detailGeneratorFactory: DetailGenerator.Factory + private val detailGeneratorFactory: DetailGenerator.Factory, ) { fun create(context: Context, invalidator: Invalidator): MusicBrowser = MusicBrowser( @@ -63,7 +63,8 @@ private constructor( musicRepository, searchEngine, homeGeneratorFactory, - detailGeneratorFactory) + detailGeneratorFactory, + ) } interface Invalidator { @@ -143,7 +144,12 @@ private constructor( val library = musicRepository.library ?: return mutableListOf() val items = SearchEngine.Items( - library.songs, library.albums, library.artists, library.genres, library.playlists) + library.songs, + library.albums, + library.artists, + library.genres, + library.playlists, + ) return searchEngine.search(items, query).toMediaItems() } diff --git a/app/src/main/java/org/oxycblt/auxio/music/service/MusicServiceFragment.kt b/app/src/main/java/org/oxycblt/auxio/music/service/MusicServiceFragment.kt index 9105f5617..0c4286e92 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/service/MusicServiceFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/service/MusicServiceFragment.kt @@ -41,7 +41,7 @@ constructor( private val invalidator: Invalidator, indexingHolderFactory: IndexingHolder.Factory, musicBrowserFactory: MusicBrowser.Factory, - private val musicRepository: MusicRepository + private val musicRepository: MusicRepository, ) : MusicBrowser.Invalidator { private val indexer = indexingHolderFactory.create(context, foregroundListener) private val musicBrowser = musicBrowserFactory.create(context, this) @@ -55,12 +55,12 @@ constructor( constructor( private val indexingHolderFactory: IndexingHolder.Factory, private val musicBrowserFactory: MusicBrowser.Factory, - private val musicRepository: MusicRepository + private val musicRepository: MusicRepository, ) { fun create( context: Context, foregroundListener: ForegroundListener, - invalidator: Invalidator + invalidator: Invalidator, ): MusicServiceFragment = MusicServiceFragment( context, @@ -68,7 +68,8 @@ constructor( invalidator, indexingHolderFactory, musicBrowserFactory, - musicRepository) + musicRepository, + ) } interface Invalidator { @@ -104,17 +105,13 @@ constructor( fun getRoot() = BrowserRoot(MediaSessionUID.Tab(TabNode.Root).toString(), Bundle()) fun getItem(mediaId: String, result: Result) = - result.dispatch { - musicBrowser.getItem( - mediaId, - ) - } + result.dispatch { musicBrowser.getItem(mediaId) } fun getChildren( mediaId: String, maxTabs: Int, result: Result>, - page: Page? + page: Page?, ) = result.dispatch { musicBrowser.getChildren(mediaId, maxTabs)?.expose(page) } fun search(query: String, result: Result>, page: Page?) = diff --git a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackBarFragment.kt b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackBarFragment.kt index 6e488f6b5..3821debcd 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackBarFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackBarFragment.kt @@ -51,7 +51,7 @@ class PlaybackBarFragment : ViewBindingFragment() { override fun onBindingCreated( binding: FragmentPlaybackBarBinding, - savedInstanceState: Bundle? + savedInstanceState: Bundle?, ) { super.onBindingCreated(binding, savedInstanceState) val context = requireContext() @@ -84,7 +84,8 @@ class PlaybackBarFragment : ViewBindingFragment() { playbackModel.currentBarAction, playbackModel.repeatMode, playbackModel.isShuffled, - ::updateBarAction) + ::updateBarAction, + ) } override fun onDestroyBinding(binding: FragmentPlaybackBarBinding) { @@ -119,7 +120,7 @@ class PlaybackBarFragment : ViewBindingFragment() { private fun updateBarAction( actionMode: ActionMode, repeatMode: RepeatMode, - isShuffled: Boolean + isShuffled: Boolean, ) { val binding = requireBinding() when (actionMode) { diff --git a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackBottomSheetBehavior.kt b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackBottomSheetBehavior.kt index 49cef16f3..304b839b4 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackBottomSheetBehavior.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackBottomSheetBehavior.kt @@ -54,7 +54,8 @@ class PlaybackBottomSheetBehavior(context: Context, attributeSet: Attr ShapeAppearanceModel.builder( context, R.style.ShapeAppearance_Auxio_BottomSheet, - MR.style.ShapeAppearanceOverlay_Material3_Corner_Top) + MR.style.ShapeAppearanceOverlay_Material3_Corner_Top, + ) .build() } else { ShapeAppearanceModel.Builder().build() @@ -85,7 +86,9 @@ class PlaybackBottomSheetBehavior(context: Context, attributeSet: Attr MaterialShapeDrawable(sheetBackgroundDrawable.shapeAppearanceModel).apply { fillColor = sheetBackgroundDrawable.fillColor }, - sheetBackgroundDrawable)) + sheetBackgroundDrawable, + ) + ) override fun applyWindowInsets(child: View, insets: WindowInsets): WindowInsets { super.applyWindowInsets(child, insets) @@ -94,6 +97,10 @@ class PlaybackBottomSheetBehavior(context: Context, attributeSet: Attr val bars = insets.systemBarInsetsCompat expandedOffset = bars.top return insets.replaceSystemBarInsetsCompat( - bars.left, bars.top, bars.right, expandedOffset + bars.bottom) + bars.left, + bars.top, + bars.right, + expandedOffset + bars.bottom, + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackPanelFragment.kt b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackPanelFragment.kt index 64f75751f..c3373ffc3 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackPanelFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackPanelFragment.kt @@ -75,7 +75,7 @@ class PlaybackPanelFragment : override fun onBindingCreated( binding: FragmentPlaybackPanelBinding, - savedInstanceState: Bundle? + savedInstanceState: Bundle?, ) { super.onBindingCreated(binding, savedInstanceState) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackSettings.kt b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackSettings.kt index a86fbee47..f7444fd3c 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackSettings.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackSettings.kt @@ -64,10 +64,13 @@ interface PlaybackSettings : Settings { interface Listener { /** Called when one of the ReplayGain configurations have changed. */ fun onReplayGainSettingsChanged() {} + /** Called when [notificationAction] has changed. */ fun onNotificationActionChanged() {} + /** Called when [barAction] has changed. */ fun onBarActionChanged() {} + /** Called when [pauseOnRepeat] has changed. */ fun onPauseOnRepeatChanged() {} } @@ -79,26 +82,31 @@ class PlaybackSettingsImpl @Inject constructor(@ApplicationContext context: Cont get() = PlaySong.fromIntCode( sharedPreferences.getInt( - getString(R.string.set_key_play_in_list_with), Int.MIN_VALUE)) - ?: PlaySong.FromAll + getString(R.string.set_key_play_in_list_with), + Int.MIN_VALUE, + ) + ) ?: PlaySong.FromAll override val inParentPlaybackMode: PlaySong? get() = PlaySong.fromIntCode( sharedPreferences.getInt( - getString(R.string.set_key_play_in_parent_with), Int.MIN_VALUE)) + getString(R.string.set_key_play_in_parent_with), + Int.MIN_VALUE, + ) + ) override val barAction: ActionMode get() = ActionMode.fromIntCode( - sharedPreferences.getInt(getString(R.string.set_key_bar_action), Int.MIN_VALUE)) - ?: ActionMode.NEXT + sharedPreferences.getInt(getString(R.string.set_key_bar_action), Int.MIN_VALUE) + ) ?: ActionMode.NEXT override val notificationAction: ActionMode get() = ActionMode.fromIntCode( - sharedPreferences.getInt(getString(R.string.set_key_notif_action), Int.MIN_VALUE)) - ?: ActionMode.REPEAT + sharedPreferences.getInt(getString(R.string.set_key_notif_action), Int.MIN_VALUE) + ) ?: ActionMode.REPEAT override val headsetAutoplay: Boolean get() = sharedPreferences.getBoolean(getString(R.string.set_key_headset_autoplay), false) @@ -106,14 +114,15 @@ class PlaybackSettingsImpl @Inject constructor(@ApplicationContext context: Cont override val replayGainMode: ReplayGainMode get() = ReplayGainMode.fromIntCode( - sharedPreferences.getInt(getString(R.string.set_key_replay_gain), Int.MIN_VALUE)) - ?: ReplayGainMode.DYNAMIC + sharedPreferences.getInt(getString(R.string.set_key_replay_gain), Int.MIN_VALUE) + ) ?: ReplayGainMode.DYNAMIC override var replayGainPreAmp: ReplayGainPreAmp get() = ReplayGainPreAmp( sharedPreferences.getFloat(getString(R.string.set_key_pre_amp_with), 0f), - sharedPreferences.getFloat(getString(R.string.set_key_pre_amp_without), 0f)) + sharedPreferences.getFloat(getString(R.string.set_key_pre_amp_without), 0f), + ) set(value) { sharedPreferences.edit { putFloat(getString(R.string.set_key_pre_amp_with), value.with) @@ -155,7 +164,9 @@ class PlaybackSettingsImpl @Inject constructor(@ApplicationContext context: Cont sharedPreferences.edit { putInt( - getString(R.string.set_key_play_in_list_with), mode?.intCode ?: Int.MIN_VALUE) + getString(R.string.set_key_play_in_list_with), + mode?.intCode ?: Int.MIN_VALUE, + ) remove(OLD_KEY_LIB_MUSIC_PLAYBACK_MODE) apply() } @@ -171,7 +182,9 @@ class PlaybackSettingsImpl @Inject constructor(@ApplicationContext context: Cont sharedPreferences.edit { putInt( - getString(R.string.set_key_play_in_parent_with), mode?.intCode ?: Int.MIN_VALUE) + getString(R.string.set_key_play_in_parent_with), + mode?.intCode ?: Int.MIN_VALUE, + ) remove(OLD_KEY_DETAIL_MUSIC_PLAYBACK_MODE) apply() } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackViewModel.kt b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackViewModel.kt index a2ba95279..b8b5653f3 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/PlaybackViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/PlaybackViewModel.kt @@ -150,7 +150,7 @@ constructor( parent: MusicParent?, queue: List, index: Int, - isShuffled: Boolean + isShuffled: Boolean, ) { L.d("New playback started, updating playback information") _song.value = playbackManager.currentSong @@ -242,7 +242,8 @@ constructor( playbackManager.play( requireNotNull(commandFactory.song(song, shuffle)) { "Invalid playback parameters [$song $shuffle]" - }) + } + ) } private fun playFromAllImpl(song: Song?, shuffle: ShuffleMode) { @@ -268,7 +269,8 @@ constructor( return } L.d( - "Cannot use given artist parameter for $song [$artist from ${song.artists}], showing choice dialog") + "Cannot use given artist parameter for $song [$artist from ${song.artists}], showing choice dialog" + ) startPlaybackDecision(PlaybackDecision.PlayFromArtist(song)) } @@ -279,7 +281,8 @@ constructor( return } L.d( - "Cannot use given genre parameter for $song [$genre from ${song.genres}], showing choice dialog") + "Cannot use given genre parameter for $song [$genre from ${song.genres}], showing choice dialog" + ) startPlaybackDecision(PlaybackDecision.PlayFromArtist(song)) } @@ -639,7 +642,7 @@ enum class OpenPanel { * Open the queue panel, assuming that it exists in the current layout, is collapsed, and with * the playback panel already being expanded. Do nothing if these conditions are not met. */ - QUEUE + QUEUE, } /** @@ -650,8 +653,10 @@ enum class OpenPanel { sealed interface PlaybackDecision { /** The [Song] currently attempting to be played from. */ val song: Song + /** Navigate to a dialog to determine which [Artist] a [Song] should be played from. */ class PlayFromArtist(override val song: Song) : PlaybackDecision + /** Navigate to a dialog to determine which [Genre] a [Song] should be played from. */ class PlayFromGenre(override val song: Song) : PlaybackDecision } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/decision/ArtistPlaybackChoiceAdapter.kt b/app/src/main/java/org/oxycblt/auxio/playback/decision/ArtistPlaybackChoiceAdapter.kt index 2d1f785f4..0fef9dfbf 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/decision/ArtistPlaybackChoiceAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/decision/ArtistPlaybackChoiceAdapter.kt @@ -38,7 +38,8 @@ import org.oxycblt.musikr.Artist */ class ArtistPlaybackChoiceAdapter(private val listener: ClickableListListener) : FlexibleListAdapter( - ArtistPlaybackChoiceViewHolder.DIFF_CALLBACK) { + ArtistPlaybackChoiceViewHolder.DIFF_CALLBACK + ) { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ArtistPlaybackChoiceViewHolder.from(parent) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/decision/GenrePlaybackChoiceAdapter.kt b/app/src/main/java/org/oxycblt/auxio/playback/decision/GenrePlaybackChoiceAdapter.kt index 7eb31fd06..e96938c34 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/decision/GenrePlaybackChoiceAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/decision/GenrePlaybackChoiceAdapter.kt @@ -38,7 +38,8 @@ import org.oxycblt.musikr.Genre */ class GenrePlaybackChoiceAdapter(private val listener: ClickableListListener) : FlexibleListAdapter( - GenrePlaybackChoiceViewHolder.DIFF_CALLBACK) { + GenrePlaybackChoiceViewHolder.DIFF_CALLBACK + ) { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = GenrePlaybackChoiceViewHolder.from(parent) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceDatabase.kt b/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceDatabase.kt index 99805a0d5..90f4e5bdf 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceDatabase.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceDatabase.kt @@ -39,7 +39,8 @@ import org.oxycblt.musikr.Music @Database( entities = [PlaybackState::class, QueueHeapItem::class, QueueShuffledMappingItem::class], version = 38, - exportSchema = false) + exportSchema = false, +) @TypeConverters(Music.UID.TypeConverters::class) abstract class PersistenceDatabase : RoomDatabase() { /** @@ -144,7 +145,7 @@ data class PlaybackState( val positionMs: Long, val repeatMode: RepeatMode, val songUid: Music.UID, - val parentUid: Music.UID? + val parentUid: Music.UID?, ) @Entity data class QueueHeapItem(@PrimaryKey val id: Int, val uid: Music.UID) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceModule.kt b/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceModule.kt index fd82e75d4..5b3123a10 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceModule.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceModule.kt @@ -43,7 +43,8 @@ class PersistenceRoomModule { Room.databaseBuilder( context.applicationContext, PersistenceDatabase::class.java, - "playback_persistence.db") + "playback_persistence.db", + ) .fallbackToDestructiveMigration() .addMigrations(PersistenceDatabase.MIGRATION_27_32) .build() diff --git a/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceRepository.kt b/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceRepository.kt index 5dc48852d..14029d9a8 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceRepository.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/persist/PersistenceRepository.kt @@ -46,7 +46,7 @@ class PersistenceRepositoryImpl constructor( private val playbackStateDao: PlaybackStateDao, private val queueDao: QueueDao, - private val musicRepository: MusicRepository + private val musicRepository: MusicRepository, ) : PersistenceRepository { override suspend fun readState(): PlaybackStateManager.SavedState? { @@ -75,7 +75,8 @@ constructor( heap = heap, shuffledMapping = shuffledMapping, index = playbackState.index, - songUid = playbackState.songUid) + songUid = playbackState.songUid, + ) } override suspend fun saveState(state: PlaybackStateManager.SavedState?): Boolean { @@ -99,7 +100,8 @@ constructor( positionMs = state.positionMs, repeatMode = state.repeatMode, songUid = state.songUid, - parentUid = state.parent?.uid) + parentUid = state.parent?.uid, + ) // Convert the remaining queue information do their database-specific counterparts. val heap = diff --git a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueAdapter.kt b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueAdapter.kt index d1b630c7f..02ea29f09 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueAdapter.kt @@ -63,7 +63,7 @@ class QueueAdapter(private val listener: EditClickListListener) : override fun onBindViewHolder( viewHolder: QueueSongViewHolder, position: Int, - payload: List + payload: List, ) { if (payload.isEmpty()) { viewHolder.bind(getItem(position), listener) @@ -143,7 +143,9 @@ class QueueSongViewHolder private constructor(private val binding: ItemEditableS fillColor = binding.context.getAttrColorCompat(MR.attr.colorSurfaceContainerHigh) }, - background)) + background, + ) + ) } /** diff --git a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt index 10608aa6e..71e2b5299 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt @@ -59,7 +59,7 @@ class QueueBottomSheetBehavior(context: Context, attributeSet: Attribu override fun onDependentViewChanged( parent: CoordinatorLayout, child: V, - dependency: View + dependency: View, ): Boolean { barHeight = dependency.height // No change, just grabbed the height @@ -75,7 +75,8 @@ class QueueBottomSheetBehavior(context: Context, attributeSet: Attribu ShapeAppearanceModel.builder( context, R.style.ShapeAppearance_Auxio_BottomSheet, - MR.style.ShapeAppearanceOverlay_Material3_Corner_Top) + MR.style.ShapeAppearanceOverlay_Material3_Corner_Top, + ) .build() } } @@ -89,6 +90,10 @@ class QueueBottomSheetBehavior(context: Context, attributeSet: Attribu val effectiveBarHeight = if (barHeight > 0) barHeight else getIdealBarHeight(child.context) expandedOffset = effectiveBarHeight + barSpacing return insets.replaceSystemBarInsetsCompat( - bars.left, bars.top, bars.right, expandedOffset + bars.bottom) + bars.left, + bars.top, + bars.right, + expandedOffset + bars.bottom, + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueDragCallback.kt b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueDragCallback.kt index 23d45f62a..e15d2ed2b 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueDragCallback.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueDragCallback.kt @@ -32,10 +32,12 @@ class QueueDragCallback(private val queueModel: QueueViewModel) : MaterialDragCa override fun onMove( recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, - target: RecyclerView.ViewHolder + target: RecyclerView.ViewHolder, ) = queueModel.moveQueueDataItems( - viewHolder.bindingAdapterPosition, target.bindingAdapterPosition) + viewHolder.bindingAdapterPosition, + target.bindingAdapterPosition, + ) override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) { queueModel.removeQueueDataItem(viewHolder.bindingAdapterPosition) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueFragment.kt b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueFragment.kt index ede1313e0..614f7142e 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueFragment.kt @@ -71,12 +71,17 @@ class QueueFragment : ViewBindingFragment(), EditClickList override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { updateDivider() } - }) + } + ) } // --- VIEWMODEL SETUP ---- collectImmediately( - queueModel.queue, queueModel.index, playbackModel.isPlaying, ::updateQueue) + queueModel.queue, + queueModel.index, + playbackModel.isPlaying, + ::updateQueue, + ) } override fun onDestroyBinding(binding: FragmentQueueBinding) { diff --git a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueViewModel.kt b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueViewModel.kt index 5e1e2aa64..20abf7881 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueViewModel.kt @@ -92,7 +92,7 @@ class QueueViewModel @Inject constructor(private val playbackManager: PlaybackSt parent: MusicParent?, queue: List, index: Int, - isShuffled: Boolean + isShuffled: Boolean, ) { // Entirely new queue -> Replace queue, update index L.d("New playback, replacing queue and position") diff --git a/app/src/main/java/org/oxycblt/auxio/playback/replaygain/ReplayGainAudioProcessor.kt b/app/src/main/java/org/oxycblt/auxio/playback/replaygain/ReplayGainAudioProcessor.kt index 5c2e27c41..c41e98e48 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/replaygain/ReplayGainAudioProcessor.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/replaygain/ReplayGainAudioProcessor.kt @@ -48,7 +48,7 @@ class ReplayGainAudioProcessor @Inject constructor( private val playbackManager: PlaybackStateManager, - private val playbackSettings: PlaybackSettings + private val playbackSettings: PlaybackSettings, ) : BaseAudioProcessor(), PlaybackStateManager.Listener, PlaybackSettings.Listener { private var volume = 1f set(value) { @@ -86,7 +86,7 @@ constructor( parent: MusicParent?, queue: List, index: Int, - isShuffled: Boolean + isShuffled: Boolean, ) { L.d("New playback started, updating playback information") applyReplayGain(playbackManager.currentSong) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/service/BluetoothHeadsetReceiver.kt b/app/src/main/java/org/oxycblt/auxio/playback/service/BluetoothHeadsetReceiver.kt index 11df166f2..c2f301df5 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/service/BluetoothHeadsetReceiver.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/service/BluetoothHeadsetReceiver.kt @@ -33,7 +33,9 @@ class BluetoothHeadsetReceiver : BroadcastReceiver() { if (intent.action == android.bluetooth.BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED) { val newState = intent.getIntExtra( - BluetoothProfile.EXTRA_STATE, BluetoothProfile.STATE_DISCONNECTED) + BluetoothProfile.EXTRA_STATE, + BluetoothProfile.STATE_DISCONNECTED, + ) if (newState == BluetoothProfile.STATE_CONNECTED) { // TODO: Initialize the service (Permission workflow must be figured out) // Perhaps move this to the internal receivers? diff --git a/app/src/main/java/org/oxycblt/auxio/playback/service/ExoPlaybackStateHolder.kt b/app/src/main/java/org/oxycblt/auxio/playback/service/ExoPlaybackStateHolder.kt index 32bd40ad8..4b64e5848 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/service/ExoPlaybackStateHolder.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/service/ExoPlaybackStateHolder.kt @@ -74,7 +74,7 @@ class ExoPlaybackStateHolder( private val commandFactory: PlaybackCommand.Factory, private val replayGainProcessor: ReplayGainAudioProcessor, private val musicRepository: MusicRepository, - private val imageSettings: ImageSettings + private val imageSettings: ImageSettings, ) : PlaybackStateHolder, Player.Listener, @@ -180,7 +180,8 @@ class ExoPlaybackStateHolder( playbackManager.play( requireNotNull(commandFactory.all(ShuffleMode.ON)) { "Invalid playback parameters" - }) + } + ) } // Open -> Try to find the Song for the given file and then play it from all songs is DeferredPlayback.Open -> { @@ -191,7 +192,8 @@ class ExoPlaybackStateHolder( arrayOf(OpenableColumns.DISPLAY_NAME, OpenableColumns.SIZE), null, null, - null) + null, + ) ?.use { cursor -> val displayNameIndex = cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME) @@ -206,9 +208,10 @@ class ExoPlaybackStateHolder( if (song != null) { val command = requireNotNull( - commandFactory.songFromAll(song, ShuffleMode.IMPLICIT)) { - "Invalid playback command" - } + commandFactory.songFromAll(song, ShuffleMode.IMPLICIT) + ) { + "Invalid playback command" + } playbackManager.play(command) } } @@ -265,7 +268,8 @@ class ExoPlaybackStateHolder( if (player.shuffleModeEnabled) { // Have to manually refresh the shuffle seed and anchor it to the new current songs player.setShuffleOrder( - BetterShuffleOrder(player.mediaItemCount, player.currentMediaItemIndex)) + BetterShuffleOrder(player.mediaItemCount, player.currentMediaItemIndex) + ) } playbackManager.ack(this, StateAck.QueueReordered) deferSave() @@ -282,7 +286,9 @@ class ExoPlaybackStateHolder( } } else { player.seekTo( - player.currentTimeline.getFirstWindowIndex(player.shuffleModeEnabled), C.TIME_UNSET) + player.currentTimeline.getFirstWindowIndex(player.shuffleModeEnabled), + C.TIME_UNSET, + ) // TODO: Dislike the UX implications of this, I feel should I bite the bullet // and switch to dynamic skip enable/disable? if (!playbackSettings.rememberPause) { @@ -330,7 +336,10 @@ class ExoPlaybackStateHolder( C.INDEX_UNSET } else { currTimeline.getNextWindowIndex( - player.currentMediaItemIndex, Player.REPEAT_MODE_OFF, player.shuffleModeEnabled) + player.currentMediaItemIndex, + Player.REPEAT_MODE_OFF, + player.shuffleModeEnabled, + ) } if (nextIndex == C.INDEX_UNSET) { @@ -393,7 +402,7 @@ class ExoPlaybackStateHolder( rawQueue: RawQueue, positionMs: Long, repeatMode: RepeatMode, - ack: StateAck.NewPlayback? + ack: StateAck.NewPlayback?, ) { var sendNewPlaybackEvent = false var shouldSeek = false @@ -498,10 +507,13 @@ class ExoPlaybackStateHolder( // So many actions trigger progression changes that it becomes easier just to handle it // in an ExoPlayer callback anyway. This doesn't really cause issues anywhere. - if (events.containsAny( - Player.EVENT_PLAY_WHEN_READY_CHANGED, - Player.EVENT_IS_PLAYING_CHANGED, - Player.EVENT_POSITION_DISCONTINUITY)) { + if ( + events.containsAny( + Player.EVENT_PLAY_WHEN_READY_CHANGED, + Player.EVENT_IS_PLAYING_CHANGED, + Player.EVENT_POSITION_DISCONTINUITY, + ) + ) { L.d("Player state changed, must synchronize state") playbackManager.ack(this, StateAck.ProgressionChanged) } @@ -521,7 +533,8 @@ class ExoPlaybackStateHolder( Intent(event) .putExtra(AudioEffect.EXTRA_PACKAGE_NAME, context.packageName) .putExtra(AudioEffect.EXTRA_AUDIO_SESSION, audioSessionId) - .putExtra(AudioEffect.EXTRA_CONTENT_TYPE, AudioEffect.CONTENT_TYPE_MUSIC)) + .putExtra(AudioEffect.EXTRA_CONTENT_TYPE, AudioEffect.CONTENT_TYPE_MUSIC) + ) } // --- MUSICREPOSITORY METHODS --- @@ -601,7 +614,10 @@ class ExoPlaybackStateHolder( if (lastMediaItemIndex != C.INDEX_UNSET) { lastMediaItemIndex = timeline.getNextWindowIndex( - lastMediaItemIndex, Player.REPEAT_MODE_OFF, shuffleModeEnabled) + lastMediaItemIndex, + Player.REPEAT_MODE_OFF, + shuffleModeEnabled, + ) if (lastMediaItemIndex != C.INDEX_UNSET) { queue.add(lastMediaItemIndex) } @@ -609,7 +625,10 @@ class ExoPlaybackStateHolder( if (firstMediaItemIndex != C.INDEX_UNSET) { firstMediaItemIndex = timeline.getPreviousWindowIndex( - firstMediaItemIndex, Player.REPEAT_MODE_OFF, shuffleModeEnabled) + firstMediaItemIndex, + Player.REPEAT_MODE_OFF, + shuffleModeEnabled, + ) if (firstMediaItemIndex != C.INDEX_UNSET) { queue.add(0, firstMediaItemIndex) } @@ -645,7 +664,9 @@ class ExoPlaybackStateHolder( audioListener, DefaultAudioSink.Builder(context) .setAudioProcessors(arrayOf(replayGainProcessor)) - .build())) + .build(), + ), + ) } val exoPlayer = @@ -659,7 +680,8 @@ class ExoPlaybackStateHolder( .setUsage(C.USAGE_MEDIA) .setContentType(C.AUDIO_CONTENT_TYPE_MUSIC) .build(), - true) + true, + ) .build() return ExoPlaybackStateHolder( @@ -671,7 +693,8 @@ class ExoPlaybackStateHolder( commandFactory, replayGainProcessor, musicRepository, - imageSettings) + imageSettings, + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionHolder.kt b/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionHolder.kt index d90ddb8b7..02529afe1 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionHolder.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionHolder.kt @@ -68,7 +68,7 @@ private constructor( private val playbackSettings: PlaybackSettings, private val bitmapProvider: BitmapProvider, private val imageSettings: ImageSettings, - private val mediaSessionInterface: MediaSessionInterface + private val mediaSessionInterface: MediaSessionInterface, ) : PlaybackStateManager.Listener, ImageSettings.Listener, PlaybackSettings.Listener { class Factory @@ -78,7 +78,7 @@ private constructor( private val playbackSettings: PlaybackSettings, private val bitmapProvider: BitmapProvider, private val imageSettings: ImageSettings, - private val mediaSessionInterface: MediaSessionInterface + private val mediaSessionInterface: MediaSessionInterface, ) { fun create(context: Context, foregroundListener: ForegroundListener) = MediaSessionHolder( @@ -88,7 +88,8 @@ private constructor( playbackSettings, bitmapProvider, imageSettings, - mediaSessionInterface) + mediaSessionInterface, + ) } private val mediaSession = MediaSessionCompat(context, context.packageName) @@ -156,7 +157,8 @@ private constructor( PlaybackStateCompat.SHUFFLE_MODE_ALL } else { PlaybackStateCompat.SHUFFLE_MODE_NONE - }) + } + ) invalidateSecondaryAction() } @@ -164,7 +166,7 @@ private constructor( parent: MusicParent?, queue: List, index: Int, - isShuffled: Boolean + isShuffled: Boolean, ) { updateMediaMetadata(playbackManager.currentSong, parent) updateQueue(queue) @@ -185,7 +187,8 @@ private constructor( RepeatMode.NONE -> PlaybackStateCompat.REPEAT_MODE_NONE RepeatMode.TRACK -> PlaybackStateCompat.REPEAT_MODE_ONE RepeatMode.ALL -> PlaybackStateCompat.REPEAT_MODE_ALL - }) + } + ) invalidateSecondaryAction() } @@ -238,7 +241,8 @@ private constructor( .putText(MediaMetadataCompat.METADATA_KEY_ARTIST, artist) .putText( MediaMetadataCompat.METADATA_KEY_ALBUM_ARTIST, - song.album.artists.resolveNames(context)) + song.album.artists.resolveNames(context), + ) .putText(MediaMetadataCompat.METADATA_KEY_AUTHOR, artist) .putText(MediaMetadataCompat.METADATA_KEY_COMPOSER, artist) .putText(MediaMetadataCompat.METADATA_KEY_WRITER, artist) @@ -249,13 +253,16 @@ private constructor( .putLong(MediaMetadataCompat.METADATA_KEY_DURATION, song.durationMs) .putText( PlaybackNotification.KEY_PARENT, - parent?.name?.resolve(context) ?: context.getString(R.string.lbl_all_songs)) + parent?.name?.resolve(context) ?: context.getString(R.string.lbl_all_songs), + ) .putText( MetadataExtras.KEY_SUBTITLE_LINK_MEDIA_ID, - MediaSessionUID.SingleItem(song.artists[0].uid).toString()) + MediaSessionUID.SingleItem(song.artists[0].uid).toString(), + ) .putText( MetadataExtras.KEY_DESCRIPTION_LINK_MEDIA_ID, - MediaSessionUID.SingleItem(song.album.uid).toString()) + MediaSessionUID.SingleItem(song.album.uid).toString(), + ) // These fields are nullable and so we must check first before adding them to the fields. song.track?.let { L.d("Adding track information") @@ -288,7 +295,8 @@ private constructor( _notification.updateMetadata(metadata) foregroundListener.updateForeground(ForegroundListener.Change.MEDIA_SESSION) } - }) + }, + ) } /** @@ -301,7 +309,9 @@ private constructor( queue.mapIndexed { i, song -> val description = song.toMediaDescription( - context, { putInt(MediaSessionInterface.KEY_QUEUE_POS, i) }) + context, + { putInt(MediaSessionInterface.KEY_QUEUE_POS, i) }, + ) // Store the item index so we can then use the analogous index in the // playback state. MediaSessionCompat.QueueItem(description, i.toLong()) @@ -336,14 +346,16 @@ private constructor( R.drawable.ic_shuffle_on_24 } else { R.drawable.ic_shuffle_off_24 - }) + }, + ) } else -> { L.d("Using repeat mode MediaSession action") PlaybackStateCompat.CustomAction.Builder( PlaybackActions.ACTION_INC_REPEAT_MODE, context.getString(R.string.desc_change_repeat), - playbackManager.repeatMode.icon) + playbackManager.repeatMode.icon, + ) } } state.addCustomAction(secondaryAction.build()) @@ -353,7 +365,8 @@ private constructor( PlaybackStateCompat.CustomAction.Builder( PlaybackActions.ACTION_EXIT, context.getString(R.string.desc_exit), - R.drawable.ic_close_24) + R.drawable.ic_close_24, + ) .build() state.addCustomAction(exitAction) @@ -396,7 +409,7 @@ private constructor( @SuppressLint("RestrictedApi") private class PlaybackNotification( private val context: Context, - sessionToken: MediaSessionCompat.Token + sessionToken: MediaSessionCompat.Token, ) : ForegroundServiceNotification(context, CHANNEL_INFO) { init { setSmallIcon(R.drawable.ic_auxio_24) @@ -408,14 +421,17 @@ private class PlaybackNotification( addAction(buildRepeatAction(context, RepeatMode.NONE)) addAction( - buildAction(context, PlaybackActions.ACTION_SKIP_PREV, R.drawable.ic_skip_prev_24)) + buildAction(context, PlaybackActions.ACTION_SKIP_PREV, R.drawable.ic_skip_prev_24) + ) addAction(buildPlayPauseAction(context, true)) addAction( - buildAction(context, PlaybackActions.ACTION_SKIP_NEXT, R.drawable.ic_skip_next_24)) + buildAction(context, PlaybackActions.ACTION_SKIP_NEXT, R.drawable.ic_skip_next_24) + ) addAction(buildAction(context, PlaybackActions.ACTION_EXIT, R.drawable.ic_close_24)) setStyle( - MediaStyle(this).setMediaSession(sessionToken).setShowActionsInCompactView(1, 2, 3)) + MediaStyle(this).setMediaSession(sessionToken).setShowActionsInCompactView(1, 2, 3) + ) } override val code: Int @@ -470,7 +486,7 @@ private class PlaybackNotification( private fun buildPlayPauseAction( context: Context, - isPlaying: Boolean + isPlaying: Boolean, ): NotificationCompat.Action { val drawableRes = if (isPlaying) { @@ -483,14 +499,14 @@ private class PlaybackNotification( private fun buildRepeatAction( context: Context, - repeatMode: RepeatMode + repeatMode: RepeatMode, ): NotificationCompat.Action { return buildAction(context, PlaybackActions.ACTION_INC_REPEAT_MODE, repeatMode.icon) } private fun buildShuffleAction( context: Context, - isShuffled: Boolean + isShuffled: Boolean, ): NotificationCompat.Action { val drawableRes = if (isShuffled) { @@ -503,7 +519,10 @@ private class PlaybackNotification( private fun buildAction(context: Context, actionName: String, @DrawableRes iconRes: Int) = NotificationCompat.Action.Builder( - iconRes, actionName, context.newBroadcastPendingIntent(actionName)) + iconRes, + actionName, + context.newBroadcastPendingIntent(actionName), + ) .build() companion object { @@ -513,6 +532,7 @@ private class PlaybackNotification( private val CHANNEL_INFO = ChannelInfo( id = BuildConfig.APPLICATION_ID + ".channel.PLAYBACK", - nameRes = R.string.lbl_playback) + nameRes = R.string.lbl_playback, + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionInterface.kt b/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionInterface.kt index abe600479..b1246b2fb 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionInterface.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/service/MediaSessionInterface.kt @@ -168,13 +168,15 @@ constructor( PlaybackStateCompat.REPEAT_MODE_GROUP -> RepeatMode.ALL PlaybackStateCompat.REPEAT_MODE_ONE -> RepeatMode.TRACK else -> RepeatMode.NONE - }) + } + ) } override fun onSetShuffleMode(shuffleMode: Int) { playbackManager.shuffled( shuffleMode == PlaybackStateCompat.SHUFFLE_MODE_ALL || - shuffleMode == PlaybackStateCompat.SHUFFLE_MODE_GROUP) + shuffleMode == PlaybackStateCompat.SHUFFLE_MODE_GROUP + ) } override fun onStop() { @@ -191,7 +193,7 @@ constructor( private fun expandUidIntoCommand( uid: MediaSessionUID, - parentUid: MediaSessionUID? + parentUid: MediaSessionUID?, ): PlaybackCommand? { val unwrappedUid = (uid as? MediaSessionUID.SingleItem)?.uid ?: return null val unwrappedParentUid = (parentUid as? MediaSessionUID.SingleItem)?.uid @@ -204,7 +206,7 @@ constructor( private fun expandSearchInfoCommand( query: String?, extras: Bundle, - library: Library + library: Library, ): PlaybackCommand? { if (query == null) { // User just wanted to 'play some music', shuffle all diff --git a/app/src/main/java/org/oxycblt/auxio/playback/service/PlaybackServiceFragment.kt b/app/src/main/java/org/oxycblt/auxio/playback/service/PlaybackServiceFragment.kt index 2b90f2f38..44ede3eb1 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/service/PlaybackServiceFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/service/PlaybackServiceFragment.kt @@ -59,7 +59,8 @@ private constructor( exoHolderFactory, sessionHolderFactory, widgetComponentFactory, - systemReceiverFactory) + systemReceiverFactory, + ) } private val waitJob = Job() @@ -94,12 +95,16 @@ private constructor( IntegerTable.START_ID_ACTIVITY -> null IntegerTable.START_ID_TASKER -> DeferredPlayback.RestoreState( - play = true, fallback = DeferredPlayback.ShuffleAll) + play = true, + fallback = DeferredPlayback.ShuffleAll, + ) IntegerTable.START_ID_MEDIA_BUTTON -> { if (!sessionHolder.tryMediaButtonIntent(intent)) { // Malformed intent, need to restore state immediately DeferredPlayback.RestoreState( - play = true, fallback = DeferredPlayback.ShuffleAll) + play = true, + fallback = DeferredPlayback.ShuffleAll, + ) } else { null } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/service/SystemModule.kt b/app/src/main/java/org/oxycblt/auxio/playback/service/SystemModule.kt index 2854d4873..dacb2e94c 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/service/SystemModule.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/service/SystemModule.kt @@ -48,7 +48,7 @@ class SystemModule { @Provides fun mediaSourceFactory( dataSourceFactory: DataSource.Factory, - extractorsFactory: ExtractorsFactory + extractorsFactory: ExtractorsFactory, ): MediaSource.Factory = ProgressiveMediaSource.Factory(dataSourceFactory, extractorsFactory) @Provides @@ -70,6 +70,7 @@ class SystemModule { MatroskaExtractor(DefaultSubtitleParserFactory.UNSUPPORTED), // Enable constant bitrate seeking so that certain MP3s/AACs are seekable AdtsExtractor(AdtsExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING), - Mp3Extractor(Mp3Extractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING)) + Mp3Extractor(Mp3Extractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING), + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/service/SystemPlaybackReceiver.kt b/app/src/main/java/org/oxycblt/auxio/playback/service/SystemPlaybackReceiver.kt index 0ff4b83e3..50792f99d 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/service/SystemPlaybackReceiver.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/service/SystemPlaybackReceiver.kt @@ -40,7 +40,7 @@ private constructor( private val context: Context, private val playbackManager: PlaybackStateManager, private val playbackSettings: PlaybackSettings, - private val widgetComponent: WidgetComponent + private val widgetComponent: WidgetComponent, ) : BroadcastReceiver() { private var initialHeadsetPlugEventHandled = false @@ -48,7 +48,7 @@ private constructor( @Inject constructor( private val playbackManager: PlaybackStateManager, - private val playbackSettings: PlaybackSettings + private val playbackSettings: PlaybackSettings, ) { fun create(context: Context, widgetComponent: WidgetComponent) = SystemPlaybackReceiver(context, playbackManager, playbackSettings, widgetComponent) @@ -57,7 +57,11 @@ private constructor( @Suppress("WrongConstant") fun attach() { ContextCompat.registerReceiver( - context, this, INTENT_FILTER, ContextCompat.RECEIVER_EXPORTED) + context, + this, + INTENT_FILTER, + ContextCompat.RECEIVER_EXPORTED, + ) } fun release() { @@ -125,9 +129,11 @@ private constructor( // ACTION_HEADSET_PLUG will fire when this BroadcastReceiver is initially attached, // which would result in unexpected playback. Work around it by dropping the first // call to this function, which should come from that Intent. - if (playbackSettings.headsetAutoplay && - playbackManager.currentSong != null && - initialHeadsetPlugEventHandled) { + if ( + playbackSettings.headsetAutoplay && + playbackManager.currentSong != null && + initialHeadsetPlugEventHandled + ) { L.d("Device connected, resuming") playbackManager.playing(true) } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackCommand.kt b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackCommand.kt index d4aedf3db..99b8a67d0 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackCommand.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackCommand.kt @@ -78,7 +78,7 @@ interface PlaybackCommand { enum class ShuffleMode { ON, OFF, - IMPLICIT + IMPLICIT, } class PlaybackCommandFactoryImpl @@ -87,13 +87,13 @@ constructor( val playbackManager: PlaybackStateManager, val playbackSettings: PlaybackSettings, val listSettings: ListSettings, - val musicRepository: MusicRepository + val musicRepository: MusicRepository, ) : PlaybackCommand.Factory { data class PlaybackCommandImpl( override val song: Song?, override val parent: MusicParent?, override val queue: List, - override val shuffled: Boolean + override val shuffled: Boolean, ) : PlaybackCommand { // Only show queue count to reduce memory use override fun toString() = @@ -139,7 +139,7 @@ constructor( parent: T?, parents: List, sort: Sort, - shuffle: ShuffleMode + shuffle: ShuffleMode, ): PlaybackCommand? { return if (parent != null) { newCommand(song, parent, sort, shuffle) @@ -159,7 +159,7 @@ constructor( song: Song?, parent: MusicParent, sort: Sort, - shuffle: ShuffleMode + shuffle: ShuffleMode, ): PlaybackCommand? { val songs = sort.songs(parent.songs) return newCommand(song, parent, songs, sort, shuffle) @@ -170,7 +170,7 @@ constructor( parent: MusicParent?, queue: Collection, sort: Sort, - shuffle: ShuffleMode + shuffle: ShuffleMode, ): PlaybackCommand? { if (queue.isEmpty() || (song != null && song !in queue)) { return null @@ -182,7 +182,7 @@ constructor( song: Song?, parent: MusicParent?, queue: List, - shuffle: ShuffleMode + shuffle: ShuffleMode, ): PlaybackCommand { return PlaybackCommandImpl(song, parent, queue, isShuffled(shuffle)) } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateHolder.kt b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateHolder.kt index 11f5f2938..4b96af070 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateHolder.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateHolder.kt @@ -150,7 +150,7 @@ interface PlaybackStateHolder { rawQueue: RawQueue, positionMs: Long, repeatMode: RepeatMode, - ack: StateAck.NewPlayback? + ack: StateAck.NewPlayback?, ) /** End whatever ongoing playback session may be going on */ @@ -219,11 +219,7 @@ sealed interface StateAck { * nonsensical value that cannot be used to obtain next and last songs without first resolving the * queue. */ -data class RawQueue( - val heap: List, - val shuffledMapping: List, - val heapIndex: Int, -) { +data class RawQueue(val heap: List, val shuffledMapping: List, val heapIndex: Int) { /** Whether the queue is currently shuffled. */ val isShuffled = shuffledMapping.isNotEmpty() @@ -275,7 +271,7 @@ data class QueueChange(val type: Type, val instructions: UpdateInstructions) { * The current song has changed, possibly alongside the mapping and index depending on the * context. */ - SONG + SONG, } } @@ -308,7 +304,7 @@ private constructor( /** The position when this instance was created, in milliseconds. */ private val initPositionMs: Long, /** The time this instance was created, as a unix epoch timestamp. */ - private val creationTime: Long + private val creationTime: Long, ) { /** * Calculate the "real" playback position this instance contains, in milliseconds. @@ -347,7 +343,8 @@ private constructor( // Not advancing, so don't move the position. 0f }, - creationTime) + creationTime, + ) // Equality ignores the creation time to prevent functionally identical states // from being non-equal. @@ -380,13 +377,15 @@ private constructor( // Minor sanity check: Make sure that advancing can't occur if already paused. isPlaying && isAdvancing, positionMs, - SystemClock.elapsedRealtime()) + SystemClock.elapsedRealtime(), + ) fun nil() = Progression( isPlaying = false, isAdvancing = false, initPositionMs = 0, - creationTime = SystemClock.elapsedRealtime()) + creationTime = SystemClock.elapsedRealtime(), + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt index e0aede3ab..2dfc07c5f 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateManager.kt @@ -296,7 +296,7 @@ interface PlaybackStateManager { parent: MusicParent?, queue: List, index: Int, - isShuffled: Boolean + isShuffled: Boolean, ) {} /** @@ -342,7 +342,7 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { val queue: List, val index: Int, val isShuffled: Boolean, - val rawQueue: RawQueue + val rawQueue: RawQueue, ) private val listeners = mutableListOf() @@ -356,7 +356,8 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { queue = emptyList(), index = -1, isShuffled = false, - rawQueue = RawQueue.nil()) + rawQueue = RawQueue.nil(), + ) @Volatile private var stateHolder: PlaybackStateHolder? = null @Volatile private var pendingDeferredPlayback: DeferredPlayback? = null @Volatile private var isInitialized = false @@ -393,7 +394,11 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { if (isInitialized) { L.d("Sending initial state to $listener") listener.onNewPlayback( - stateMirror.parent, stateMirror.queue, stateMirror.index, stateMirror.isShuffled) + stateMirror.parent, + stateMirror.queue, + stateMirror.index, + stateMirror.isShuffled, + ) listener.onProgressionChanged(stateMirror.progression) listener.onRepeatModeChanged(stateMirror.repeatMode) } @@ -421,7 +426,8 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { stateMirror.rawQueue, stateMirror.progression.calculateElapsedPositionMs(), stateMirror.repeatMode, - null) + null, + ) } pendingDeferredPlayback?.let(stateHolder::handleDeferred) } @@ -592,11 +598,7 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { val rawQueue = stateHolder.resolveQueue() val change = QueueChange(QueueChange.Type.MAPPING, UpdateInstructions.Add(ack.at, ack.size)) - stateMirror = - stateMirror.copy( - queue = rawQueue.resolveSongs(), - rawQueue = rawQueue, - ) + stateMirror = stateMirror.copy(queue = rawQueue.resolveSongs(), rawQueue = rawQueue) listeners.forEach { it.onQueueChanged(stateMirror.queue, stateMirror.index, change) } @@ -605,11 +607,7 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { val rawQueue = stateHolder.resolveQueue() val change = QueueChange(QueueChange.Type.MAPPING, UpdateInstructions.Add(ack.at, ack.size)) - stateMirror = - stateMirror.copy( - queue = rawQueue.resolveSongs(), - rawQueue = rawQueue, - ) + stateMirror = stateMirror.copy(queue = rawQueue.resolveSongs(), rawQueue = rawQueue) listeners.forEach { it.onQueueChanged(stateMirror.queue, stateMirror.index, change) } @@ -621,7 +619,8 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { QueueChange( if (stateMirror.index != newIndex) QueueChange.Type.INDEX else QueueChange.Type.MAPPING, - UpdateInstructions.Move(ack.from, ack.to)) + UpdateInstructions.Move(ack.from, ack.to), + ) stateMirror = stateMirror.copy( @@ -644,7 +643,8 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { stateMirror.index != newIndex -> QueueChange.Type.INDEX else -> QueueChange.Type.MAPPING }, - UpdateInstructions.Remove(ack.index, 1)) + UpdateInstructions.Remove(ack.index, 1), + ) stateMirror = stateMirror.copy( @@ -664,10 +664,14 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { queue = rawQueue.resolveSongs(), index = rawQueue.resolveIndex(), isShuffled = rawQueue.isShuffled, - rawQueue = rawQueue) + rawQueue = rawQueue, + ) listeners.forEach { it.onQueueReordered( - stateMirror.queue, stateMirror.index, stateMirror.isShuffled) + stateMirror.queue, + stateMirror.index, + stateMirror.isShuffled, + ) } } is StateAck.NewPlayback -> { @@ -678,27 +682,23 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { queue = rawQueue.resolveSongs(), index = rawQueue.resolveIndex(), isShuffled = rawQueue.isShuffled, - rawQueue = rawQueue) + rawQueue = rawQueue, + ) listeners.forEach { it.onNewPlayback( stateMirror.parent, stateMirror.queue, stateMirror.index, - stateMirror.isShuffled) + stateMirror.isShuffled, + ) } } is StateAck.ProgressionChanged -> { - stateMirror = - stateMirror.copy( - progression = stateHolder.progression, - ) + stateMirror = stateMirror.copy(progression = stateHolder.progression) listeners.forEach { it.onProgressionChanged(stateMirror.progression) } } is StateAck.RepeatModeChanged -> { - stateMirror = - stateMirror.copy( - repeatMode = stateHolder.repeatMode, - ) + stateMirror = stateMirror.copy(repeatMode = stateHolder.repeatMode) listeners.forEach { it.onRepeatModeChanged(stateMirror.repeatMode) } } is StateAck.SessionEnded -> { @@ -726,7 +726,7 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { @Synchronized override fun applySavedState( savedState: PlaybackStateManager.SavedState, - destructive: Boolean + destructive: Boolean, ) { if (isInitialized && !destructive) { L.w("Already initialized, cannot apply saved state") @@ -795,14 +795,16 @@ class PlaybackStateManagerImpl @Inject constructor() : PlaybackStateManager { shuffledMapping[index] } else { index - }) + }, + ) stateHolder.applySavedState( savedState.parent, rawQueue, savedState.positionMs, savedState.repeatMode, - StateAck.NewPlayback) + StateAck.NewPlayback, + ) isInitialized = true } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/ui/AnimatedMaterialButton.kt b/app/src/main/java/org/oxycblt/auxio/playback/ui/AnimatedMaterialButton.kt index 29accb6f0..b13686c75 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/ui/AnimatedMaterialButton.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/ui/AnimatedMaterialButton.kt @@ -40,7 +40,7 @@ class AnimatedMaterialButton : RippleFixMaterialButton { constructor( context: Context, attrs: AttributeSet, - defStyleAttr: Int + defStyleAttr: Int, ) : super(context, attrs, defStyleAttr) private var animator: Animator? = null diff --git a/app/src/main/java/org/oxycblt/auxio/playback/ui/ControlledCoverView.kt b/app/src/main/java/org/oxycblt/auxio/playback/ui/ControlledCoverView.kt index 216755c37..677292261 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/ui/ControlledCoverView.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/ui/ControlledCoverView.kt @@ -65,21 +65,23 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr e1: MotionEvent?, e2: MotionEvent, velocityX: Float, - velocityY: Float + velocityY: Float, ): Boolean = false override fun onFling( e1: MotionEvent?, e2: MotionEvent, velocityX: Float, - velocityY: Float + velocityY: Float, ): Boolean { e1 ?: return false val diffY = e2.y - e1.y val diffX = e2.x - e1.x - if (abs(diffX) > abs(diffY) && - abs(diffX) > viewConfig.scaledTouchSlop && - abs(velocityX) > viewConfig.scaledMinimumFlingVelocity) { + if ( + abs(diffX) > abs(diffY) && + abs(diffX) > viewConfig.scaledTouchSlop && + abs(velocityX) > viewConfig.scaledMinimumFlingVelocity + ) { if (diffX > 0) { onSwipeRight() } else { diff --git a/app/src/main/java/org/oxycblt/auxio/playback/ui/ForcedLTRFrameLayout.kt b/app/src/main/java/org/oxycblt/auxio/playback/ui/ForcedLTRFrameLayout.kt index 7d5a6da19..2df5c7a8b 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/ui/ForcedLTRFrameLayout.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/ui/ForcedLTRFrameLayout.kt @@ -36,7 +36,7 @@ constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0, - defStyleRes: Int = 0 + defStyleRes: Int = 0, ) : FrameLayout(context, attrs, defStyleAttr, defStyleRes) { override fun onFinishInflate() { super.onFinishInflate() diff --git a/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/CircleClipTapView.kt b/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/CircleClipTapView.kt index f307a15e7..df6e0d565 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/CircleClipTapView.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/CircleClipTapView.kt @@ -83,7 +83,8 @@ class CircleClipTapView(context: Context?, attrs: AttributeSet) : View(context, f * (halfWidth + arcSize) + w, heightPx.toFloat() / 2, f * (halfWidth - arcSize) + w, - heightPx.toFloat()) + heightPx.toFloat(), + ) shapePath.lineTo(w, heightPx.toFloat()) shapePath.close() diff --git a/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/PlayerFastSeekOverlay.kt b/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/PlayerFastSeekOverlay.kt index 366a9b704..7f5348a3b 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/PlayerFastSeekOverlay.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/PlayerFastSeekOverlay.kt @@ -38,7 +38,7 @@ enum class DisplayPortion { MIDDLE, RIGHT, LEFT_HALF, - RIGHT_HALF + RIGHT_HALF, } interface DoubleTapListener { @@ -81,7 +81,8 @@ class PlayerFastSeekOverlay(context: Context, attrs: AttributeSet?) : context, com.google.android.material.R.style .ShapeAppearance_Material3_Corner_Medium, - -1) + -1, + ) .build() } } else { @@ -122,7 +123,8 @@ class PlayerFastSeekOverlay(context: Context, attrs: AttributeSet?) : context, object : GestureDetector.SimpleOnGestureListener() { override fun onDown(e: MotionEvent) = true - }) + }, + ) gestureDetector.setOnDoubleTapListener(this) addOnLayoutChangeListener { view, _, _, _, _, _, _, _, _ -> @@ -333,6 +335,7 @@ class PlayerFastSeekOverlay(context: Context, attrs: AttributeSet?) : fun onDoubleTap() fun onDoubleTapEnd() + /** Determines if the playback should forward/rewind or do nothing. */ fun getFastSeekDirection(portion: DisplayPortion): FastSeekDirection @@ -341,7 +344,7 @@ class PlayerFastSeekOverlay(context: Context, attrs: AttributeSet?) : enum class FastSeekDirection(val directionAsBoolean: Boolean?) { NONE(null), FORWARD(true), - BACKWARD(false) + BACKWARD(false), } } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/SecondsView.kt b/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/SecondsView.kt index e81d319df..276937e00 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/SecondsView.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/ui/stepper/SecondsView.kt @@ -54,7 +54,10 @@ class SecondsView(context: Context, attrs: AttributeSet?) : LinearLayout(context // Done as a field so that we don't have to compute on each tab if animations are enabled private val animationsEnabled = Settings.System.getFloat( - context.contentResolver, Settings.Global.ANIMATOR_DURATION_SCALE, 1F) != 0F + context.contentResolver, + Settings.Global.ANIMATOR_DURATION_SCALE, + 1F, + ) != 0F val binding = PlayerFastSeekSecondsViewBinding.inflate(LayoutInflater.from(context), this) @@ -108,7 +111,8 @@ class SecondsView(context: Context, attrs: AttributeSet?) : LinearLayout(context binding.icon3.alpha = 0f }, { binding.icon1.alpha = it }, - { secondAnimator.start() }) + { secondAnimator.start() }, + ) private val secondAnimator: ValueAnimator = CustomValueAnimator( @@ -118,7 +122,8 @@ class SecondsView(context: Context, attrs: AttributeSet?) : LinearLayout(context binding.icon3.alpha = 0f }, { binding.icon2.alpha = it }, - { thirdAnimator.start() }) + { thirdAnimator.start() }, + ) private val thirdAnimator: ValueAnimator = CustomValueAnimator( @@ -131,7 +136,8 @@ class SecondsView(context: Context, attrs: AttributeSet?) : LinearLayout(context binding.icon1.alpha = 1f - binding.icon3.alpha binding.icon3.alpha = it }, - { fourthAnimator.start() }) + { fourthAnimator.start() }, + ) private val fourthAnimator: ValueAnimator = CustomValueAnimator( @@ -141,7 +147,8 @@ class SecondsView(context: Context, attrs: AttributeSet?) : LinearLayout(context binding.icon3.alpha = 1f }, { binding.icon2.alpha = 1f - it }, - { fifthAnimator.start() }) + { fifthAnimator.start() }, + ) private val fifthAnimator: ValueAnimator = CustomValueAnimator( @@ -151,12 +158,13 @@ class SecondsView(context: Context, attrs: AttributeSet?) : LinearLayout(context binding.icon3.alpha = 1f }, { binding.icon3.alpha = 1f - it }, - { firstAnimator.start() }) + { firstAnimator.start() }, + ) private inner class CustomValueAnimator( start: () -> Unit, update: (value: Float) -> Unit, - end: () -> Unit + end: () -> Unit, ) : ValueAnimator() { init { diff --git a/app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/PlayerSwipeIndicatorOverlay.kt b/app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/PlayerSwipeIndicatorOverlay.kt new file mode 100644 index 000000000..d2b162848 --- /dev/null +++ b/app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/PlayerSwipeIndicatorOverlay.kt @@ -0,0 +1,295 @@ +/* + * Copyright (c) 2025 Auxio Project + * PlayerSwipeIndicatorOverlay.kt is part of Auxio. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package org.oxycblt.auxio.playback.ui.swipe + +import android.content.Context +import android.util.AttributeSet +import android.view.LayoutInflater +import android.view.View +import androidx.constraintlayout.widget.ConstraintLayout +import com.google.android.material.shape.MaterialShapeDrawable +import com.google.android.material.shape.ShapeAppearanceModel +import dagger.hilt.android.AndroidEntryPoint +import javax.inject.Inject +import org.oxycblt.auxio.R +import org.oxycblt.auxio.ui.UISettings +import org.oxycblt.auxio.util.isRtl + +@AndroidEntryPoint +class PlayerSwipeIndicatorOverlay(context: Context, attrs: AttributeSet?) : + ConstraintLayout(context, attrs) { + + @Inject lateinit var uiSettings: UISettings + + private var leftSwipeIndicator: SwipeIndicatorView + private var rightSwipeIndicator: SwipeIndicatorView + private var leftSwipeClipView: SwipeClipView + private var rightSwipeClipView: SwipeClipView + private var rootConstraintLayout: ConstraintLayout + + private val shapeAppearance: ShapeAppearanceModel + + /** The width used for calculating full slide translation */ + private var indicatorSlideDistance = 100f + + /** Current swipe direction, null if no swipe in progress */ + private var currentSwipeDirection: SwipeDirection? = null + + init { + LayoutInflater.from(context).inflate(R.layout.player_swipe_indicator_overlay, this, true) + + // Set up shape appearance based on UISettings similar to CoverView + val styledAttrs = + context.obtainStyledAttributes(attrs, R.styleable.PlayerSwipeIndicatorOverlay) + val shapeAppearanceRes = + styledAttrs.getResourceId(R.styleable.PlayerSwipeIndicatorOverlay_shapeAppearance, 0) + + shapeAppearance = + if (uiSettings.roundMode) { + if (shapeAppearanceRes != 0) { + ShapeAppearanceModel.builder(context, shapeAppearanceRes, -1).build() + } else { + ShapeAppearanceModel.builder( + context, + com.google.android.material.R.style + .ShapeAppearance_Material3_Corner_Medium, + -1, + ) + .build() + } + } else { + ShapeAppearanceModel.builder().build() + } + + styledAttrs.recycle() + + leftSwipeIndicator = findViewById(R.id.left_swipe_indicator) + rightSwipeIndicator = findViewById(R.id.right_swipe_indicator) + leftSwipeClipView = findViewById(R.id.left_swipe_clip_view) + rightSwipeClipView = findViewById(R.id.right_swipe_clip_view) + rootConstraintLayout = findViewById(R.id.root_constraint_layout) + + // Apply shape clipping to the overlay + clipToOutline = true + background = + MaterialShapeDrawable().apply { + shapeAppearanceModel = shapeAppearance + fillColor = + android.content.res.ColorStateList.valueOf(android.graphics.Color.TRANSPARENT) + } + + // Hide overlay elements by default + leftSwipeIndicator.alpha = 0f + rightSwipeIndicator.alpha = 0f + leftSwipeClipView.alpha = 0f + rightSwipeClipView.alpha = 0f + leftSwipeIndicator.visibility = INVISIBLE + rightSwipeIndicator.visibility = INVISIBLE + leftSwipeClipView.visibility = INVISIBLE + rightSwipeClipView.visibility = INVISIBLE + + addOnLayoutChangeListener { view, _, _, _, _, _, _, _, _ -> + leftSwipeClipView.updateArcSize(view) + rightSwipeClipView.updateArcSize(view) + // Set slide distance based on indicator width plus some padding + indicatorSlideDistance = view.width * 0.3f + } + + // Initialize directions for each side + // In LTR: left side = previous, right side = next + // In RTL: left side = next, right side = previous + leftSwipeClipView.updatePosition(true) + rightSwipeClipView.updatePosition(false) + updateIndicatorDirections() + } + + private fun updateIndicatorDirections() { + val isRtl = isRtl + // Left indicator: previous in LTR, next in RTL + leftSwipeIndicator.setIsNext(isRtl) + // Right indicator: next in LTR, previous in RTL + rightSwipeIndicator.setIsNext(!isRtl) + } + + /** + * Called when a swipe gesture starts. + * + * @param direction The direction of the swipe (LEFT for swiping left, RIGHT for swiping right) + */ + fun onSwipeStarted(direction: SwipeDirection) { + // Cancel any pending animations on ALL indicators (in case previous swipe + // was in a different direction and its fade-out animation is still running) + cancelAllAnimations() + + currentSwipeDirection = direction + + val indicatorView = getIndicatorForDirection(direction) + val clipView = getClipViewForDirection(direction) + + indicatorView.visibility = VISIBLE + clipView.visibility = VISIBLE + } + + private fun cancelAllAnimations() { + // Cancel animations and reset state for both indicators + leftSwipeIndicator.animate().cancel() + rightSwipeIndicator.animate().cancel() + leftSwipeClipView.animate().cancel() + rightSwipeClipView.animate().cancel() + + // Reset the non-active indicator to hidden state + leftSwipeIndicator.alpha = 0f + leftSwipeIndicator.translationX = 0f + leftSwipeIndicator.visibility = INVISIBLE + leftSwipeClipView.alpha = 0f + leftSwipeClipView.swipeProgress = 0f + leftSwipeClipView.visibility = INVISIBLE + + rightSwipeIndicator.alpha = 0f + rightSwipeIndicator.translationX = 0f + rightSwipeIndicator.visibility = INVISIBLE + rightSwipeClipView.alpha = 0f + rightSwipeClipView.swipeProgress = 0f + rightSwipeClipView.visibility = INVISIBLE + } + + /** + * Called as the user swipes to update the visual progress. + * + * @param progress Normalized progress of the swipe (0 to 1+, where 1 is the commit threshold) + * @param direction The direction of the swipe + */ + fun onSwipeProgress(progress: Float, direction: SwipeDirection) { + val indicatorView = getIndicatorForDirection(direction) + val clipView = getClipViewForDirection(direction) + + // Clamp progress for visual calculations (allow slight overshoot) + val visualProgress = progress.coerceIn(0f, 1.2f) + + // Alpha: fade in from 0 to 1 as progress goes from 0 to 1 + val alpha = (visualProgress).coerceIn(0f, 1f) + indicatorView.alpha = alpha + clipView.alpha = alpha + + // Translation: slide in from the edge + // At progress 0: fully translated off screen + // At progress 1: at final position (translation = 0) + val translationFactor = 1f - visualProgress.coerceIn(0f, 1f) + val translation = + when (direction) { + SwipeDirection.LEFT -> indicatorSlideDistance * translationFactor + SwipeDirection.RIGHT -> -indicatorSlideDistance * translationFactor + } + indicatorView.translationX = translation + + // Update clip view progress + clipView.swipeProgress = visualProgress.coerceIn(0f, 1f) + } + + /** + * Called when the swipe gesture is released. + * + * @param committed True if the swipe passed the commit threshold and the action should execute + * @param direction The direction of the swipe + */ + fun onSwipeReleased(committed: Boolean, direction: SwipeDirection) { + val indicatorView = getIndicatorForDirection(direction) + val clipView = getClipViewForDirection(direction) + + if (committed) { + // Committed: fade out immediately without sliding + indicatorView + .animate() + .alpha(0f) + .setDuration(200) + .withEndAction { indicatorView.visibility = INVISIBLE } + .start() + clipView + .animate() + .alpha(0f) + .setDuration(200) + .withEndAction { + clipView.visibility = INVISIBLE + clipView.swipeProgress = 0f + } + .start() + } else { + // Not committed: slide back out and fade out + val slideOutTranslation = + when (direction) { + SwipeDirection.LEFT -> indicatorSlideDistance + SwipeDirection.RIGHT -> -indicatorSlideDistance + } + indicatorView + .animate() + .alpha(0f) + .translationX(slideOutTranslation) + .setDuration(200) + .withEndAction { + indicatorView.visibility = INVISIBLE + indicatorView.translationX = 0f + } + .start() + // Animate clip view progress back to 0 + val startProgress = clipView.swipeProgress + clipView + .animate() + .alpha(0f) + .setDuration(200) + .setUpdateListener { animator -> + val fraction = animator.animatedFraction + clipView.swipeProgress = startProgress * (1f - fraction) + } + .withEndAction { + clipView.visibility = INVISIBLE + clipView.swipeProgress = 0f + } + .start() + } + + currentSwipeDirection = null + } + + /** Cancels any in-progress swipe indicator without animation. */ + fun cancelSwipe() { + cancelAllAnimations() + currentSwipeDirection = null + } + + private fun getIndicatorForDirection(direction: SwipeDirection): View { + // When swiping left, we show the right indicator (next) + // When swiping right, we show the left indicator (previous) + return when (direction) { + SwipeDirection.LEFT -> rightSwipeIndicator + SwipeDirection.RIGHT -> leftSwipeIndicator + } + } + + private fun getClipViewForDirection(direction: SwipeDirection): SwipeClipView { + return when (direction) { + SwipeDirection.LEFT -> rightSwipeClipView + SwipeDirection.RIGHT -> leftSwipeClipView + } + } + + enum class SwipeDirection { + LEFT, + RIGHT, + } +} diff --git a/app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/SwipeClipView.kt b/app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/SwipeClipView.kt new file mode 100644 index 000000000..6a56716ba --- /dev/null +++ b/app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/SwipeClipView.kt @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2025 Auxio Project + * SwipeClipView.kt is part of Auxio. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package org.oxycblt.auxio.playback.ui.swipe + +import android.content.Context +import android.graphics.Canvas +import android.graphics.Paint +import android.graphics.Path +import android.util.AttributeSet +import android.view.View + +class SwipeClipView(context: Context?, attrs: AttributeSet) : View(context, attrs) { + + private var backgroundPaint = Paint() + + private var widthPx = 0 + private var heightPx = 0 + + private var shapePath = Path() + private var arcSize: Float = 80f + private var isLeft = true + + /** Progress from 0.0 to 1.0 indicating how much of the swipe area to show */ + var swipeProgress: Float = 0f + set(value) { + field = value.coerceIn(0f, 1f) + updatePathShape() + } + + init { + requireNotNull(context) { "Context is null." } + + backgroundPaint.apply { + style = Paint.Style.FILL + isAntiAlias = true + color = 0x30000000 + } + + val dm = context.resources.displayMetrics + widthPx = dm.widthPixels + heightPx = dm.heightPixels + + updatePathShape() + } + + fun updateArcSize(baseView: View) { + val newArcSize = baseView.height / 11.4f + if (arcSize != newArcSize) { + arcSize = newArcSize + updatePathShape() + } + } + + fun updatePosition(newIsLeft: Boolean) { + if (isLeft != newIsLeft) { + isLeft = newIsLeft + updatePathShape() + } + } + + private fun updatePathShape() { + // The maximum width the swipe area can take (half of the view) + val maxSwipeWidth = widthPx * 0.5f + // The current swipe width based on progress + val currentSwipeWidth = maxSwipeWidth * swipeProgress + + shapePath.reset() + + if (currentSwipeWidth <= 0) { + invalidate() + return + } + + if (isLeft) { + // Draw from left edge + shapePath.moveTo(0f, 0f) + shapePath.lineTo(currentSwipeWidth - arcSize.coerceAtMost(currentSwipeWidth), 0f) + shapePath.quadTo( + currentSwipeWidth + arcSize.coerceAtMost(currentSwipeWidth), + heightPx.toFloat() / 2, + currentSwipeWidth - arcSize.coerceAtMost(currentSwipeWidth), + heightPx.toFloat(), + ) + shapePath.lineTo(0f, heightPx.toFloat()) + } else { + // Draw from right edge + val rightEdge = widthPx.toFloat() + shapePath.moveTo(rightEdge, 0f) + shapePath.lineTo( + rightEdge - currentSwipeWidth + arcSize.coerceAtMost(currentSwipeWidth), + 0f, + ) + shapePath.quadTo( + rightEdge - currentSwipeWidth - arcSize.coerceAtMost(currentSwipeWidth), + heightPx.toFloat() / 2, + rightEdge - currentSwipeWidth + arcSize.coerceAtMost(currentSwipeWidth), + heightPx.toFloat(), + ) + shapePath.lineTo(rightEdge, heightPx.toFloat()) + } + + shapePath.close() + invalidate() + } + + override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) { + super.onSizeChanged(w, h, oldw, oldh) + widthPx = w + heightPx = h + updatePathShape() + } + + override fun onDraw(canvas: Canvas) { + super.onDraw(canvas) + + if (swipeProgress > 0) { + canvas.clipPath(shapePath) + canvas.drawPath(shapePath, backgroundPaint) + } + } +} diff --git a/app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/SwipeIndicatorView.kt b/app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/SwipeIndicatorView.kt new file mode 100644 index 000000000..9a887a8d6 --- /dev/null +++ b/app/src/main/java/org/oxycblt/auxio/playback/ui/swipe/SwipeIndicatorView.kt @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2025 Auxio Project + * SwipeIndicatorView.kt is part of Auxio. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package org.oxycblt.auxio.playback.ui.swipe + +import android.content.Context +import android.util.AttributeSet +import android.view.LayoutInflater +import android.widget.LinearLayout +import org.oxycblt.auxio.R +import org.oxycblt.auxio.databinding.PlayerSwipeIndicatorViewBinding + +class SwipeIndicatorView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs) { + + val binding = PlayerSwipeIndicatorViewBinding.inflate(LayoutInflater.from(context), this) + + init { + orientation = HORIZONTAL + layoutParams = LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT) + } + + fun setIsNext(isNext: Boolean) { + if (isNext) { + // For "next": Text on left, icon on right + binding.swipeIcon.setImageResource(R.drawable.ic_skip_next_24) + binding.swipeText.setText(R.string.desc_skip_next) + // Reorder views: text first, then icon + removeAllViews() + addView(binding.swipeText) + addView(binding.swipeIcon) + } else { + // For "previous": Icon on left, text on right + binding.swipeIcon.setImageResource(R.drawable.ic_skip_prev_24) + binding.swipeText.setText(R.string.desc_skip_prev) + // Reorder views: icon first, then text + removeAllViews() + addView(binding.swipeIcon) + addView(binding.swipeText) + } + } +} diff --git a/app/src/main/java/org/oxycblt/auxio/search/SearchEngine.kt b/app/src/main/java/org/oxycblt/auxio/search/SearchEngine.kt index c107a5c99..cf0e353b1 100644 --- a/app/src/main/java/org/oxycblt/auxio/search/SearchEngine.kt +++ b/app/src/main/java/org/oxycblt/auxio/search/SearchEngine.kt @@ -61,7 +61,7 @@ interface SearchEngine { val albums: Collection? = null, val artists: Collection? = null, val genres: Collection? = null, - val playlists: Collection? = null + val playlists: Collection? = null, ) } @@ -77,7 +77,8 @@ class SearchEngineImpl @Inject constructor(@ApplicationContext private val conte albums = items.albums?.searchListImpl(query), artists = items.artists?.searchListImpl(query), genres = items.genres?.searchListImpl(query), - playlists = items.playlists?.searchListImpl(query)) + playlists = items.playlists?.searchListImpl(query), + ) } /** @@ -91,7 +92,7 @@ class SearchEngineImpl @Inject constructor(@ApplicationContext private val conte */ private inline fun Collection.searchListImpl( query: String, - fallback: (String, T) -> Boolean = { _, _ -> false } + fallback: (String, T) -> Boolean = { _, _ -> false }, ) = filter { // See if the plain resolved name matches the query. This works for most @@ -119,7 +120,9 @@ class SearchEngineImpl @Inject constructor(@ApplicationContext private val conte // could make it match the query. val normalizedName = NORMALIZE_POST_PROCESSING_REGEX.replace( - Normalizer.normalize(resolvedName, Normalizer.Form.NFKD), "") + Normalizer.normalize(resolvedName, Normalizer.Form.NFKD), + "", + ) if (normalizedName.contains(query, ignoreCase = true)) { return@filter true } diff --git a/app/src/main/java/org/oxycblt/auxio/search/SearchFragment.kt b/app/src/main/java/org/oxycblt/auxio/search/SearchFragment.kt index e6f39872d..0dd36f97d 100644 --- a/app/src/main/java/org/oxycblt/auxio/search/SearchFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/search/SearchFragment.kt @@ -164,7 +164,11 @@ class SearchFragment : ListFragment() { collect(musicModel.playlistDecision.flow, ::handlePlaylistDecision) collect(musicModel.playlistMessage.flow, ::handlePlaylistMessage) collectImmediately( - playbackModel.song, playbackModel.parent, playbackModel.isPlaying, ::updatePlayback) + playbackModel.song, + playbackModel.parent, + playbackModel.isPlaying, + ::updatePlayback, + ) collect(playbackModel.playbackDecision.flow, ::handlePlaybackDecision) collect(detailModel.toShow.flow, ::handleShow) } @@ -324,7 +328,8 @@ class SearchFragment : ListFragment() { decision.playlist.uid, decision.template, decision.applySongs.map { it.uid }.toTypedArray(), - decision.reason) + decision.reason, + ) } is PlaylistDecision.Delete -> { L.d("Deleting ${decision.playlist}") @@ -337,7 +342,8 @@ class SearchFragment : ListFragment() { is PlaylistDecision.Add -> { L.d("Adding ${decision.songs.size} to a playlist") SearchFragmentDirections.addToPlaylist( - decision.songs.map { it.uid }.toTypedArray()) + decision.songs.map { it.uid }.toTypedArray() + ) } is PlaylistDecision.New -> { error("Unexpected decision $decision") diff --git a/app/src/main/java/org/oxycblt/auxio/search/SearchSettings.kt b/app/src/main/java/org/oxycblt/auxio/search/SearchSettings.kt index 71fd94583..b789feb6e 100644 --- a/app/src/main/java/org/oxycblt/auxio/search/SearchSettings.kt +++ b/app/src/main/java/org/oxycblt/auxio/search/SearchSettings.kt @@ -42,11 +42,16 @@ class SearchSettingsImpl @Inject constructor(@ApplicationContext context: Contex get() = MusicType.fromIntCode( sharedPreferences.getInt( - getString(R.string.set_key_search_filter_to), Int.MIN_VALUE)) + getString(R.string.set_key_search_filter_to), + Int.MIN_VALUE, + ) + ) set(value) { sharedPreferences.edit { putInt( - getString(R.string.set_key_search_filter_to), value?.intCode ?: Int.MIN_VALUE) + getString(R.string.set_key_search_filter_to), + value?.intCode ?: Int.MIN_VALUE, + ) apply() } } diff --git a/app/src/main/java/org/oxycblt/auxio/search/SearchViewModel.kt b/app/src/main/java/org/oxycblt/auxio/search/SearchViewModel.kt index ec835c912..060f7c72c 100644 --- a/app/src/main/java/org/oxycblt/auxio/search/SearchViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/search/SearchViewModel.kt @@ -121,7 +121,8 @@ constructor( library.albums, library.artists, library.genres, - library.playlists) + library.playlists, + ) } else { L.d("Filter specified, reducing library") SearchEngine.Items( @@ -129,7 +130,8 @@ constructor( albums = if (filter == MusicType.ALBUMS) library.albums else null, artists = if (filter == MusicType.ARTISTS) library.artists else null, genres = if (filter == MusicType.GENRES) library.genres else null, - playlists = if (filter == MusicType.PLAYLISTS) library.playlists else null) + playlists = if (filter == MusicType.PLAYLISTS) library.playlists else null, + ) } val results = searchEngine.search(items, query) diff --git a/app/src/main/java/org/oxycblt/auxio/settings/BasePreferenceFragment.kt b/app/src/main/java/org/oxycblt/auxio/settings/BasePreferenceFragment.kt index b8cd75c7f..708ff595a 100644 --- a/app/src/main/java/org/oxycblt/auxio/settings/BasePreferenceFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/settings/BasePreferenceFragment.kt @@ -88,7 +88,7 @@ abstract class BasePreferenceFragment(@XmlRes private val screen: Int) : override fun onCreateRecyclerView( inflater: LayoutInflater, parent: ViewGroup, - savedInstanceState: Bundle? + savedInstanceState: Bundle?, ) = super.onCreateRecyclerView(inflater, parent, savedInstanceState).apply { clipToPadding = false diff --git a/app/src/main/java/org/oxycblt/auxio/settings/Settings.kt b/app/src/main/java/org/oxycblt/auxio/settings/Settings.kt index 2128d6db4..a8916f1ba 100644 --- a/app/src/main/java/org/oxycblt/auxio/settings/Settings.kt +++ b/app/src/main/java/org/oxycblt/auxio/settings/Settings.kt @@ -93,7 +93,7 @@ interface Settings { final override fun onSharedPreferenceChanged( sharedPreferences: SharedPreferences, - key: String? + key: String?, ) { // FIXME: Settings initialization firing the listener. L.d("Dispatching settings change $key") diff --git a/app/src/main/java/org/oxycblt/auxio/settings/ui/IntListPreference.kt b/app/src/main/java/org/oxycblt/auxio/settings/ui/IntListPreference.kt index bffb5f746..8dbd67b40 100644 --- a/app/src/main/java/org/oxycblt/auxio/settings/ui/IntListPreference.kt +++ b/app/src/main/java/org/oxycblt/auxio/settings/ui/IntListPreference.kt @@ -46,7 +46,7 @@ constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = androidx.preference.R.attr.dialogPreferenceStyle, - defStyleRes: Int = 0 + defStyleRes: Int = 0, ) : DialogPreference(context, attrs, defStyleAttr, defStyleRes) { /** The names of each entry. */ val entries: Array @@ -60,14 +60,19 @@ constructor( init { val prefAttrs = context.obtainStyledAttributes( - attrs, R.styleable.IntListPreference, defStyleAttr, defStyleRes) + attrs, + R.styleable.IntListPreference, + defStyleAttr, + defStyleRes, + ) // Can't depend on ListPreference due to it working with strings we have to instead // define our own attributes for entries/values. entries = prefAttrs.getTextArrayOrThrow(R.styleable.IntListPreference_entries) values = context.resources.getIntArray( - prefAttrs.getResourceIdOrThrow(R.styleable.IntListPreference_entryValues)) + prefAttrs.getResourceIdOrThrow(R.styleable.IntListPreference_entryValues) + ) // entryIcons defines an additional set of icons to use for each entry. val iconsId = prefAttrs.getResourceId(R.styleable.IntListPreference_entryIcons, -1) diff --git a/app/src/main/java/org/oxycblt/auxio/settings/ui/PreferenceHeaderItemDecoration.kt b/app/src/main/java/org/oxycblt/auxio/settings/ui/PreferenceHeaderItemDecoration.kt index c959d0b3e..514a03317 100644 --- a/app/src/main/java/org/oxycblt/auxio/settings/ui/PreferenceHeaderItemDecoration.kt +++ b/app/src/main/java/org/oxycblt/auxio/settings/ui/PreferenceHeaderItemDecoration.kt @@ -40,7 +40,7 @@ constructor( context: Context, attributeSet: AttributeSet? = null, defStyleAttr: Int = R.attr.materialDividerStyle, - orientation: Int = LinearLayoutManager.VERTICAL + orientation: Int = LinearLayoutManager.VERTICAL, ) : MaterialDividerItemDecoration(context, attributeSet, defStyleAttr, orientation) { @SuppressLint("RestrictedApi") override fun shouldDrawDivider(position: Int, adapter: RecyclerView.Adapter<*>?) = diff --git a/app/src/main/java/org/oxycblt/auxio/settings/ui/WrappedDialogPreference.kt b/app/src/main/java/org/oxycblt/auxio/settings/ui/WrappedDialogPreference.kt index f73e10245..76e52e966 100644 --- a/app/src/main/java/org/oxycblt/auxio/settings/ui/WrappedDialogPreference.kt +++ b/app/src/main/java/org/oxycblt/auxio/settings/ui/WrappedDialogPreference.kt @@ -34,5 +34,5 @@ constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = androidx.preference.R.attr.dialogPreferenceStyle, - defStyleRes: Int = 0 + defStyleRes: Int = 0, ) : DialogPreference(context, attrs, defStyleAttr, defStyleRes) diff --git a/app/src/main/java/org/oxycblt/auxio/tasker/Start.kt b/app/src/main/java/org/oxycblt/auxio/tasker/Start.kt index 7372bde56..9fb714520 100644 --- a/app/src/main/java/org/oxycblt/auxio/tasker/Start.kt +++ b/app/src/main/java/org/oxycblt/auxio/tasker/Start.kt @@ -62,7 +62,8 @@ class StartActionRunner : TaskerPluginRunnerActionNoOutputOrInput() { context, Intent(context, AuxioService::class.java) .setAction(AuxioService.ACTION_START) - .putExtra(AuxioService.INTENT_KEY_START_ID, IntegerTable.START_ID_TASKER)) + .putExtra(AuxioService.INTENT_KEY_START_ID, IntegerTable.START_ID_TASKER), + ) while (!AuxioService.isForeground) { Thread.sleep(100) } diff --git a/app/src/main/java/org/oxycblt/auxio/ui/Animations.kt b/app/src/main/java/org/oxycblt/auxio/ui/Animations.kt index 986893cc3..c507df698 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/Animations.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/Animations.kt @@ -37,7 +37,7 @@ class AnimConfig( context: Context, @AttrRes interpolatorRes: Int, @AttrRes durationRes: Int, - defaultDuration: Int + defaultDuration: Int, ) { val interpolator: TimeInterpolator = MotionUtils.resolveThemeInterpolator(context, interpolatorRes, FastOutSlowInInterpolator()) @@ -56,6 +56,7 @@ class AnimConfig( val MEDIUM1 = MR.attr.motionDurationMedium1 to 250 val MEDIUM2 = MR.attr.motionDurationMedium2 to 300 val MEDIUM3 = MR.attr.motionDurationMedium3 to 350 + // val MEDIUM4 = MR.attr.motionDurationMedium4 to 400 // val LONG1 = MR.attr.motionDurationLong1 to 450 // val LONG2 = MR.attr.motionDurationLong2 to 500 @@ -74,7 +75,7 @@ class AnimConfig( from: Float, to: Float, delayMs: Long = 0, - crossinline update: (Float) -> Unit + crossinline update: (Float) -> Unit, ): ValueAnimator = ValueAnimator.ofFloat(from, to).apply { startDelay = delayMs @@ -106,7 +107,7 @@ private constructor( scaleOutDuration: Pair, inInterpolator: Int, alphaInDuration: Pair, - scaleInDuration: Pair + scaleInDuration: Pair, ) { private val alphaOutConfig = AnimConfig.of(context, outInterpolator, alphaOutDuration) private val scaleOutConfig = AnimConfig.of(context, outInterpolator, scaleOutDuration) @@ -172,7 +173,8 @@ private constructor( AnimConfig.SHORT3, AnimConfig.EMPHASIZED_DECELERATE, AnimConfig.SHORT1, - AnimConfig.MEDIUM3) + AnimConfig.MEDIUM3, + ) fun symmetric(context: Context) = MaterialFader( @@ -183,7 +185,8 @@ private constructor( AnimConfig.MEDIUM1, AnimConfig.EMPHASIZED_DECELERATE, AnimConfig.SHORT3, - AnimConfig.MEDIUM1) + AnimConfig.MEDIUM1, + ) } } @@ -206,7 +209,7 @@ private constructor( context: Context, private val x: Int?, inDuration: Pair, - outDuration: Pair + outDuration: Pair, ) { private val outConfig = AnimConfig.of(context, AnimConfig.EMPHASIZED_ACCELERATE, outDuration) private val inConfig = AnimConfig.of(context, AnimConfig.EMPHASIZED_DECELERATE, inDuration) diff --git a/app/src/main/java/org/oxycblt/auxio/ui/BottomSheetContentBehavior.kt b/app/src/main/java/org/oxycblt/auxio/ui/BottomSheetContentBehavior.kt index 96d494a47..aed8ea316 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/BottomSheetContentBehavior.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/BottomSheetContentBehavior.kt @@ -56,7 +56,7 @@ class BottomSheetContentBehavior(context: Context, attributeSet: Attri override fun onDependentViewChanged( parent: CoordinatorLayout, child: V, - dependency: View + dependency: View, ): Boolean { val behavior = dependency.coordinatorLayoutBehavior as BackportBottomSheetBehavior val consumed = behavior.calculateConsumedByBar() @@ -83,7 +83,7 @@ class BottomSheetContentBehavior(context: Context, attributeSet: Attri parentWidthMeasureSpec: Int, widthUsed: Int, parentHeightMeasureSpec: Int, - heightUsed: Int + heightUsed: Int, ): Boolean { measureContent(parent, child) return true @@ -106,7 +106,11 @@ class BottomSheetContentBehavior(context: Context, attributeSet: Attri val bars = insets.systemBarInsetsCompat insets.replaceSystemBarInsetsCompat( - bars.left, bars.top, bars.right, consumed.coerceAtLeast(bars.bottom)) + bars.left, + bars.top, + bars.right, + consumed.coerceAtLeast(bars.bottom), + ) } setup = true diff --git a/app/src/main/java/org/oxycblt/auxio/ui/CoordinatorAppBarLayout.kt b/app/src/main/java/org/oxycblt/auxio/ui/CoordinatorAppBarLayout.kt index 82d5fbbad..d5c1e03b5 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/CoordinatorAppBarLayout.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/CoordinatorAppBarLayout.kt @@ -58,7 +58,14 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr if (child != null) { val coordinator = parent as CoordinatorLayout coordinatorLayoutBehavior?.onNestedPreScroll( - coordinator, this, coordinator, 0, 0, tConsumed, 0) + coordinator, + this, + coordinator, + 0, + 0, + tConsumed, + 0, + ) } true @@ -124,8 +131,10 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr private var currentVerticalOffset: Int? = null override fun onOffsetChanged(appBarLayout: AppBarLayout, verticalOffset: Int) { - if (verticalOffset == 0 || - AnimationUtils.currentAnimationTimeMillis() > offsetAnimationMaxEndTime) { + if ( + verticalOffset == 0 || + AnimationUtils.currentAnimationTimeMillis() > offsetAnimationMaxEndTime + ) { // AppBarLayout crashes with IndexOutOfBoundsException when a non-last listener // removes itself, so we have to do the removal asynchronously. appBarLayout.postOnAnimation { appBarLayout.removeOnOffsetChangedListener(this) } diff --git a/app/src/main/java/org/oxycblt/auxio/ui/DialogAwareNavigationListener.kt b/app/src/main/java/org/oxycblt/auxio/ui/DialogAwareNavigationListener.kt index 58fe95c14..76163f559 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/DialogAwareNavigationListener.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/DialogAwareNavigationListener.kt @@ -61,7 +61,7 @@ class DialogAwareNavigationListener(private val callback: () -> Unit) : override fun onDestinationChanged( controller: NavController, destination: NavDestination, - arguments: Bundle? + arguments: Bundle?, ) { // Drop the initial call by NavController that simply provides us with the current // destination. This would cause the selection state to be lost every time the device diff --git a/app/src/main/java/org/oxycblt/auxio/ui/RippleFixMaterialButton.kt b/app/src/main/java/org/oxycblt/auxio/ui/RippleFixMaterialButton.kt index 2586745ae..32a0ad49f 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/RippleFixMaterialButton.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/RippleFixMaterialButton.kt @@ -36,7 +36,7 @@ open class RippleFixMaterialButton constructor( context: Context, attrs: AttributeSet? = null, - @AttrRes defStyleAttr: Int = R.attr.materialButtonStyle + @AttrRes defStyleAttr: Int = R.attr.materialButtonStyle, ) : MaterialButton(context, attrs, defStyleAttr) { init { fixDoubleRipple() diff --git a/app/src/main/java/org/oxycblt/auxio/ui/UISettings.kt b/app/src/main/java/org/oxycblt/auxio/ui/UISettings.kt index 7a490347b..9d5d4c40f 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/UISettings.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/UISettings.kt @@ -55,7 +55,9 @@ class UISettingsImpl @Inject constructor(@ApplicationContext context: Context) : override val theme: Int get() = sharedPreferences.getInt( - getString(R.string.set_key_theme), AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM) + getString(R.string.set_key_theme), + AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM, + ) override val useBlackTheme: Boolean get() = sharedPreferences.getBoolean(getString(R.string.set_key_black_theme), false) @@ -63,7 +65,8 @@ class UISettingsImpl @Inject constructor(@ApplicationContext context: Context) : override var accent: Accent get() = Accent.from( - sharedPreferences.getInt(getString(R.string.set_key_accent), Accent.DEFAULT)) + sharedPreferences.getInt(getString(R.string.set_key_accent), Accent.DEFAULT) + ) set(value) { sharedPreferences.edit { putInt(getString(R.string.set_key_accent), value.index) diff --git a/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingBottomSheetDialogFragment.kt b/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingBottomSheetDialogFragment.kt index 53e3af574..453e866dc 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingBottomSheetDialogFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingBottomSheetDialogFragment.kt @@ -94,7 +94,7 @@ abstract class ViewBindingBottomSheetDialogFragment : final override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, - savedInstanceState: Bundle? + savedInstanceState: Bundle?, ) = onCreateBinding(inflater).also { _binding = it }.root final override fun onViewCreated(view: View, savedInstanceState: Bundle?) { @@ -129,7 +129,8 @@ abstract class ViewBindingBottomSheetDialogFragment : avoidUnusableCollapsedState = metrics.heightPixels - metrics.widthPixels < context.getDimenPixels( - com.google.android.material.R.dimen.design_bottom_sheet_peek_height_min) + com.google.android.material.R.dimen.design_bottom_sheet_peek_height_min + ) behavior.skipCollapsed = avoidUnusableCollapsedState } diff --git a/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingFragment.kt b/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingFragment.kt index 38967d653..3118f69af 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingFragment.kt @@ -80,7 +80,7 @@ abstract class ViewBindingFragment : Fragment() { final override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, - savedInstanceState: Bundle? + savedInstanceState: Bundle?, ) = onCreateBinding(inflater).also { _binding = it }.root final override fun onViewCreated(view: View, savedInstanceState: Bundle?) { diff --git a/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingMaterialDialogFragment.kt b/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingMaterialDialogFragment.kt index 20bb9679a..2802bc858 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingMaterialDialogFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/ViewBindingMaterialDialogFragment.kt @@ -93,7 +93,7 @@ abstract class ViewBindingMaterialDialogFragment : DialogFragm final override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, - savedInstanceState: Bundle? + savedInstanceState: Bundle?, ) = onCreateBinding(inflater).also { _binding = it }.root final override fun onCreateDialog(savedInstanceState: Bundle?) = diff --git a/app/src/main/java/org/oxycblt/auxio/ui/accent/Accent.kt b/app/src/main/java/org/oxycblt/auxio/ui/accent/Accent.kt index 217206d98..2ca399a2a 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/accent/Accent.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/accent/Accent.kt @@ -40,7 +40,8 @@ private val accentNames = R.string.clr_orange, R.string.clr_brown, R.string.clr_grey, - R.string.clr_dynamic) + R.string.clr_dynamic, + ) private val accentThemes = intArrayOf( @@ -60,8 +61,8 @@ private val accentThemes = R.style.Theme_Auxio_Orange, R.style.Theme_Auxio_Brown, R.style.Theme_Auxio_Grey, - R.style.Theme_Auxio_App // Dynamic colors are on the base theme - ) + R.style.Theme_Auxio_App, // Dynamic colors are on the base theme + ) private val accentBlackThemes = intArrayOf( @@ -81,8 +82,8 @@ private val accentBlackThemes = R.style.Theme_Auxio_Orange_Black, R.style.Theme_Auxio_Brown_Black, R.style.Theme_Auxio_Grey_Black, - R.style.Theme_Auxio_Black // Dynamic colors are on the base theme - ) + R.style.Theme_Auxio_Black, // Dynamic colors are on the base theme + ) private val accentPrimaryColors = intArrayOf( @@ -102,7 +103,8 @@ private val accentPrimaryColors = R.color.orange_primary, R.color.brown_primary, R.color.grey_primary, - R.color.dynamic_primary) + R.color.dynamic_primary, + ) /** * The data object for a colored theme to use in the UI. This can be nominally used to gleam some @@ -116,14 +118,17 @@ class Accent private constructor(val index: Int) { /** The name of this [Accent]. */ val name: Int get() = accentNames[index] + /** The theme resource for this accent. */ val theme: Int get() = accentThemes[index] + /** * The black theme resource for this accent. Identical to [theme], but with a black background. */ val blackTheme: Int get() = accentBlackThemes[index] + /** The accent's primary color. */ val primary: Int get() = accentPrimaryColors[index] diff --git a/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentAdapter.kt b/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentAdapter.kt index 41138d718..14cc1fef6 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentAdapter.kt @@ -53,7 +53,7 @@ class AccentAdapter(private val listener: ClickableListListener) : override fun onBindViewHolder( holder: AccentViewHolder, position: Int, - payloads: MutableList + payloads: MutableList, ) { val item = Accent.from(position) if (payloads.isEmpty()) { diff --git a/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentCustomizeDialog.kt b/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentCustomizeDialog.kt index d0093a88f..8a3125a41 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentCustomizeDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentCustomizeDialog.kt @@ -71,7 +71,8 @@ class AccentCustomizeDialog : Accent.from(savedInstanceState.getInt(KEY_PENDING_ACCENT)) } else { uiSettings.accent - }) + } + ) } override fun onSaveInstanceState(outState: Bundle) { diff --git a/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentGridLayoutManager.kt b/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentGridLayoutManager.kt index aae66a179..c8a39643e 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentGridLayoutManager.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/accent/AccentGridLayoutManager.kt @@ -35,7 +35,7 @@ class AccentGridLayoutManager( context: Context, attrs: AttributeSet, defStyleAttr: Int, - defStyleRes: Int + defStyleRes: Int, ) : GridLayoutManager(context, attrs, defStyleAttr, defStyleRes) { // We use 56dp here since that's the rough size of the accent item. // This will need to be modified if this is used beyond the accent dialog. diff --git a/app/src/main/java/org/oxycblt/auxio/util/ContextUtil.kt b/app/src/main/java/org/oxycblt/auxio/util/ContextUtil.kt index d2321ab5c..ed03ccb94 100644 --- a/app/src/main/java/org/oxycblt/auxio/util/ContextUtil.kt +++ b/app/src/main/java/org/oxycblt/auxio/util/ContextUtil.kt @@ -183,7 +183,8 @@ fun Context.newMainPendingIntent(): PendingIntent = this, IntegerTable.REQUEST_CODE, Intent(this, MainActivity::class.java).setAction(Intent.ACTION_MAIN), - PendingIntent.FLAG_IMMUTABLE) + PendingIntent.FLAG_IMMUTABLE, + ) /** * Create a [PendingIntent] that will broadcast the specified command when launched. @@ -195,4 +196,5 @@ fun Context.newBroadcastPendingIntent(action: String): PendingIntent = this, IntegerTable.REQUEST_CODE, Intent(action).setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY), - PendingIntent.FLAG_IMMUTABLE) + PendingIntent.FLAG_IMMUTABLE, + ) diff --git a/app/src/main/java/org/oxycblt/auxio/util/CopyleftNoticeTree.kt b/app/src/main/java/org/oxycblt/auxio/util/CopyleftNoticeTree.kt index 09cfd8415..88a50ae89 100644 --- a/app/src/main/java/org/oxycblt/auxio/util/CopyleftNoticeTree.kt +++ b/app/src/main/java/org/oxycblt/auxio/util/CopyleftNoticeTree.kt @@ -37,6 +37,7 @@ class CopyleftNoticeTree : Timber.DebugTree() { tag, "Hey! Auxio is an open-source project licensed under the GPLv3 license!" + "You can fork this project and even add ads, but it still needs to be kept open-source with the same license!", - t) + t, + ) } } diff --git a/app/src/main/java/org/oxycblt/auxio/util/FrameworkUtil.kt b/app/src/main/java/org/oxycblt/auxio/util/FrameworkUtil.kt index 2322a196e..d3bae0826 100644 --- a/app/src/main/java/org/oxycblt/auxio/util/FrameworkUtil.kt +++ b/app/src/main/java/org/oxycblt/auxio/util/FrameworkUtil.kt @@ -76,7 +76,7 @@ private fun isUnderImpl( viewStart: Int, viewEnd: Int, parentEnd: Int, - minTouchTargetSize: Int + minTouchTargetSize: Int, ): Boolean { val viewSize = viewEnd - viewStart if (viewSize >= minTouchTargetSize) { @@ -212,7 +212,8 @@ val WindowInsets.systemGestureInsetsCompat: Insets // API 30+, use window inset map. Insets.max( getCompatInsets(WindowInsets.Type.systemGestures()), - getCompatInsets(WindowInsets.Type.systemBars())) + getCompatInsets(WindowInsets.Type.systemBars()), + ) } Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q -> { // API 29, use window inset fields. @@ -245,7 +246,8 @@ private fun WindowInsets.getSystemWindowCompatInsets() = systemWindowInsetLeft, systemWindowInsetTop, systemWindowInsetRight, - systemWindowInsetBottom) + systemWindowInsetBottom, + ) /** * Returns "System Bar" [Insets] based on the API 29 [WindowInsets] convention. @@ -270,7 +272,7 @@ fun WindowInsets.replaceSystemBarInsetsCompat( left: Int, top: Int, right: Int, - bottom: Int + bottom: Int, ): WindowInsets { return when { Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -> { @@ -278,7 +280,8 @@ fun WindowInsets.replaceSystemBarInsetsCompat( WindowInsets.Builder(this) .setInsets( WindowInsets.Type.systemBars(), - Insets.of(left, top, right, bottom).toPlatformInsets()) + Insets.of(left, top, right, bottom).toPlatformInsets(), + ) .build() } else -> { diff --git a/app/src/main/java/org/oxycblt/auxio/util/StateUtil.kt b/app/src/main/java/org/oxycblt/auxio/util/StateUtil.kt index eb74d8f15..10f1d216d 100644 --- a/app/src/main/java/org/oxycblt/auxio/util/StateUtil.kt +++ b/app/src/main/java/org/oxycblt/auxio/util/StateUtil.kt @@ -36,6 +36,7 @@ import kotlinx.coroutines.launch interface Event { /** The inner [StateFlow] contained by the [Event]. */ val flow: StateFlow + /** * Consume whatever value is currently contained by this instance. * @@ -101,7 +102,7 @@ fun Fragment.collectImmediately(stateFlow: StateFlow, block: (T) -> Unit) fun Fragment.collectImmediately( a: StateFlow, b: StateFlow, - block: (T1, T2) -> Unit + block: (T1, T2) -> Unit, ) { block(a.value, b.value) // We can combine flows, but only if we transform them into one flow output. @@ -124,7 +125,7 @@ fun Fragment.collectImmediately( a: StateFlow, b: StateFlow, c: StateFlow, - block: (T1, T2, T3) -> Unit + block: (T1, T2, T3) -> Unit, ) { block(a.value, b.value, c.value) val combine = combine(a, b, c) { a1, b2, c3 -> Triple(a1, b2, c3) } @@ -142,7 +143,7 @@ fun Fragment.collectImmediately( */ private fun Fragment.launch( state: Lifecycle.State = Lifecycle.State.STARTED, - block: suspend CoroutineScope.() -> Unit + block: suspend CoroutineScope.() -> Unit, ) { viewLifecycleOwner.lifecycleScope.launch { viewLifecycleOwner.repeatOnLifecycle(state, block) } } diff --git a/app/src/main/java/org/oxycblt/auxio/widgets/WidgetComponent.kt b/app/src/main/java/org/oxycblt/auxio/widgets/WidgetComponent.kt index 5977dff5c..013f3b01a 100644 --- a/app/src/main/java/org/oxycblt/auxio/widgets/WidgetComponent.kt +++ b/app/src/main/java/org/oxycblt/auxio/widgets/WidgetComponent.kt @@ -52,7 +52,7 @@ private constructor( private val imageSettings: ImageSettings, private val bitmapProvider: BitmapProvider, private val playbackManager: PlaybackStateManager, - private val uiSettings: UISettings + private val uiSettings: UISettings, ) : PlaybackStateManager.Listener, UISettings.Listener, ImageSettings.Listener { class Factory @Inject @@ -60,7 +60,7 @@ private constructor( private val imageSettings: ImageSettings, private val bitmapProvider: BitmapProvider, private val playbackManager: PlaybackStateManager, - private val uiSettings: UISettings + private val uiSettings: UISettings, ) { fun create(context: Context) = WidgetComponent(context, imageSettings, bitmapProvider, playbackManager, uiSettings) @@ -128,7 +128,8 @@ private constructor( L.d("Bitmap loaded, uploading state $state") widgetProvider.update(context, uiSettings, state) } - }) + }, + ) } /** Release this instance, preventing any further events from updating the widget instances. */ @@ -157,7 +158,7 @@ private constructor( parent: MusicParent?, queue: List, index: Int, - isShuffled: Boolean + isShuffled: Boolean, ) = update() override fun onProgressionChanged(progression: Progression) = update() @@ -184,6 +185,6 @@ private constructor( val cover: Bitmap?, val isPlaying: Boolean, val repeatMode: RepeatMode, - val isShuffled: Boolean + val isShuffled: Boolean, ) } diff --git a/app/src/main/java/org/oxycblt/auxio/widgets/WidgetProvider.kt b/app/src/main/java/org/oxycblt/auxio/widgets/WidgetProvider.kt index 54976c042..14d398116 100644 --- a/app/src/main/java/org/oxycblt/auxio/widgets/WidgetProvider.kt +++ b/app/src/main/java/org/oxycblt/auxio/widgets/WidgetProvider.kt @@ -49,7 +49,7 @@ class WidgetProvider : AppWidgetProvider() { override fun onUpdate( context: Context, appWidgetManager: AppWidgetManager, - appWidgetIds: IntArray + appWidgetIds: IntArray, ) { requestUpdate(context) // Revert to the default layout for now until we get a response from WidgetComponent. @@ -61,7 +61,7 @@ class WidgetProvider : AppWidgetProvider() { context: Context, appWidgetManager: AppWidgetManager, appWidgetId: Int, - newOptions: Bundle? + newOptions: Bundle?, ) { super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions) // Another adaptive layout backport for API 21+: We are unable to immediately update @@ -102,7 +102,8 @@ class WidgetProvider : AppWidgetProvider() { SizeF(180f, 152f) to defaultLayout, SizeF(304f, 152f) to newWideDockedLayout(context, uiSettings, state), SizeF(180f, 272f) to newThinPaneLayout(context, uiSettings, state), - SizeF(304f, 272f) to newWidePaneLayout(context, uiSettings, state)) + SizeF(304f, 272f) to newWidePaneLayout(context, uiSettings, state), + ) // This is the order in which we will disable cover art layouts if they exceed the // maximum bitmap memory usage. (See the comment in the loop below for more info.) @@ -125,8 +126,11 @@ class WidgetProvider : AppWidgetProvider() { return } catch (e: IllegalArgumentException) { val msg = e.message ?: return - if (!msg.startsWith( - "RemoteViews for widget update exceeds maximum bitmap memory usage")) { + if ( + !msg.startsWith( + "RemoteViews for widget update exceeds maximum bitmap memory usage" + ) + ) { throw e } // Some android devices on Android 12-14 suffer from a bug where the maximum bitmap @@ -191,12 +195,10 @@ class WidgetProvider : AppWidgetProvider() { private fun newThinWaferLayout( context: Context, uiSettings: UISettings, - state: WidgetComponent.PlaybackState + state: WidgetComponent.PlaybackState, ) = newRemoteViews(context, R.layout.widget_wafer_thin) - .setupBackground( - uiSettings, - ) + .setupBackground(uiSettings) .setupCover(context, state.takeIf { canDisplayWaferCover(uiSettings) }) .setupFillingCover(uiSettings) .setupTimelineControls(context, state) @@ -204,12 +206,10 @@ class WidgetProvider : AppWidgetProvider() { private fun newWideWaferLayout( context: Context, uiSettings: UISettings, - state: WidgetComponent.PlaybackState + state: WidgetComponent.PlaybackState, ) = newRemoteViews(context, R.layout.widget_wafer_wide) - .setupBackground( - uiSettings, - ) + .setupBackground(uiSettings) .setupCover(context, state.takeIf { canDisplayWaferCover(uiSettings) }) .setupFillingCover(uiSettings) .setupFullControls(context, state) @@ -217,48 +217,40 @@ class WidgetProvider : AppWidgetProvider() { private fun newThinDockedLayout( context: Context, uiSettings: UISettings, - state: WidgetComponent.PlaybackState + state: WidgetComponent.PlaybackState, ) = newRemoteViews(context, R.layout.widget_docked_thin) - .setupBar( - uiSettings, - ) + .setupBar(uiSettings) .setupCover(context, state) .setupTimelineControls(context, state) private fun newWideDockedLayout( context: Context, uiSettings: UISettings, - state: WidgetComponent.PlaybackState + state: WidgetComponent.PlaybackState, ) = newRemoteViews(context, R.layout.widget_docked_wide) - .setupBar( - uiSettings, - ) + .setupBar(uiSettings) .setupCover(context, state) .setupFullControls(context, state) private fun newThinPaneLayout( context: Context, uiSettings: UISettings, - state: WidgetComponent.PlaybackState + state: WidgetComponent.PlaybackState, ) = newRemoteViews(context, R.layout.widget_pane_thin) - .setupBackground( - uiSettings, - ) + .setupBackground(uiSettings) .setupPlaybackState(context, state) .setupTimelineControls(context, state) private fun newWidePaneLayout( context: Context, uiSettings: UISettings, - state: WidgetComponent.PlaybackState + state: WidgetComponent.PlaybackState, ) = newRemoteViews(context, R.layout.widget_pane_wide) - .setupBackground( - uiSettings, - ) + .setupBackground(uiSettings) .setupPlaybackState(context, state) .setupFullControls(context, state) @@ -266,9 +258,7 @@ class WidgetProvider : AppWidgetProvider() { * Set up the control bar in a [RemoteViews] layout that contains one. This is a kind of * "floating" drawable that sits in front of the cover and contains the controls. */ - private fun RemoteViews.setupBar( - uiSettings: UISettings, - ): RemoteViews { + private fun RemoteViews.setupBar(uiSettings: UISettings): RemoteViews { // Below API 31, enable a rounded bar only if round mode is enabled. // On API 31+, the bar should always be round in order to fit in with other widgets. val background = @@ -285,9 +275,7 @@ class WidgetProvider : AppWidgetProvider() { * Set up the background in a [RemoteViews] layout that contains one. This is largely * self-explanatory, being a solid-color background that sits behind the cover and controls. */ - private fun RemoteViews.setupBackground( - uiSettings: UISettings, - ): RemoteViews { + private fun RemoteViews.setupBackground(uiSettings: UISettings): RemoteViews { // Below API 31, enable a rounded background only if round mode is enabled. // On API 31+, the background should always be round in order to fit in with other // widgets. @@ -309,7 +297,7 @@ class WidgetProvider : AppWidgetProvider() { */ private fun RemoteViews.setupCover( context: Context, - state: WidgetComponent.PlaybackState? + state: WidgetComponent.PlaybackState?, ): RemoteViews { if (state == null) { setImageViewBitmap(R.id.widget_cover, null) @@ -321,8 +309,8 @@ class WidgetProvider : AppWidgetProvider() { setImageViewBitmap(R.id.widget_cover, state.cover) setContentDescription( R.id.widget_cover, - context.getString( - R.string.desc_album_cover, state.song.album.name.resolve(context))) + context.getString(R.string.desc_album_cover, state.song.album.name.resolve(context)), + ) } else { discardCover(context) } @@ -358,7 +346,7 @@ class WidgetProvider : AppWidgetProvider() { */ private fun RemoteViews.setupPlaybackState( context: Context, - state: WidgetComponent.PlaybackState + state: WidgetComponent.PlaybackState, ): RemoteViews { setupCover(context, state) setTextViewText(R.id.widget_song, state.song.name.resolve(context)) @@ -374,13 +362,14 @@ class WidgetProvider : AppWidgetProvider() { */ private fun RemoteViews.setupBasicControls( context: Context, - state: WidgetComponent.PlaybackState + state: WidgetComponent.PlaybackState, ): RemoteViews { // Hook the play/pause button to the play/pause broadcast that will be recognized // by PlaybackService. setOnClickPendingIntent( R.id.widget_play_pause, - context.newBroadcastPendingIntent(PlaybackActions.ACTION_PLAY_PAUSE)) + context.newBroadcastPendingIntent(PlaybackActions.ACTION_PLAY_PAUSE), + ) // Set up the play/pause button appearance. Like the Android 13 media controls, use // a circular FAB when paused, and a squircle FAB when playing. This does require us @@ -411,7 +400,7 @@ class WidgetProvider : AppWidgetProvider() { */ private fun RemoteViews.setupTimelineControls( context: Context, - state: WidgetComponent.PlaybackState + state: WidgetComponent.PlaybackState, ): RemoteViews { // Timeline controls contain the basic controls, set those up setupBasicControls(context, state) @@ -421,10 +410,12 @@ class WidgetProvider : AppWidgetProvider() { // by PlaybackService. setOnClickPendingIntent( R.id.widget_skip_prev, - context.newBroadcastPendingIntent(PlaybackActions.ACTION_SKIP_PREV)) + context.newBroadcastPendingIntent(PlaybackActions.ACTION_SKIP_PREV), + ) setOnClickPendingIntent( R.id.widget_skip_next, - context.newBroadcastPendingIntent(PlaybackActions.ACTION_SKIP_NEXT)) + context.newBroadcastPendingIntent(PlaybackActions.ACTION_SKIP_NEXT), + ) return this } @@ -437,7 +428,7 @@ class WidgetProvider : AppWidgetProvider() { */ private fun RemoteViews.setupFullControls( context: Context, - state: WidgetComponent.PlaybackState + state: WidgetComponent.PlaybackState, ): RemoteViews { // Full controls contain timeline controls, make are set those. setupTimelineControls(context, state) @@ -446,10 +437,12 @@ class WidgetProvider : AppWidgetProvider() { // be recognized by PlaybackService. setOnClickPendingIntent( R.id.widget_repeat, - context.newBroadcastPendingIntent(PlaybackActions.ACTION_INC_REPEAT_MODE)) + context.newBroadcastPendingIntent(PlaybackActions.ACTION_INC_REPEAT_MODE), + ) setOnClickPendingIntent( R.id.widget_shuffle, - context.newBroadcastPendingIntent(PlaybackActions.ACTION_INVERT_SHUFFLE)) + context.newBroadcastPendingIntent(PlaybackActions.ACTION_INVERT_SHUFFLE), + ) // Set up the repeat/shuffle buttons. When working with RemoteViews, we will // need to hard-code different accent tinting configurations, as stateful drawables diff --git a/app/src/main/java/org/oxycblt/auxio/widgets/WidgetUtil.kt b/app/src/main/java/org/oxycblt/auxio/widgets/WidgetUtil.kt index a5e32881b..ace8e4dd5 100644 --- a/app/src/main/java/org/oxycblt/auxio/widgets/WidgetUtil.kt +++ b/app/src/main/java/org/oxycblt/auxio/widgets/WidgetUtil.kt @@ -77,7 +77,7 @@ fun RemoteViews.setLayoutDirection(@IdRes viewId: Int, layoutDirection: Int) { fun AppWidgetManager.updateAppWidgetCompat( context: Context, component: ComponentName, - views: Map + views: Map, ) { check(views.isNotEmpty()) { "Must provide a non-empty map" } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { diff --git a/app/src/main/res/layout/player_swipe_indicator_overlay.xml b/app/src/main/res/layout/player_swipe_indicator_overlay.xml new file mode 100644 index 000000000..32892ac9a --- /dev/null +++ b/app/src/main/res/layout/player_swipe_indicator_overlay.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/player_swipe_indicator_view.xml b/app/src/main/res/layout/player_swipe_indicator_view.xml new file mode 100644 index 000000000..47e01cb53 --- /dev/null +++ b/app/src/main/res/layout/player_swipe_indicator_view.xml @@ -0,0 +1,44 @@ + + + + + + + + + diff --git a/build.gradle b/build.gradle index cb1651cea..8ebeb56bb 100644 --- a/build.gradle +++ b/build.gradle @@ -38,7 +38,7 @@ plugins { spotless { kotlin { target "*/src/**/*.kt" - ktfmt().dropboxStyle() + ktfmt().kotlinlangStyle() licenseHeaderFile("NOTICE") } diff --git a/musikr/src/main/cpp/taglib b/musikr/src/main/cpp/taglib index e831f0929..9c042984d 160000 --- a/musikr/src/main/cpp/taglib +++ b/musikr/src/main/cpp/taglib @@ -1 +1 @@ -Subproject commit e831f0929f25bc581d2106d1f2810f5d8100376e +Subproject commit 9c042984d26af605a6fd1dac7f12bda05219fee7 diff --git a/musikr/src/main/java/org/oxycblt/musikr/Music.kt b/musikr/src/main/java/org/oxycblt/musikr/Music.kt index 507103898..594df1dfd 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/Music.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/Music.kt @@ -78,7 +78,7 @@ sealed interface Music { private constructor( private val format: Format, private val item: Item, - private val uuid: UUID + private val uuid: UUID, ) : Parcelable { // Cache the hashCode for HashMap efficiency. @IgnoredOnParcel private var hashCode = format.hashCode() @@ -103,7 +103,7 @@ sealed interface Music { ALBUM(0xA10A), ARTIST(0xA109), GENRE(0xA108), - PLAYLIST(0xA107) + PLAYLIST(0xA107), } /** @@ -116,7 +116,7 @@ sealed interface Music { AUXIO("org.oxycblt.auxio"), /** @see musicBrainz */ - MUSICBRAINZ("org.musicbrainz") + MUSICBRAINZ("org.musicbrainz"), } object TypeConverters { @@ -177,7 +177,8 @@ sealed interface Music { .or(digest[12].toLong().and(0xFF).shl(24)) .or(digest[13].toLong().and(0xFF).shl(16)) .or(digest[14].toLong().and(0xFF).shl(8)) - .or(digest[15].toLong().and(0xFF))) + .or(digest[15].toLong().and(0xFF)), + ) return UID(Format.AUXIO, item, uuid) } diff --git a/musikr/src/main/java/org/oxycblt/musikr/Musikr.kt b/musikr/src/main/java/org/oxycblt/musikr/Musikr.kt index 80f0be1bd..bd1c7c39b 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/Musikr.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/Musikr.kt @@ -70,7 +70,8 @@ interface Musikr { config, ExploreStep.from(context, config), ExtractStep.from(context, config), - EvaluateStep.new(context, config, config.interpretation)) + EvaluateStep.new(context, config, config.interpretation), + ) } } @@ -110,7 +111,7 @@ private class MusikrImpl( private val config: Config, private val exploreStep: ExploreStep, private val extractStep: ExtractStep, - private val evaluateStep: EvaluateStep + private val evaluateStep: EvaluateStep, ) : Musikr { override suspend fun run(onProgress: suspend (IndexingProgress) -> Unit) = coroutineScope { onProgress(IndexingProgress.Songs(0, 0)) diff --git a/musikr/src/main/java/org/oxycblt/musikr/cache/Cache.kt b/musikr/src/main/java/org/oxycblt/musikr/cache/Cache.kt index 74174e32c..0d4811617 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/cache/Cache.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/cache/Cache.kt @@ -92,7 +92,7 @@ data class CachedSong( * The time the song was added to the cache. Used for date added values. Should not be used for * cleanup since it is unlikely to be monotonic. */ - val addedMs: Long + val addedMs: Long, ) /** A result of a cache lookup. */ diff --git a/musikr/src/main/java/org/oxycblt/musikr/cache/db/CacheDatabase.kt b/musikr/src/main/java/org/oxycblt/musikr/cache/db/CacheDatabase.kt index 7dc285e8b..e71ce4ec9 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/cache/db/CacheDatabase.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/cache/db/CacheDatabase.kt @@ -45,7 +45,10 @@ internal abstract class CacheDatabase : RoomDatabase() { companion object { fun from(context: Context) = Room.databaseBuilder( - context.applicationContext, CacheDatabase::class.java, "music_cache.db") + context.applicationContext, + CacheDatabase::class.java, + "music_cache.db", + ) .fallbackToDestructiveMigration() .build() } diff --git a/musikr/src/main/java/org/oxycblt/musikr/cache/db/DBCache.kt b/musikr/src/main/java/org/oxycblt/musikr/cache/db/DBCache.kt index c1242f645..65b49e6b5 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/cache/db/DBCache.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/cache/db/DBCache.kt @@ -52,7 +52,11 @@ class DBCache private constructor(private val readDao: CacheReadDao) : Cache { CachedSong( file, Properties( - dbSong.mimeType, dbSong.durationMs, dbSong.bitrateKbps, dbSong.sampleRateHz), + dbSong.mimeType, + dbSong.durationMs, + dbSong.bitrateKbps, + dbSong.sampleRateHz, + ), ParsedTags( musicBrainzId = dbSong.musicBrainzId, name = dbSong.name, @@ -74,9 +78,11 @@ class DBCache private constructor(private val readDao: CacheReadDao) : Cache { albumArtistSortNames = dbSong.albumArtistSortNames, genreNames = dbSong.genreNames, replayGainTrackAdjustment = dbSong.replayGainTrackAdjustment, - replayGainAlbumAdjustment = dbSong.replayGainAlbumAdjustment), + replayGainAlbumAdjustment = dbSong.replayGainAlbumAdjustment, + ), coverId = dbSong.coverId, - addedMs = dbSong.addedMs) + addedMs = dbSong.addedMs, + ) return CacheResult.Hit(song) } @@ -136,7 +142,8 @@ private constructor(private val inner: DBCache, private val writeDao: CacheWrite genreNames = cachedSong.tags.genreNames, replayGainTrackAdjustment = cachedSong.tags.replayGainTrackAdjustment, replayGainAlbumAdjustment = cachedSong.tags.replayGainAlbumAdjustment, - coverId = cachedSong.coverId) + coverId = cachedSong.coverId, + ) writeDao.updateSong(dbSong) } diff --git a/musikr/src/main/java/org/oxycblt/musikr/covers/Covers.kt b/musikr/src/main/java/org/oxycblt/musikr/covers/Covers.kt index c148fb3a1..3514241a5 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/covers/Covers.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/covers/Covers.kt @@ -171,6 +171,7 @@ class CoverCollection private constructor(val covers: List) { .entries .sortedByDescending { it.key } .sortedByDescending { it.value.size } - .map { it.value.first() }) + .map { it.value.first() } + ) } } diff --git a/musikr/src/main/java/org/oxycblt/musikr/covers/fs/FSCovers.kt b/musikr/src/main/java/org/oxycblt/musikr/covers/fs/FSCovers.kt index 9d3594632..a095f5d02 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/covers/fs/FSCovers.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/covers/fs/FSCovers.kt @@ -139,22 +139,13 @@ class MutableFSCovers(private val context: Context) : MutableCovers { private companion object { private val preferredCoverNames = listOf("front", "art", "album", "folder", "cover") - private val preferredFormats = - listOf( - "image/webp", - "image/jpg", - "image/jpeg", - "image/png", - ) + private val preferredFormats = listOf("image/webp", "image/jpg", "image/jpeg", "image/png") private val preferredExtensions = listOf("webp", "jpg", "jpeg", "png") } } -private data class FolderCoverImpl( - private val context: Context, - private val uri: Uri, -) : FDCover { +private data class FolderCoverImpl(private val context: Context, private val uri: Uri) : FDCover { override val id = PREFIX + uri.toString() // Implies that client will manage freeing the resources themselves. diff --git a/musikr/src/main/java/org/oxycblt/musikr/covers/stored/StoredCovers.kt b/musikr/src/main/java/org/oxycblt/musikr/covers/stored/StoredCovers.kt index f913cd35c..c23bb8cb4 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/covers/stored/StoredCovers.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/covers/stored/StoredCovers.kt @@ -69,7 +69,7 @@ class StoredCovers(private val coverStorage: CoverStorage) : Covers { class MutableStoredCovers( private val src: MutableCovers, private val coverStorage: CoverStorage, - private val transcoding: Transcoding + private val transcoding: Transcoding, ) : MutableCovers { private val base = StoredCovers(coverStorage) diff --git a/musikr/src/main/java/org/oxycblt/musikr/fs/FS.kt b/musikr/src/main/java/org/oxycblt/musikr/fs/FS.kt index 46577fe0e..20c8bfde1 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/fs/FS.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/fs/FS.kt @@ -38,7 +38,7 @@ data class Directory( override val uri: Uri?, override val path: Path, val parent: Deferred?, - var children: List + var children: List, ) : FSEntry data class File( @@ -48,7 +48,7 @@ data class File( val modifiedMs: Long, val mimeType: String, val size: Long, - val parent: Deferred? + val parent: Deferred?, ) : FSEntry sealed interface FSUpdate { diff --git a/musikr/src/main/java/org/oxycblt/musikr/fs/Location.kt b/musikr/src/main/java/org/oxycblt/musikr/fs/Location.kt index 0aae7d337..083290436 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/fs/Location.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/fs/Location.kt @@ -39,7 +39,8 @@ sealed class Location(val uri: Uri, val path: Path) { context.contentResolverSafe.takePersistableUriPermission( uri, Intent.FLAG_GRANT_READ_URI_PERMISSION or - Intent.FLAG_GRANT_WRITE_URI_PERMISSION) + Intent.FLAG_GRANT_WRITE_URI_PERMISSION, + ) } catch (e: Exception) { // Not fully sure what happens if I'm disallowed to take the permission, // check for both circumstances (error or no-op) diff --git a/musikr/src/main/java/org/oxycblt/musikr/fs/Path.kt b/musikr/src/main/java/org/oxycblt/musikr/fs/Path.kt index 99630df25..c5cba4ca5 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/fs/Path.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/fs/Path.kt @@ -27,10 +27,7 @@ import java.io.File * @param volume The volume that the path is on. * @param components The components of the path of the file, relative to the root of the volume. */ -data class Path( - val volume: Volume, - val components: Components, -) { +data class Path(val volume: Volume, val components: Components) { /** The name of the file/directory. */ val name: String? get() = components.name diff --git a/musikr/src/main/java/org/oxycblt/musikr/fs/mediastore/MediaStore.kt b/musikr/src/main/java/org/oxycblt/musikr/fs/mediastore/MediaStore.kt index 22d8b8168..79bcc286d 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/fs/mediastore/MediaStore.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/fs/mediastore/MediaStore.kt @@ -50,7 +50,7 @@ class MediaStore private constructor( private val context: Context, private val volumeManager: VolumeManager, - private val query: Query + private val query: Query, ) : FS { private val pathInterpreterFactory = MediaStorePathInterpreter.Factory.from(volumeManager) @@ -93,49 +93,49 @@ private constructor( AOSPMediaStore.Audio.Media.EXTERNAL_CONTENT_URI, projection, selector, - args.toTypedArray()) { cursor -> - val pathInterpreter = pathInterpreterFactory.wrap(cursor) - val idIndex = - cursor.getColumnIndexOrThrow(AOSPMediaStore.Audio.AudioColumns._ID) - val mimeTypeIndex = - cursor.getColumnIndexOrThrow(AOSPMediaStore.Audio.AudioColumns.MIME_TYPE) - val sizeIndex = - cursor.getColumnIndexOrThrow(AOSPMediaStore.Audio.AudioColumns.SIZE) - val dateAddedIndex = - cursor.getColumnIndexOrThrow(AOSPMediaStore.Audio.AudioColumns.DATE_ADDED) - val dateModifiedIndex = - cursor.getColumnIndexOrThrow( - AOSPMediaStore.Audio.AudioColumns.DATE_MODIFIED) + args.toTypedArray(), + ) { cursor -> + val pathInterpreter = pathInterpreterFactory.wrap(cursor) + val idIndex = cursor.getColumnIndexOrThrow(AOSPMediaStore.Audio.AudioColumns._ID) + val mimeTypeIndex = + cursor.getColumnIndexOrThrow(AOSPMediaStore.Audio.AudioColumns.MIME_TYPE) + val sizeIndex = cursor.getColumnIndexOrThrow(AOSPMediaStore.Audio.AudioColumns.SIZE) + val dateAddedIndex = + cursor.getColumnIndexOrThrow(AOSPMediaStore.Audio.AudioColumns.DATE_ADDED) + val dateModifiedIndex = + cursor.getColumnIndexOrThrow(AOSPMediaStore.Audio.AudioColumns.DATE_MODIFIED) - while (cursor.moveToNext()) { - val path = pathInterpreter.extract() ?: continue + while (cursor.moveToNext()) { + val path = pathInterpreter.extract() ?: continue - val id = cursor.getLong(idIndex) - val uri = - Uri.withAppendedPath( - AOSPMediaStore.Audio.Media.EXTERNAL_CONTENT_URI, id.toString()) - val mimeType = cursor.getStringOrNull(mimeTypeIndex) ?: "audio/*" - val size = cursor.getLong(sizeIndex) - val dateAdded = - cursor.getLong(dateAddedIndex) * 1000 // Convert to milliseconds - val dateModified = - cursor.getLong(dateModifiedIndex) * 1000 // Convert to milliseconds + val id = cursor.getLong(idIndex) + val uri = + Uri.withAppendedPath( + AOSPMediaStore.Audio.Media.EXTERNAL_CONTENT_URI, + id.toString(), + ) + val mimeType = cursor.getStringOrNull(mimeTypeIndex) ?: "audio/*" + val size = cursor.getLong(sizeIndex) + val dateAdded = cursor.getLong(dateAddedIndex) * 1000 // Convert to milliseconds + val dateModified = + cursor.getLong(dateModifiedIndex) * 1000 // Convert to milliseconds - // Create file with empty deferred parent - val deviceFile = - File( - uri = uri, - path = path, - modifiedMs = dateModified, - mimeType = mimeType, - size = size, - addedMs = ForwardDateAdded(dateAdded), - parent = null) + // Create file with empty deferred parent + val deviceFile = + File( + uri = uri, + path = path, + modifiedMs = dateModified, + mimeType = mimeType, + size = size, + addedMs = ForwardDateAdded(dateAdded), + parent = null, + ) - allFiles.add(deviceFile) - it.send(deviceFile) - } + allFiles.add(deviceFile) + it.send(deviceFile) } + } } } @@ -150,12 +150,12 @@ private constructor( data class Query( val mode: FilterMode, val filtered: List, - val excludeNonMusic: Boolean + val excludeNonMusic: Boolean, ) enum class FilterMode { INCLUDE, - EXCLUDE + EXCLUDE, } private class ForwardDateAdded(val dateAdded: Long) : AddedMs { @@ -165,7 +165,10 @@ private constructor( companion object { fun from(context: Context, query: Query) = MediaStore( - context = context, volumeManager = VolumeManager.from(context), query = query) + context = context, + volumeManager = VolumeManager.from(context), + query = query, + ) /** * The base selector that works across all versions of android. Excludes files with zero @@ -180,6 +183,7 @@ private constructor( AOSPMediaStore.Audio.AudioColumns.DATE_ADDED, AOSPMediaStore.Audio.AudioColumns.DATE_MODIFIED, AOSPMediaStore.Audio.AudioColumns.SIZE, - AOSPMediaStore.Audio.AudioColumns.MIME_TYPE) + AOSPMediaStore.Audio.AudioColumns.MIME_TYPE, + ) } } diff --git a/musikr/src/main/java/org/oxycblt/musikr/fs/path/DocumentPathFactory.kt b/musikr/src/main/java/org/oxycblt/musikr/fs/path/DocumentPathFactory.kt index a412da501..aeeb5bb81 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/fs/path/DocumentPathFactory.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/fs/path/DocumentPathFactory.kt @@ -79,7 +79,7 @@ internal interface DocumentPathFactory { private class DocumentPathFactoryImpl( private val context: Context, private val volumeManager: VolumeManager, - private val mediaStorePathInterpreterFactory: MediaStorePathInterpreter.Factory + private val mediaStorePathInterpreterFactory: MediaStorePathInterpreter.Factory, ) : DocumentPathFactory { override fun unpackDocumentUri(uri: Uri): Path? { val id = DocumentsContract.getDocumentId(uri) @@ -92,10 +92,12 @@ private class DocumentPathFactoryImpl( val path = context.contentResolverSafe.useQuery( - contentUri, mediaStorePathInterpreterFactory.projection) { - it.moveToFirst() - mediaStorePathInterpreterFactory.wrap(it).extract() - } + contentUri, + mediaStorePathInterpreterFactory.projection, + ) { + it.moveToFirst() + mediaStorePathInterpreterFactory.wrap(it).extract() + } if (path != null) { return path @@ -113,7 +115,9 @@ private class DocumentPathFactoryImpl( // parsed into a Directory instance. val docUri = DocumentsContract.buildDocumentUriUsingTree( - uri, DocumentsContract.getTreeDocumentId(uri)) + uri, + DocumentsContract.getTreeDocumentId(uri), + ) val treeUri = DocumentsContract.getTreeDocumentId(docUri) return fromDocumentId(treeUri) } @@ -151,6 +155,7 @@ private class DocumentPathFactoryImpl( private val POSSIBLE_CONTENT_URI_PREFIXES = arrayOf( Uri.parse("content://downloads/public_downloads"), - Uri.parse("content://downloads/my_downloads")) + Uri.parse("content://downloads/my_downloads"), + ) } } diff --git a/musikr/src/main/java/org/oxycblt/musikr/fs/path/MediaStorePathInterpreter.kt b/musikr/src/main/java/org/oxycblt/musikr/fs/path/MediaStorePathInterpreter.kt index d62d1cb45..6ec3cd42d 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/fs/path/MediaStorePathInterpreter.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/fs/path/MediaStorePathInterpreter.kt @@ -125,7 +125,9 @@ private constructor(private val cursor: Cursor, volumeManager: VolumeManager) : override val projection: Array get() = arrayOf( - MediaStore.Audio.AudioColumns.DISPLAY_NAME, MediaStore.Audio.AudioColumns.DATA) + MediaStore.Audio.AudioColumns.DISPLAY_NAME, + MediaStore.Audio.AudioColumns.DATA, + ) override fun createSelector( paths: List @@ -200,7 +202,8 @@ private constructor(private val cursor: Cursor, volumeManager: VolumeManager) : // compared to DATA. MediaStore.Audio.AudioColumns.DISPLAY_NAME, MediaStore.Audio.AudioColumns.VOLUME_NAME, - MediaStore.Audio.AudioColumns.RELATIVE_PATH) + MediaStore.Audio.AudioColumns.RELATIVE_PATH, + ) // The selector should be configured to compare both the volume name and relative path // of the given directories, albeit with some conversion to the analogous MediaStore diff --git a/musikr/src/main/java/org/oxycblt/musikr/fs/saf/QueryUtil.kt b/musikr/src/main/java/org/oxycblt/musikr/fs/saf/QueryUtil.kt index 124b93088..0cf3ebbcb 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/fs/saf/QueryUtil.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/fs/saf/QueryUtil.kt @@ -46,7 +46,7 @@ internal fun ContentResolver.safeQuery( uri: Uri, projection: Array, selector: String? = null, - args: Array? = null + args: Array? = null, ) = requireNotNull(query(uri, projection, selector, args, null)) { "ContentResolver query failed" } /** @@ -68,5 +68,5 @@ internal inline fun ContentResolver.useQuery( projection: Array, selector: String? = null, args: Array? = null, - block: (Cursor) -> R + block: (Cursor) -> R, ) = safeQuery(uri, projection, selector, args).use(block) diff --git a/musikr/src/main/java/org/oxycblt/musikr/fs/saf/SAF.kt b/musikr/src/main/java/org/oxycblt/musikr/fs/saf/SAF.kt index 7ec48ff45..61038c01b 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/fs/saf/SAF.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/fs/saf/SAF.kt @@ -52,7 +52,7 @@ class SAF private constructor( private val context: Context, private val contentResolver: ContentResolver, - private val query: Query + private val query: Query, ) : FS { override suspend fun explore(files: Channel): Deferred> = coroutineScope { tryAsyncWith(files, Dispatchers.Main) { @@ -64,7 +64,8 @@ private constructor( location.path, null, query.exclude.mapTo(mutableSetOf()) { it.path }, - files) + files, + ) } .tryAwaitAll() } @@ -90,7 +91,7 @@ private constructor( relativePath: Path, parent: Deferred?, exclude: Set, - files: Channel + files: Channel, ): Deferred> = tryAsync(Dispatchers.IO) { // Make a kotlin future @@ -132,7 +133,14 @@ private constructor( if (mimeType == DocumentsContract.Document.MIME_TYPE_DIR) { recursive.add( exploreDirectoryImpl( - rootUri, childId, newPath, directoryDeferred, exclude, files)) + rootUri, + childId, + newPath, + directoryDeferred, + exclude, + files, + ) + ) } else { val size = cursor.getLong(sizeIndex) val file = @@ -148,7 +156,8 @@ private constructor( JoinAddedMs(context, childUri) } else { NullAddedMs - }) + }, + ) children.add(file) files.send(file) } @@ -161,7 +170,7 @@ private constructor( data class Query( val source: List, val exclude: List, - val withHidden: Boolean + val withHidden: Boolean, ) @RequiresApi(Build.VERSION_CODES.Q) @@ -174,15 +183,17 @@ private constructor( return null } return context.contentResolverSafe.useQuery( - mediaUri, arrayOf(AOSPMediaStore.Files.FileColumns.DATE_ADDED)) { - if (it.moveToFirst()) { - val dateAddedIndex = - it.getColumnIndexOrThrow(AOSPMediaStore.Files.FileColumns.DATE_ADDED) - it.getLong(dateAddedIndex) * 1000 - } else { - null - } + mediaUri, + arrayOf(AOSPMediaStore.Files.FileColumns.DATE_ADDED), + ) { + if (it.moveToFirst()) { + val dateAddedIndex = + it.getColumnIndexOrThrow(AOSPMediaStore.Files.FileColumns.DATE_ADDED) + it.getLong(dateAddedIndex) * 1000 + } else { + null } + } } } @@ -199,6 +210,7 @@ private constructor( DocumentsContract.Document.COLUMN_DISPLAY_NAME, DocumentsContract.Document.COLUMN_MIME_TYPE, DocumentsContract.Document.COLUMN_SIZE, - DocumentsContract.Document.COLUMN_LAST_MODIFIED) + DocumentsContract.Document.COLUMN_LAST_MODIFIED, + ) } } diff --git a/musikr/src/main/java/org/oxycblt/musikr/fs/track/LocationObserver.kt b/musikr/src/main/java/org/oxycblt/musikr/fs/track/LocationObserver.kt index c6bb55f66..c4cfefca5 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/fs/track/LocationObserver.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/fs/track/LocationObserver.kt @@ -27,7 +27,7 @@ import android.os.Looper internal class LocationObserver( private val context: Context, private val uri: Uri, - private val onUpdate: () -> Unit + private val onUpdate: () -> Unit, ) : ContentObserver(Handler(Looper.getMainLooper())), Runnable { private val handler = Handler(Looper.getMainLooper()) diff --git a/musikr/src/main/java/org/oxycblt/musikr/graph/MusicGraph.kt b/musikr/src/main/java/org/oxycblt/musikr/graph/MusicGraph.kt index 71a751d12..ebf1a97c9 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/graph/MusicGraph.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/graph/MusicGraph.kt @@ -35,7 +35,7 @@ internal data class MusicGraph( val albumVertex: List, val artistVertex: List, val genreVertex: List, - val playlistVertex: Set + val playlistVertex: Set, ) { interface Builder { fun add(preSong: PreSong) @@ -158,7 +158,8 @@ internal data class MusicGraph( val songIndex = this@MusicGraph.songVertex.indexOf(it) if (songIndex >= 0) { appendLine( - " playlist_$playlistIndex -> song_$songIndex [color=orange];") + " playlist_$playlistIndex -> song_$songIndex [color=orange];" + ) } } } @@ -221,7 +222,8 @@ private class MusicGraphBuilderImpl : MusicGraph.Builder { preSong, albumVertex, songArtistVertices.toMutableList(), - songGenreVertices.toMutableList()) + songGenreVertices.toMutableList(), + ) albumVertex.songVertices.add(songVertex) songArtistVertices.forEach { artistVertex -> @@ -321,7 +323,8 @@ private class MusicGraphBuilderImpl : MusicGraph.Builder { albumVertices.values.toList(), artistVertices.values.toList(), genreVertices.values.toList(), - playlistVertices) + playlistVertices, + ) return graph } @@ -480,7 +483,8 @@ private class MusicGraphBuilderImpl : MusicGraph.Builder { strippedMbidCluster.map { val noAlbumArtistPreAlbum = it.preAlbum.copy( - preArtists = PreArtistsFrom.Individual(it.preAlbum.preArtists.preArtists)) + preArtists = PreArtistsFrom.Individual(it.preAlbum.preArtists.preArtists) + ) val simpleAlbumArtistVertex = albumVertices.getOrPut(noAlbumArtistPreAlbum) { AlbumVertex(noAlbumArtistPreAlbum, it.artistVertices.toMutableList()) @@ -533,7 +537,7 @@ internal class SongVertex( val preSong: PreSong, var albumVertex: AlbumVertex, var artistVertices: MutableList, - var genreVertices: MutableList + var genreVertices: MutableList, ) : Vertex { override var tag: Any? = null @@ -548,9 +552,7 @@ internal class AlbumVertex(val preAlbum: PreAlbum, var artistVertices: MutableLi override fun toString() = "AlbumVertex(preAlbum=$preAlbum)" } -internal class ArtistVertex( - val preArtist: PreArtist, -) : Vertex { +internal class ArtistVertex(val preArtist: PreArtist) : Vertex { val songVertices = mutableSetOf() val albumVertices = mutableSetOf() val genreVertices = mutableSetOf() diff --git a/musikr/src/main/java/org/oxycblt/musikr/metadata/Metadata.kt b/musikr/src/main/java/org/oxycblt/musikr/metadata/Metadata.kt index ba16830b5..f6c97b5ed 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/metadata/Metadata.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/metadata/Metadata.kt @@ -23,7 +23,7 @@ data class Metadata( val xiph: Map>, val mp4: Map>, val cover: ByteArray?, - val properties: Properties + val properties: Properties, ) { override fun equals(other: Any?): Boolean { if (this === other) return true diff --git a/musikr/src/main/java/org/oxycblt/musikr/model/ArtistImpl.kt b/musikr/src/main/java/org/oxycblt/musikr/model/ArtistImpl.kt index 095320e19..64b5f1af5 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/model/ArtistImpl.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/model/ArtistImpl.kt @@ -52,7 +52,8 @@ internal class ArtistImpl(private val core: ArtistCore) : Artist { override val durationMs = core.songs.sumOf { it.durationMs } override val covers = CoverCollection.from( - core.songs.mapNotNull { it.cover }.ifEmpty { core.albums.flatMap { it.covers.covers } }) + core.songs.mapNotNull { it.cover }.ifEmpty { core.albums.flatMap { it.covers.covers } } + ) private val hashCode = 31 * (31 * uid.hashCode() + core.preArtist.hashCode()) * core.songs.hashCode() diff --git a/musikr/src/main/java/org/oxycblt/musikr/model/LibraryFactory.kt b/musikr/src/main/java/org/oxycblt/musikr/model/LibraryFactory.kt index 92296c80c..ca01987e8 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/model/LibraryFactory.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/model/LibraryFactory.kt @@ -38,7 +38,7 @@ internal interface LibraryFactory { fun create( graph: MusicGraph, storedPlaylists: StoredPlaylists, - playlistInterpreter: PlaylistInterpreter + playlistInterpreter: PlaylistInterpreter, ): MutableLibrary companion object { @@ -50,7 +50,7 @@ private class LibraryFactoryImpl() : LibraryFactory { override fun create( graph: MusicGraph, storedPlaylists: StoredPlaylists, - playlistInterpreter: PlaylistInterpreter + playlistInterpreter: PlaylistInterpreter, ): MutableLibrary { val songs = graph.songVertex.mapTo(mutableSetOf()) { vertex -> @@ -73,7 +73,14 @@ private class LibraryFactoryImpl() : LibraryFactory { PlaylistImpl(PlaylistVertexCore(vertex)) } return LibraryImpl( - songs, albums, artists, genres, playlists, storedPlaylists, playlistInterpreter) + songs, + albums, + artists, + genres, + playlists, + storedPlaylists, + playlistInterpreter, + ) } private class SongVertexCore(private val vertex: SongVertex) : SongCore { diff --git a/musikr/src/main/java/org/oxycblt/musikr/model/LibraryImpl.kt b/musikr/src/main/java/org/oxycblt/musikr/model/LibraryImpl.kt index 9e8777dfe..e7d26512e 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/model/LibraryImpl.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/model/LibraryImpl.kt @@ -34,7 +34,7 @@ internal data class LibraryImpl( override val genres: Set, override val playlists: Set, private val storedPlaylists: StoredPlaylists, - private val playlistInterpreter: PlaylistInterpreter + private val playlistInterpreter: PlaylistInterpreter, ) : MutableLibrary { private val songUidMap = songs.associateBy { it.uid } private val v400SongUidMap = songs.associateBy { it.v400Uid } @@ -116,6 +116,6 @@ internal data class LibraryImpl( private class NewPlaylistCore( override val prePlaylist: PrePlaylistInfo, - override val songs: List + override val songs: List, ) : PlaylistCore } diff --git a/musikr/src/main/java/org/oxycblt/musikr/pipeline/EvaluateStep.kt b/musikr/src/main/java/org/oxycblt/musikr/pipeline/EvaluateStep.kt index 09784d218..fe59e21e5 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/pipeline/EvaluateStep.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/pipeline/EvaluateStep.kt @@ -41,7 +41,8 @@ internal interface EvaluateStep { TagInterpreter.new(interpretation), PlaylistInterpreter.new(interpretation), config.storage.storedPlaylists, - LibraryFactory.new()) + LibraryFactory.new(), + ) } } @@ -50,7 +51,7 @@ private class EvaluateStepImpl( private val tagInterpreter: TagInterpreter, private val playlistInterpreter: PlaylistInterpreter, private val storedPlaylists: StoredPlaylists, - private val libraryFactory: LibraryFactory + private val libraryFactory: LibraryFactory, ) : EvaluateStep { override suspend fun evaluate(extractedMusic: Channel): MutableLibrary { val builder = MusicGraph.builder() diff --git a/musikr/src/main/java/org/oxycblt/musikr/pipeline/ExploreStep.kt b/musikr/src/main/java/org/oxycblt/musikr/pipeline/ExploreStep.kt index 9d64c42b8..75c95523e 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/pipeline/ExploreStep.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/pipeline/ExploreStep.kt @@ -48,7 +48,7 @@ internal interface ExploreStep { private class ExploreStepImpl(private val fs: FS, private val storage: Storage) : ExploreStep { override suspend fun explore( scope: CoroutineScope, - explored: Channel + explored: Channel, ): Deferred> { val files = Channel(Channel.UNLIMITED) val filesTask = fs.explore(files) @@ -73,8 +73,10 @@ private class ExploreStepImpl(private val fs: FS, private val storage: Storage) when (item) { is Finalized -> item is NeedsCover -> { - when (val coverResult = - item.cachedSong.coverId?.let { id -> storage.covers.obtain(id) }) { + when ( + val coverResult = + item.cachedSong.coverId?.let { id -> storage.covers.obtain(id) } + ) { is CoverResult.Hit -> Finalized(item.cachedSong.toRawSong(coverResult.cover)) null -> Finalized(item.cachedSong.toRawSong(null)) diff --git a/musikr/src/main/java/org/oxycblt/musikr/pipeline/ExtractStep.kt b/musikr/src/main/java/org/oxycblt/musikr/pipeline/ExtractStep.kt index f5500b6c0..7708f9618 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/pipeline/ExtractStep.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/pipeline/ExtractStep.kt @@ -40,7 +40,7 @@ internal interface ExtractStep { suspend fun extract( scope: CoroutineScope, explored: Channel, - extracted: Channel + extracted: Channel, ): Deferred> companion object { @@ -49,7 +49,8 @@ internal interface ExtractStep { MetadataExtractor.from(context), TagParser.new(), config.storage.cache, - config.storage.covers) + config.storage.covers, + ) } } @@ -57,12 +58,12 @@ private class ExtractStepImpl( private val metadataExtractor: MetadataExtractor, private val tagParser: TagParser, private val cache: MutableCache, - private val covers: MutableCovers + private val covers: MutableCovers, ) : ExtractStep { override suspend fun extract( scope: CoroutineScope, explored: Channel, - extracted: Channel + extracted: Channel, ): Deferred> { val addingMs = System.currentTimeMillis() val extract = Channel(PARALLELISM) @@ -104,7 +105,9 @@ private class ExtractStepImpl( // added query is basically free, it's only saf that has // it's slow hacky workaround that we must accommodate // here.) - item.newSong.file.addedMs.resolve() ?: addingMs)) + item.newSong.file.addedMs.resolve() ?: addingMs, + ) + ) } } } diff --git a/musikr/src/main/java/org/oxycblt/musikr/pipeline/PipelineItem.kt b/musikr/src/main/java/org/oxycblt/musikr/pipeline/PipelineItem.kt index 2242c3645..78ec7117a 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/pipeline/PipelineItem.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/pipeline/PipelineItem.kt @@ -53,5 +53,5 @@ internal data class RawSong( val properties: Properties, val tags: ParsedTags, val cover: Cover?, - val addedMs: Long + val addedMs: Long, ) : Explored.Known, Extracted.Valid diff --git a/musikr/src/main/java/org/oxycblt/musikr/playlist/ExternalPlaylistManager.kt b/musikr/src/main/java/org/oxycblt/musikr/playlist/ExternalPlaylistManager.kt index 8f80ff48e..0046266f3 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/playlist/ExternalPlaylistManager.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/playlist/ExternalPlaylistManager.kt @@ -57,7 +57,10 @@ interface ExternalPlaylistManager { companion object { fun from(context: Context): ExternalPlaylistManager = ExternalPlaylistManagerImpl( - context, DocumentPathFactory.from(context), M3U.from(context)) + context, + DocumentPathFactory.from(context), + M3U.from(context), + ) } } @@ -87,7 +90,7 @@ typealias PossiblePaths = List private class ExternalPlaylistManagerImpl( private val context: Context, private val documentPathFactory: DocumentPathFactory, - private val m3u: M3U + private val m3u: M3U, ) : ExternalPlaylistManager { override suspend fun import(uri: Uri): ImportedPlaylist? { val filePath = documentPathFactory.unpackDocumentUri(uri) ?: return null diff --git a/musikr/src/main/java/org/oxycblt/musikr/playlist/PlaylistFile.kt b/musikr/src/main/java/org/oxycblt/musikr/playlist/PlaylistFile.kt index ad52037d6..dc514c40a 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/playlist/PlaylistFile.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/playlist/PlaylistFile.kt @@ -24,7 +24,7 @@ import org.oxycblt.musikr.Song internal data class PlaylistFile( val name: String, val songPointers: List, - val handle: PlaylistHandle + val handle: PlaylistHandle, ) internal sealed interface SongPointer { diff --git a/musikr/src/main/java/org/oxycblt/musikr/playlist/db/PlaylistDatabase.kt b/musikr/src/main/java/org/oxycblt/musikr/playlist/db/PlaylistDatabase.kt index 021b01595..ee33ab0e9 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/playlist/db/PlaylistDatabase.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/playlist/db/PlaylistDatabase.kt @@ -38,7 +38,8 @@ import org.oxycblt.musikr.Music @Database( entities = [PlaylistInfo::class, PlaylistSong::class, PlaylistSongCrossRef::class], version = 30, - exportSchema = false) + exportSchema = false, +) @TypeConverters(Music.UID.TypeConverters::class) internal abstract class PlaylistDatabase : RoomDatabase() { abstract fun playlistDao(): PlaylistDao @@ -46,7 +47,10 @@ internal abstract class PlaylistDatabase : RoomDatabase() { companion object { fun from(context: Context) = Room.databaseBuilder( - context.applicationContext, PlaylistDatabase::class.java, "user_music.db") + context.applicationContext, + PlaylistDatabase::class.java, + "user_music.db", + ) .fallbackToDestructiveMigration() .build() } @@ -83,8 +87,11 @@ internal abstract class PlaylistDao { insertRefs( rawPlaylist.songs.map { PlaylistSongCrossRef( - playlistUid = rawPlaylist.playlistInfo.playlistUid, songUid = it.songUid) - }) + playlistUid = rawPlaylist.playlistInfo.playlistUid, + songUid = it.songUid, + ) + } + ) } /** @@ -119,7 +126,8 @@ internal abstract class PlaylistDao { open suspend fun insertPlaylistSongs(playlistUid: Music.UID, songs: List) { insertSongs(songs) insertRefs( - songs.map { PlaylistSongCrossRef(playlistUid = playlistUid, songUid = it.songUid) }) + songs.map { PlaylistSongCrossRef(playlistUid = playlistUid, songUid = it.songUid) } + ) } /** @@ -134,7 +142,8 @@ internal abstract class PlaylistDao { deleteRefs(playlistUid) insertSongs(songs) insertRefs( - songs.map { PlaylistSongCrossRef(playlistUid = playlistUid, songUid = it.songUid) }) + songs.map { PlaylistSongCrossRef(playlistUid = playlistUid, songUid = it.songUid) } + ) } /** Internal, do not use. */ diff --git a/musikr/src/main/java/org/oxycblt/musikr/playlist/db/RawPlaylist.kt b/musikr/src/main/java/org/oxycblt/musikr/playlist/db/RawPlaylist.kt index 1353458be..2a9061579 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/playlist/db/RawPlaylist.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/playlist/db/RawPlaylist.kt @@ -36,8 +36,9 @@ internal data class RawPlaylist( @Relation( parentColumn = "playlistUid", entityColumn = "songUid", - associateBy = Junction(PlaylistSongCrossRef::class)) - val songs: List + associateBy = Junction(PlaylistSongCrossRef::class), + ) + val songs: List, ) /** @@ -63,5 +64,5 @@ internal data class RawPlaylist( internal data class PlaylistSongCrossRef( @PrimaryKey(autoGenerate = true) val id: Long = 0, @ColumnInfo(index = true) val playlistUid: Music.UID, - @ColumnInfo(index = true) val songUid: Music.UID + @ColumnInfo(index = true) val songUid: Music.UID, ) diff --git a/musikr/src/main/java/org/oxycblt/musikr/playlist/db/StoredPlaylistHandle.kt b/musikr/src/main/java/org/oxycblt/musikr/playlist/db/StoredPlaylistHandle.kt index 36867202e..cbd772be6 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/playlist/db/StoredPlaylistHandle.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/playlist/db/StoredPlaylistHandle.kt @@ -23,7 +23,7 @@ import org.oxycblt.musikr.playlist.PlaylistHandle internal class StoredPlaylistHandle( private val playlistInfo: PlaylistInfo, - private val playlistDao: PlaylistDao + private val playlistDao: PlaylistDao, ) : PlaylistHandle { override val uid = playlistInfo.playlistUid diff --git a/musikr/src/main/java/org/oxycblt/musikr/playlist/db/StoredPlaylists.kt b/musikr/src/main/java/org/oxycblt/musikr/playlist/db/StoredPlaylists.kt index 44abce745..bad361abb 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/playlist/db/StoredPlaylists.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/playlist/db/StoredPlaylists.kt @@ -48,6 +48,7 @@ private class StoredPlaylistsImpl(private val playlistDao: PlaylistDao) : Stored PlaylistFile( it.playlistInfo.name, it.songs.map { song -> SongPointer.UID(song.songUid) }, - StoredPlaylistHandle(it.playlistInfo, playlistDao)) + StoredPlaylistHandle(it.playlistInfo, playlistDao), + ) } } diff --git a/musikr/src/main/java/org/oxycblt/musikr/playlist/interpret/PlaylistInterpreter.kt b/musikr/src/main/java/org/oxycblt/musikr/playlist/interpret/PlaylistInterpreter.kt index 2525a4141..84ef71357 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/playlist/interpret/PlaylistInterpreter.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/playlist/interpret/PlaylistInterpreter.kt @@ -40,7 +40,8 @@ private class PlaylistInterpreterImpl(private val naming: Naming) : PlaylistInte name = naming.name(file.name, null), rawName = file.name, handle = file.handle, - songPointers = file.songPointers) + songPointers = file.songPointers, + ) override fun interpret(name: String, handle: PlaylistHandle): PostPlaylist = PostPlaylist(name = naming.name(name, null), rawName = name, handle = handle) diff --git a/musikr/src/main/java/org/oxycblt/musikr/playlist/interpret/PrePlaylist.kt b/musikr/src/main/java/org/oxycblt/musikr/playlist/interpret/PrePlaylist.kt index 7a16d23c4..b3d43b8e4 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/playlist/interpret/PrePlaylist.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/playlist/interpret/PrePlaylist.kt @@ -32,7 +32,7 @@ internal data class PrePlaylist( override val name: Name.Known, override val rawName: String?, override val handle: PlaylistHandle, - val songPointers: List + val songPointers: List, ) : PrePlaylistInfo internal data class PostPlaylist( diff --git a/musikr/src/main/java/org/oxycblt/musikr/playlist/m3u/M3U.kt b/musikr/src/main/java/org/oxycblt/musikr/playlist/m3u/M3U.kt index be4bee901..2931cfb75 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/playlist/m3u/M3U.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/playlist/m3u/M3U.kt @@ -66,7 +66,7 @@ abstract class M3U { playlist: Playlist, outputStream: OutputStream, workingDirectory: Path, - config: ExportConfig + config: ExportConfig, ) companion object { @@ -143,13 +143,14 @@ private class M3UImpl(private val volumeManager: VolumeManager) : M3U() { else -> listOf( InterpretedPath(Components.parseUnix(path), false), - InterpretedPath(Components.parseWindows(path), true)) + InterpretedPath(Components.parseWindows(path), true), + ) } private fun expandInterpretation( path: InterpretedPath, workingDirectory: Path, - volumes: List + volumes: List, ): List { val absoluteInterpretation = Path(workingDirectory.volume, path.components) val relativeInterpretation = @@ -172,7 +173,7 @@ private class M3UImpl(private val volumeManager: VolumeManager) : M3U() { playlist: Playlist, outputStream: OutputStream, workingDirectory: Path, - config: ExportConfig + config: ExportConfig, ) { val writer = outputStream.bufferedWriter() // Try to be as compliant to the spec as possible while also cramming it full of extensions @@ -252,9 +253,11 @@ private class M3UImpl(private val volumeManager: VolumeManager) : M3U() { // and them combine them with the correct relative elements to make sure they // resolve the same. var commonIndex = 0 - while (commonIndex < components.size && - commonIndex < workingDirectory.components.size && - components[commonIndex] == workingDirectory.components[commonIndex]) { + while ( + commonIndex < components.size && + commonIndex < workingDirectory.components.size && + components[commonIndex] == workingDirectory.components[commonIndex] + ) { ++commonIndex } @@ -267,7 +270,7 @@ private class M3UImpl(private val volumeManager: VolumeManager) : M3U() { } commonIndex == components.size -> { // The working directory is deeper in the path, backtrack. - for (i in 0 ..< workingDirectory.components.size - commonIndex) { + for (i in 0.. { // The paths are siblings. Backtrack and append as needed. - for (i in 0 ..< workingDirectory.components.size - commonIndex) { + for (i in 0..) : Comparable /** The earliest [Date] in the range. */ val min: Date, /** the latest [Date] in the range. May be the same as [min]. ] */ - val max: Date + val max: Date, ) : Comparable { init { check(min <= max) { "Min date must be <= max date" } @@ -109,7 +109,8 @@ class Date private constructor(private val tokens: List) : Comparable */ private val ISO8601_REGEX by lazy { Regex( - """^(\d{4})([-.](\d{2})([-.](\d{2})([T ](\d{2})([:.](\d{2})([:.](\d{2})(Z)?)?)?)?)?)?$""") + """^(\d{4})([-.](\d{2})([-.](\d{2})([T ](\d{2})([:.](\d{2})([:.](\d{2})(Z)?)?)?)?)?)?$""" + ) } /** @@ -126,7 +127,8 @@ class Date private constructor(private val tokens: List) : Comparable from( stringYear.substring(0..3).toInt(), stringYear.substring(4..5).toInt(), - stringYear.substring(6..7).toInt()) + stringYear.substring(6..7).toInt(), + ) } else { fromTokens(listOf(year)) } diff --git a/musikr/src/main/java/org/oxycblt/musikr/tag/Name.kt b/musikr/src/main/java/org/oxycblt/musikr/tag/Name.kt index d6f30d834..e961744ec 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/tag/Name.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/tag/Name.kt @@ -90,8 +90,10 @@ class Token internal constructor(internal val collationKey: CollationKey, intern // Numeric strings must be ordered by magnitude, thus immediately short-circuit // the comparison if the lengths do not match. - if (type == Type.NUMERIC && - collationKey.sourceString.length != other.collationKey.sourceString.length) { + if ( + type == Type.NUMERIC && + collationKey.sourceString.length != other.collationKey.sourceString.length + ) { return collationKey.sourceString.length - other.collationKey.sourceString.length } @@ -103,12 +105,12 @@ class Token internal constructor(internal val collationKey: CollationKey, intern /** Compare as a digit string, like "65". */ NUMERIC, /** Compare as a standard alphanumeric string, like "65daysofstatic" */ - LEXICOGRAPHIC + LEXICOGRAPHIC, } } enum class Placeholder { ALBUM, ARTIST, - GENRE + GENRE, } diff --git a/musikr/src/main/java/org/oxycblt/musikr/tag/ReleaseType.kt b/musikr/src/main/java/org/oxycblt/musikr/tag/ReleaseType.kt index 709f71588..cf60b980b 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/tag/ReleaseType.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/tag/ReleaseType.kt @@ -107,7 +107,7 @@ sealed interface ReleaseType { LIVE, /** A release consisting of another Artists remix of a prior performance. */ - REMIX + REMIX, } companion object { @@ -145,7 +145,7 @@ sealed interface ReleaseType { */ private inline fun List.parseSecondaryTypes( index: Int, - convertRefinement: (Refinement?) -> ReleaseType + convertRefinement: (Refinement?) -> ReleaseType, ): ReleaseType { val secondary = getOrNull(index) return if (secondary.equals("compilation", true)) { @@ -169,7 +169,7 @@ sealed interface ReleaseType { */ private inline fun parseSecondaryTypeImpl( type: String?, - convertRefinement: (Refinement?) -> ReleaseType + convertRefinement: (Refinement?) -> ReleaseType, ) = when { // Parse all the types that have no children diff --git a/musikr/src/main/java/org/oxycblt/musikr/tag/format/ID3.kt b/musikr/src/main/java/org/oxycblt/musikr/tag/format/ID3.kt index 4e9390711..ef22ee503 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/tag/format/ID3.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/tag/format/ID3.kt @@ -321,4 +321,5 @@ private val genreTable = "Psybient", // Auxio's extensions, added because Future Garage is also a good genre. - "Future Garage") + "Future Garage", + ) diff --git a/musikr/src/main/java/org/oxycblt/musikr/tag/interpret/PreMusic.kt b/musikr/src/main/java/org/oxycblt/musikr/tag/interpret/PreMusic.kt index 8d7a802fd..8e9eecc27 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/tag/interpret/PreMusic.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/tag/interpret/PreMusic.kt @@ -54,7 +54,7 @@ internal data class PreSong( val cover: Cover?, val preAlbum: PreAlbum, val preArtists: List, - val preGenres: List + val preGenres: List, ) internal data class PreAlbum( @@ -91,7 +91,4 @@ internal data class PreArtist(val musicBrainzId: UUID?, val name: Name, val rawN ?: Music.UID.auxio(Music.UID.Item.ARTIST) { update(rawName) } } -internal data class PreGenre( - val name: Name, - val rawName: String?, -) +internal data class PreGenre(val name: Name, val rawName: String?) diff --git a/musikr/src/main/java/org/oxycblt/musikr/tag/interpret/TagInterpreter.kt b/musikr/src/main/java/org/oxycblt/musikr/tag/interpret/TagInterpreter.kt index 9d06722be..7504211e2 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/tag/interpret/TagInterpreter.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/tag/interpret/TagInterpreter.kt @@ -48,16 +48,23 @@ private class TagInterpreterImpl(private val interpretation: Interpretation) : T song.tags.artistMusicBrainzIds, song.tags.artistNames, song.tags.artistSortNames, - interpretation) + interpretation, + ) val albumPreArtists = makePreArtists( song.tags.albumArtistMusicBrainzIds, song.tags.albumArtistNames, song.tags.albumArtistSortNames, - interpretation) + interpretation, + ) val preAlbum = makePreAlbum( - song.tags, song.file, individualPreArtists, albumPreArtists, interpretation) + song.tags, + song.file, + individualPreArtists, + albumPreArtists, + interpretation, + ) val rawArtists = individualPreArtists.ifEmpty { albumPreArtists }.ifEmpty { listOf(unknownPreArtist()) } val rawGenres = @@ -146,7 +153,8 @@ private class TagInterpreterImpl(private val interpretation: Interpretation) : T preAlbum = preAlbum, preArtists = rawArtists, preGenres = rawGenres, - cover = song.cover) + cover = song.cover, + ) } private fun makePreAlbum( @@ -154,7 +162,7 @@ private class TagInterpreterImpl(private val interpretation: Interpretation) : T deviceFile: File, individualPreArtists: List, albumPreArtists: List, - interpretation: Interpretation + interpretation: Interpretation, ): PreAlbum { val name = parsedTags.albumName ?: deviceFile.path.directory.name return PreAlbum( @@ -167,14 +175,16 @@ private class TagInterpreterImpl(private val interpretation: Interpretation) : T preArtists = PreArtistsFrom.Album(albumPreArtists).takeIf { it.preArtists.isNotEmpty() } ?: PreArtistsFrom.Individual( - individualPreArtists.ifEmpty { listOf(unknownPreArtist()) })) + individualPreArtists.ifEmpty { listOf(unknownPreArtist()) } + ), + ) } private fun makePreArtists( rawMusicBrainzIds: List, rawNames: List, rawSortNames: List, - interpretation: Interpretation + interpretation: Interpretation, ): List { val musicBrainzIds = interpretation.separators.split(rawMusicBrainzIds) val names = interpretation.separators.split(rawNames) @@ -188,7 +198,7 @@ private class TagInterpreterImpl(private val interpretation: Interpretation) : T musicBrainzId: String?, rawName: String?, sortName: String?, - interpretation: Interpretation + interpretation: Interpretation, ): PreArtist { val name = interpretation.naming.name(rawName, sortName, Placeholder.ARTIST) val musicBrainzId = musicBrainzId?.toUuidOrNull() @@ -199,7 +209,7 @@ private class TagInterpreterImpl(private val interpretation: Interpretation) : T private fun makePreGenres( parsedTags: ParsedTags, - interpretation: Interpretation + interpretation: Interpretation, ): List { val genreNames = parsedTags.genreNames.parseId3GenreNames() diff --git a/musikr/src/main/java/org/oxycblt/musikr/tag/parse/ParsedTags.kt b/musikr/src/main/java/org/oxycblt/musikr/tag/parse/ParsedTags.kt index 70ec61959..9e595b388 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/tag/parse/ParsedTags.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/tag/parse/ParsedTags.kt @@ -41,5 +41,5 @@ data class ParsedTags( val albumArtistMusicBrainzIds: List = listOf(), val albumArtistNames: List = listOf(), val albumArtistSortNames: List = listOf(), - val genreNames: List = listOf() + val genreNames: List = listOf(), ) diff --git a/musikr/src/main/java/org/oxycblt/musikr/tag/parse/TagFields.kt b/musikr/src/main/java/org/oxycblt/musikr/tag/parse/TagFields.kt index 08620d399..77fa86804 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/tag/parse/TagFields.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/tag/parse/TagFields.kt @@ -48,15 +48,15 @@ internal fun Metadata.sortName() = (xiph["TITLESORT"] ?: mp4["sonm"] ?: id3v2["T internal fun Metadata.track() = (parseXiphPositionField( xiph["TRACKNUMBER"]?.first(), - (xiph["TOTALTRACKS"] ?: xiph["TRACKTOTAL"] ?: xiph["TRACKC"])?.first()) - ?: (mp4["trkn"] ?: id3v2["TRCK"])?.run { first().parseSlashPositionField() }) + (xiph["TOTALTRACKS"] ?: xiph["TRACKTOTAL"] ?: xiph["TRACKC"])?.first(), + ) ?: (mp4["trkn"] ?: id3v2["TRCK"])?.run { first().parseSlashPositionField() }) // Disc and it's subtitle name. internal fun Metadata.disc() = (parseXiphPositionField( xiph["DISCNUMBER"]?.first(), - (xiph["TOTALDISCS"] ?: xiph["DISCTOTAL"] ?: xiph["DISCC"])?.run { first() }) - ?: (mp4["disk"] ?: id3v2["TPOS"])?.run { first().parseSlashPositionField() }) + (xiph["TOTALDISCS"] ?: xiph["DISCTOTAL"] ?: xiph["DISCC"])?.run { first() }, + ) ?: (mp4["disk"] ?: id3v2["TPOS"])?.run { first().parseSlashPositionField() }) internal fun Metadata.subtitle() = (xiph["DISCSUBTITLE"] ?: id3v2["TSST"])?.first() diff --git a/musikr/src/main/java/org/oxycblt/musikr/tag/parse/TagParser.kt b/musikr/src/main/java/org/oxycblt/musikr/tag/parse/TagParser.kt index a4dbda470..ecbf4f8c2 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/tag/parse/TagParser.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/tag/parse/TagParser.kt @@ -60,6 +60,7 @@ private data object TagParserImpl : TagParser { ?: listOf("Various Artists").takeIf { compilation } ?: listOf(), albumArtistSortNames = metadata.albumArtistSortNames() ?: listOf(), - genreNames = metadata.genreNames() ?: listOf()) + genreNames = metadata.genreNames() ?: listOf(), + ) } } diff --git a/musikr/src/main/java/org/oxycblt/musikr/util/LangUtil.kt b/musikr/src/main/java/org/oxycblt/musikr/util/LangUtil.kt index 313835361..2f791ef2e 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/util/LangUtil.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/util/LangUtil.kt @@ -33,7 +33,7 @@ import org.oxycblt.musikr.tag.Date fun CoroutineScope.tryAsync( context: CoroutineContext, - block: suspend () -> Unit + block: suspend () -> Unit, ): Deferred> = async { try { block() diff --git a/musikr/src/test/java/org/oxycblt/musikr/tag/DateTest.kt b/musikr/src/test/java/org/oxycblt/musikr/tag/DateTest.kt index b2cb3380d..1eede7339 100644 --- a/musikr/src/test/java/org/oxycblt/musikr/tag/DateTest.kt +++ b/musikr/src/test/java/org/oxycblt/musikr/tag/DateTest.kt @@ -27,7 +27,8 @@ class DateTest { fun date_equals_varyingPrecision() { assertTrue( requireNotNull(Date.from("2016-08-16T00:01:02")) != - requireNotNull(Date.from("2016-08-16"))) + requireNotNull(Date.from("2016-08-16")) + ) } @Test @@ -48,10 +49,7 @@ class DateTest { fun date_compareTo_varyingPrecision() { val a = requireNotNull(Date.from("2016-08-16T00:01:02")) val b = requireNotNull(Date.from("2016-08-16")) - assertEquals( - 1, - a.compareTo(b), - ) + assertEquals(1, a.compareTo(b)) } @Test diff --git a/musikr/src/test/java/org/oxycblt/musikr/tag/ReleaseTypeTest.kt b/musikr/src/test/java/org/oxycblt/musikr/tag/ReleaseTypeTest.kt index cd0627547..29af0515c 100644 --- a/musikr/src/test/java/org/oxycblt/musikr/tag/ReleaseTypeTest.kt +++ b/musikr/src/test/java/org/oxycblt/musikr/tag/ReleaseTypeTest.kt @@ -32,7 +32,9 @@ class ReleaseTypeTest { @Test fun releaseType_parse_secondary() { assertEquals( - ReleaseType.Compilation(null), ReleaseType.parse(listOf("album", "compilation"))) + ReleaseType.Compilation(null), + ReleaseType.parse(listOf("album", "compilation")), + ) assertEquals(ReleaseType.Soundtrack, ReleaseType.parse(listOf("album", "soundtrack"))) assertEquals(ReleaseType.Mix, ReleaseType.parse(listOf("album", "dj-mix"))) assertEquals(ReleaseType.Mixtape, ReleaseType.parse(listOf("album", "mixtape/street"))) @@ -43,30 +45,40 @@ class ReleaseTypeTest { fun releaseType_parse_modifiers() { assertEquals( ReleaseType.Album(ReleaseType.Refinement.LIVE), - ReleaseType.parse(listOf("album", "live"))) + ReleaseType.parse(listOf("album", "live")), + ) assertEquals( ReleaseType.Album(ReleaseType.Refinement.REMIX), - ReleaseType.parse(listOf("album", "remix"))) + ReleaseType.parse(listOf("album", "remix")), + ) assertEquals( - ReleaseType.EP(ReleaseType.Refinement.LIVE), ReleaseType.parse(listOf("ep", "live"))) + ReleaseType.EP(ReleaseType.Refinement.LIVE), + ReleaseType.parse(listOf("ep", "live")), + ) assertEquals( - ReleaseType.EP(ReleaseType.Refinement.REMIX), ReleaseType.parse(listOf("ep", "remix"))) + ReleaseType.EP(ReleaseType.Refinement.REMIX), + ReleaseType.parse(listOf("ep", "remix")), + ) assertEquals( ReleaseType.Single(ReleaseType.Refinement.LIVE), - ReleaseType.parse(listOf("single", "live"))) + ReleaseType.parse(listOf("single", "live")), + ) assertEquals( ReleaseType.Single(ReleaseType.Refinement.REMIX), - ReleaseType.parse(listOf("single", "remix"))) + ReleaseType.parse(listOf("single", "remix")), + ) } @Test fun releaseType_parse_secondaryModifiers() { assertEquals( ReleaseType.Compilation(ReleaseType.Refinement.LIVE), - ReleaseType.parse(listOf("album", "compilation", "live"))) + ReleaseType.parse(listOf("album", "compilation", "live")), + ) assertEquals( ReleaseType.Compilation(ReleaseType.Refinement.REMIX), - ReleaseType.parse(listOf("album", "compilation", "remix"))) + ReleaseType.parse(listOf("album", "compilation", "remix")), + ) } @Test @@ -80,8 +92,12 @@ class ReleaseTypeTest { @Test fun releaseType_parse_orphanedModifier() { assertEquals( - ReleaseType.Album(ReleaseType.Refinement.LIVE), ReleaseType.parse(listOf("live"))) + ReleaseType.Album(ReleaseType.Refinement.LIVE), + ReleaseType.parse(listOf("live")), + ) assertEquals( - ReleaseType.Album(ReleaseType.Refinement.REMIX), ReleaseType.parse(listOf("remix"))) + ReleaseType.Album(ReleaseType.Refinement.REMIX), + ReleaseType.parse(listOf("remix")), + ) } } diff --git a/musikr/src/test/java/org/oxycblt/musikr/tag/interpret/SeparatorsTest.kt b/musikr/src/test/java/org/oxycblt/musikr/tag/interpret/SeparatorsTest.kt index 3f6ac6dd5..26044e7dc 100644 --- a/musikr/src/test/java/org/oxycblt/musikr/tag/interpret/SeparatorsTest.kt +++ b/musikr/src/test/java/org/oxycblt/musikr/tag/interpret/SeparatorsTest.kt @@ -36,12 +36,15 @@ class SeparatorsTest { fun separators_split_withString_withMultipleChar() { assertEquals( listOf("a", "b", "c", "d", "e", "f"), - Separators.from(",;/+&").split(listOf("a,b;c/d+e&f"))) + Separators.from(",;/+&").split(listOf("a,b;c/d+e&f")), + ) } @Test fun separators_split_withList_withMultipleChar() { assertEquals( - listOf("a,b;c/d", "e&f"), Separators.from(",;/+&").split(listOf("a,b;c/d", "e&f"))) + listOf("a,b;c/d", "e&f"), + Separators.from(",;/+&").split(listOf("a,b;c/d", "e&f")), + ) } } diff --git a/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagFieldsTest.kt b/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagFieldsTest.kt index 47d31032d..1a1c47e9b 100644 --- a/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagFieldsTest.kt +++ b/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagFieldsTest.kt @@ -52,7 +52,8 @@ class TagFieldsTest { createTestMetadata( id3v2Tags = mapOf("TIT2" to listOf("ID3 Title")), mp4Tags = mapOf("©nam" to listOf("MP4 Title")), - xiphTags = mapOf("TITLE" to listOf("Xiph Title"))) + xiphTags = mapOf("TITLE" to listOf("Xiph Title")), + ) assertEquals("Xiph Title", metadata.name()) } @@ -73,13 +74,15 @@ class TagFieldsTest { // Test Xiph format metadata = createTestMetadata( - xiphTags = mapOf("TRACKNUMBER" to listOf("9"), "TOTALTRACKS" to listOf("15"))) + xiphTags = mapOf("TRACKNUMBER" to listOf("9"), "TOTALTRACKS" to listOf("15")) + ) assertEquals(9, metadata.track()) // Test Xiph alternative total tracks metadata = createTestMetadata( - xiphTags = mapOf("TRACKNUMBER" to listOf("8"), "TRACKTOTAL" to listOf("16"))) + xiphTags = mapOf("TRACKNUMBER" to listOf("8"), "TRACKTOTAL" to listOf("16")) + ) assertEquals(8, metadata.track()) } @@ -96,13 +99,15 @@ class TagFieldsTest { // Test Xiph format metadata = createTestMetadata( - xiphTags = mapOf("DISCNUMBER" to listOf("3"), "TOTALDISCS" to listOf("4"))) + xiphTags = mapOf("DISCNUMBER" to listOf("3"), "TOTALDISCS" to listOf("4")) + ) assertEquals(3, metadata.disc()) // Test Xiph alternative total discs metadata = createTestMetadata( - xiphTags = mapOf("DISCNUMBER" to listOf("2"), "DISCTOTAL" to listOf("5"))) + xiphTags = mapOf("DISCNUMBER" to listOf("2"), "DISCTOTAL" to listOf("5")) + ) assertEquals(2, metadata.disc()) } @@ -118,7 +123,8 @@ class TagFieldsTest { metadata = createTestMetadata( id3v2Tags = mapOf("TSST" to listOf("ID3 Subtitle")), - xiphTags = mapOf("DISCSUBTITLE" to listOf("Xiph Subtitle"))) + xiphTags = mapOf("DISCSUBTITLE" to listOf("Xiph Subtitle")), + ) assertEquals("Xiph Subtitle", metadata.subtitle()) } @@ -144,7 +150,8 @@ class TagFieldsTest { metadata = createTestMetadata( xiphTags = - mapOf("DATE" to listOf("2023-01-01"), "ORIGINALDATE" to listOf("2021-01-01"))) + mapOf("DATE" to listOf("2023-01-01"), "ORIGINALDATE" to listOf("2021-01-01")) + ) assertEquals("2021-01-01", metadata.date().toString()) // Test MP4 date @@ -161,8 +168,9 @@ class TagFieldsTest { mapOf( "TYER" to listOf("2019"), "TDAT" to listOf("0523"), // May 23 - "TIME" to listOf("2145") // 21:45 - )) + "TIME" to listOf("2145"), // 21:45 + ) + ) val date = metadata.date() assertEquals(2019, date?.year) assertEquals(5, date?.month) @@ -179,7 +187,9 @@ class TagFieldsTest { mapOf( "TALB" to listOf("Album Name"), "TSOA" to listOf("Sort Album Name"), - "TXXX:RELEASETYPE" to listOf("compilation"))) + "TXXX:RELEASETYPE" to listOf("compilation"), + ) + ) assertEquals("Album Name", metadata.albumName()) assertEquals("Sort Album Name", metadata.albumSortName()) @@ -195,7 +205,9 @@ class TagFieldsTest { "TPE1" to listOf("Artist 1"), "TPE2" to listOf("Album Artist 1"), "TSOP" to listOf("Artist 1 Sort"), - "TSO2" to listOf("Album Artist 1 Sort"))) + "TSO2" to listOf("Album Artist 1 Sort"), + ) + ) assertEquals(listOf("Artist 1"), metadata.artistNames()) assertEquals(listOf("Album Artist 1"), metadata.albumArtistNames()) @@ -211,7 +223,9 @@ class TagFieldsTest { xiphTags = mapOf( "MUSICBRAINZ_RELEASETRACKID" to listOf("track-mb-id"), - "MUSICBRAINZ_ALBUMID" to listOf("album-mb-id"))) + "MUSICBRAINZ_ALBUMID" to listOf("album-mb-id"), + ) + ) assertEquals("track-mb-id", metadata.musicBrainzId()) assertEquals("album-mb-id", metadata.albumMusicBrainzId()) @@ -223,7 +237,9 @@ class TagFieldsTest { mapOf( "----:COM.APPLE.ITUNES:MUSICBRAINZ RELEASE TRACK ID" to listOf("track-mb-id-2"), - "----:COM.APPLE.ITUNES:MUSICBRAINZ ALBUM ID" to listOf("album-mb-id-2"))) + "----:COM.APPLE.ITUNES:MUSICBRAINZ ALBUM ID" to listOf("album-mb-id-2"), + ) + ) assertEquals("track-mb-id-2", metadata2.musicBrainzId()) assertEquals("album-mb-id-2", metadata2.albumMusicBrainzId()) @@ -272,14 +288,14 @@ class TagFieldsTest { // Test MP4 ReplayGain tags metadata = createTestMetadata( - mp4Tags = - mapOf("----:COM.APPLE.ITUNES:REPLAYGAIN_TRACK_GAIN" to listOf("-0.32 dB"))) + mp4Tags = mapOf("----:COM.APPLE.ITUNES:REPLAYGAIN_TRACK_GAIN" to listOf("-0.32 dB")) + ) assertEquals(-0.32f, metadata.replayGainTrackAdjustment()) metadata = createTestMetadata( - mp4Tags = - mapOf("----:COM.APPLE.ITUNES:REPLAYGAIN_ALBUM_GAIN" to listOf("-8.72 dB"))) + mp4Tags = mapOf("----:COM.APPLE.ITUNES:REPLAYGAIN_ALBUM_GAIN" to listOf("-8.72 dB")) + ) assertEquals(-8.72f, metadata.replayGainAlbumAdjustment()) } @@ -303,7 +319,7 @@ class TagFieldsTest { durationMs: Long = 1000, bitrateKbps: Int = 320, sampleRateHz: Int = 44100, - mimeType: String = "audio/mpeg" + mimeType: String = "audio/mpeg", ): Metadata { val properties = Properties(mimeType, durationMs, bitrateKbps, sampleRateHz) return Metadata(id3v2Tags, xiphTags, mp4Tags, cover, properties) diff --git a/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagParserTest.kt b/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagParserTest.kt index f52950015..7a4ef68eb 100644 --- a/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagParserTest.kt +++ b/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagParserTest.kt @@ -45,7 +45,9 @@ class TagParserTest { "TYER" to listOf("2020"), "TRCK" to listOf("1/10"), "TPOS" to listOf("1/2"), - "TCON" to listOf("Rock", "Electronic"))) + "TCON" to listOf("Rock", "Electronic"), + ) + ) val tags = tagParser.parse(metadata) @@ -66,7 +68,8 @@ class TagParserTest { createTestMetadata( id3v2Tags = mapOf("TIT2" to listOf("ID3 Song"), "TALB" to listOf("ID3 Album")), xiphTags = mapOf("TITLE" to listOf("Xiph Song"), "ALBUM" to listOf("Xiph Album")), - mp4Tags = mapOf("©nam" to listOf("MP4 Song"), "©alb" to listOf("MP4 Album"))) + mp4Tags = mapOf("©nam" to listOf("MP4 Song"), "©alb" to listOf("MP4 Album")), + ) val tags = tagParser.parse(metadata) @@ -91,8 +94,8 @@ class TagParserTest { // Test compilation album with explicit release type val metadata = createTestMetadata( - id3v2Tags = - mapOf("TCMP" to listOf("1"), "TXXX:RELEASETYPE" to listOf("soundtrack"))) + id3v2Tags = mapOf("TCMP" to listOf("1"), "TXXX:RELEASETYPE" to listOf("soundtrack")) + ) val tags = tagParser.parse(metadata) @@ -120,7 +123,9 @@ class TagParserTest { "TXXX:MUSICBRAINZ RELEASE TRACK ID" to listOf("track-id-123"), "TXXX:MUSICBRAINZ ALBUM ID" to listOf("album-id-456"), "TXXX:MUSICBRAINZ ARTIST ID" to listOf("artist-id-789"), - "TXXX:MUSICBRAINZ ALBUM ARTIST ID" to listOf("album-artist-id-012"))) + "TXXX:MUSICBRAINZ ALBUM ARTIST ID" to listOf("album-artist-id-012"), + ) + ) val tags = tagParser.parse(metadata) @@ -137,7 +142,9 @@ class TagParserTest { xiphTags = mapOf( "REPLAYGAIN_TRACK_GAIN" to listOf("-3.5 dB"), - "REPLAYGAIN_ALBUM_GAIN" to listOf("-2.1 dB"))) + "REPLAYGAIN_ALBUM_GAIN" to listOf("-2.1 dB"), + ) + ) val tags = tagParser.parse(metadata) @@ -153,7 +160,7 @@ class TagParserTest { durationMs: Long = 1000, bitrateKbps: Int = 320, sampleRateHz: Int = 44100, - mimeType: String = "audio/mpeg" + mimeType: String = "audio/mpeg", ): Metadata { val properties = Properties(mimeType, durationMs, bitrateKbps, sampleRateHz) return Metadata(id3v2Tags, xiphTags, mp4Tags, cover, properties) diff --git a/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagParsingEdgeCasesTest.kt b/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagParsingEdgeCasesTest.kt index 6eef3a43d..e7a68f96d 100644 --- a/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagParsingEdgeCasesTest.kt +++ b/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagParsingEdgeCasesTest.kt @@ -66,7 +66,9 @@ class TagParsingEdgeCasesTest { "TRCK" to listOf("not-a-number"), "TPOS" to listOf("also-not-a-number"), "TYER" to listOf("invalid-year"), - "REPLAYGAIN_TRACK_GAIN" to listOf("not-a-float dB"))) + "REPLAYGAIN_TRACK_GAIN" to listOf("not-a-float dB"), + ) + ) val parsedTags = tagParser.parse(metadata) // Verify all numeric fields are null when given invalid values @@ -83,7 +85,8 @@ class TagParsingEdgeCasesTest { createTestMetadata( id3v2Tags = mapOf("TIT2" to listOf("ID3 Title"), "TALB" to listOf("ID3 Album")), mp4Tags = mapOf("©nam" to listOf("MP4 Title"), "©alb" to listOf("MP4 Album")), - xiphTags = mapOf("TITLE" to listOf("Xiph Title"), "ALBUM" to listOf("Xiph Album"))) + xiphTags = mapOf("TITLE" to listOf("Xiph Title"), "ALBUM" to listOf("Xiph Album")), + ) // Individual field extraction assertEquals("Xiph Title", metadata.name()) @@ -105,11 +108,13 @@ class TagParsingEdgeCasesTest { mapOf( "©nam" to listOf("MP4 Title") // No album in MP4 - ), + ), xiphTags = mapOf( // No title in Xiph - "ALBUM" to listOf("Xiph Album"))) + "ALBUM" to listOf("Xiph Album") + ), + ) // Individual field extraction assertEquals("MP4 Title", metadata.name()) // Xiph missing, falls back to MP4 @@ -134,7 +139,8 @@ class TagParsingEdgeCasesTest { // Case 2: Compilation flag with explicit album artist metadata = createTestMetadata( - id3v2Tags = mapOf("TCMP" to listOf("1"), "TPE2" to listOf("Custom Album Artist"))) + id3v2Tags = mapOf("TCMP" to listOf("1"), "TPE2" to listOf("Custom Album Artist")) + ) tags = tagParser.parse(metadata) assertEquals(listOf("Custom Album Artist"), tags.albumArtistNames) assertEquals(listOf("compilation"), tags.releaseTypes) @@ -142,8 +148,8 @@ class TagParsingEdgeCasesTest { // Case 3: Compilation flag with explicit release type metadata = createTestMetadata( - id3v2Tags = - mapOf("TCMP" to listOf("1"), "TXXX:RELEASETYPE" to listOf("soundtrack"))) + id3v2Tags = mapOf("TCMP" to listOf("1"), "TXXX:RELEASETYPE" to listOf("soundtrack")) + ) tags = tagParser.parse(metadata) assertEquals(listOf("Various Artists"), tags.albumArtistNames) assertEquals(listOf("soundtrack"), tags.releaseTypes) @@ -156,7 +162,8 @@ class TagParsingEdgeCasesTest { // Non-numeric characters filtered out var metadata = createTestMetadata( - xiphTags = mapOf("REPLAYGAIN_TRACK_GAIN" to listOf("+2.5 dB some text"))) + xiphTags = mapOf("REPLAYGAIN_TRACK_GAIN" to listOf("+2.5 dB some text")) + ) assertEquals(2.5f, metadata.replayGainTrackAdjustment()) // Zero values filtered @@ -186,8 +193,10 @@ class TagParsingEdgeCasesTest { createTestMetadata( id3v2Tags = mapOf( - "TYER" to listOf("2018"), "TDAT" to listOf("0315") // March 15 - )) + "TYER" to listOf("2018"), + "TDAT" to listOf("0315"), // March 15 + ) + ) assertEquals("2018-03-15", metadata.date().toString()) // Year, date and time @@ -197,8 +206,9 @@ class TagParsingEdgeCasesTest { mapOf( "TYER" to listOf("2018"), "TDAT" to listOf("0315"), // March 15 - "TIME" to listOf("1422") // 14:22 - )) + "TIME" to listOf("1422"), // 14:22 + ) + ) assertEquals("2018-03-15T14:22Z", metadata.date().toString()) // Original year @@ -212,7 +222,9 @@ class TagParsingEdgeCasesTest { mapOf( "TYER" to listOf("2018"), "TDAT" to listOf("invalid"), - "TIME" to listOf("invalid"))) + "TIME" to listOf("invalid"), + ) + ) assertEquals("2018", metadata.date().toString()) // Non-numeric date components @@ -228,7 +240,7 @@ class TagParsingEdgeCasesTest { durationMs: Long = 1000, bitrateKbps: Int = 320, sampleRateHz: Int = 44100, - mimeType: String = "audio/mpeg" + mimeType: String = "audio/mpeg", ): Metadata { val properties = Properties(mimeType, durationMs, bitrateKbps, sampleRateHz) return Metadata(id3v2Tags, xiphTags, mp4Tags, cover, properties) diff --git a/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagUtilTest.kt b/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagUtilTest.kt index bb6f1be08..558a7f53a 100644 --- a/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagUtilTest.kt +++ b/musikr/src/test/java/org/oxycblt/musikr/tag/parse/TagUtilTest.kt @@ -73,7 +73,9 @@ class TagUtilTest { @Test fun correctWhitespace_listOopsAllWhitespace() { assertEquals( - listOf("tcp phagocyte"), listOf(" ", "", " tcp phagocyte").correctWhitespace()) + listOf("tcp phagocyte"), + listOf(" ", "", " tcp phagocyte").correctWhitespace(), + ) } @Test @@ -117,14 +119,16 @@ class TagUtilTest { fun parseId3v2Genre_multi() { assertEquals( listOf("Post-Rock", "Shoegaze", "Glitch"), - listOf("Post-Rock", "Shoegaze", "Glitch").parseId3GenreNames()) + listOf("Post-Rock", "Shoegaze", "Glitch").parseId3GenreNames(), + ) } @Test fun parseId3v2Genre_multiId3v1() { assertEquals( listOf("Post-Rock", "Shoegaze", "Glitch"), - listOf("176", "178", "Glitch").parseId3GenreNames()) + listOf("176", "178", "Glitch").parseId3GenreNames(), + ) } @Test @@ -136,7 +140,8 @@ class TagUtilTest { fun parseId3v2Genre_singleId3v23() { assertEquals( listOf("Post-Rock", "Shoegaze", "Remix", "Cover", "Glitch"), - listOf("(176)(178)(RX)(CR)Glitch").parseId3GenreNames()) + listOf("(176)(178)(RX)(CR)Glitch").parseId3GenreNames(), + ) } @Test From 609810dedff56b6edbd2380ccdc3e80afea59be6 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Wed, 31 Dec 2025 19:07:07 -0700 Subject: [PATCH 05/15] playback: add swipe styleable attr again --- app/src/main/res/values/attrs.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index bf4c81b20..d504d3b53 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -21,6 +21,10 @@ + + + + From fda8f254671428d6ad513fc4cc5c3d206e51b08d Mon Sep 17 00:00:00 2001 From: "Weblate (bot)" Date: Thu, 1 Jan 2026 02:50:57 +0100 Subject: [PATCH 06/15] Translations update from Hosted Weblate (#1205) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Translated using Weblate (Romanian) Currently translated at 72.2% (239 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ro/ * Translated using Weblate (Romanian) Currently translated at 98.4% (63 of 64 strings) Translation: Auxio/Metadata Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/ro/ * Translated using Weblate (Arabic) Currently translated at 98.1% (325 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ar/ * Translated using Weblate (Norwegian Nynorsk) Currently translated at 100.0% (64 of 64 strings) Translation: Auxio/Metadata Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/nn/ * Translated using Weblate (Norwegian Nynorsk) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/nn/ * Translated using Weblate (Chinese (Simplified Han script)) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/zh_Hans/ * Translated using Weblate (Romanian) Currently translated at 72.2% (239 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ro/ * Translated using Weblate (Romanian) Currently translated at 72.2% (239 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ro/ * Translated using Weblate (Luri (Bakhtiari)) Currently translated at 98.4% (63 of 64 strings) Translation: Auxio/Metadata Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/bqi/ * Translated using Weblate (Lithuanian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/lt/ * Translated using Weblate (Turkish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/tr/ * Translated using Weblate (Polish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pl/ * Translated using Weblate (Croatian) Currently translated at 100.0% (64 of 64 strings) Translation: Auxio/Metadata Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/hr/ * Added translation using Weblate (Danish) * Translated using Weblate (Danish) Currently translated at 98.4% (63 of 64 strings) Translation: Auxio/Metadata Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/da/ * Translated using Weblate (Danish) Currently translated at 31.7% (105 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/da/ * Added translation using Weblate (Vietnamese) * Translated using Weblate (Vietnamese) Currently translated at 98.4% (63 of 64 strings) Translation: Auxio/Metadata Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/vi/ * Translated using Weblate (Vietnamese) Currently translated at 0.3% (1 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/vi/ * Translated using Weblate (Indonesian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/id/ * Translated using Weblate (Georgian) Currently translated at 34.1% (113 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ka/ * Translated using Weblate (Finnish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fi/ * Translated using Weblate (Lithuanian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/lt/ * Added translation using Weblate (Marathi) * Translated using Weblate (Serbian) Currently translated at 100.0% (65 of 65 strings) Translation: Auxio/Metadata Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/sr/ * Translated using Weblate (Marathi) Currently translated at 2.4% (8 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/mr/ * Translated using Weblate (Azerbaijani) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/az/ * Translated using Weblate (Azerbaijani) Currently translated at 100.0% (65 of 65 strings) Translation: Auxio/Metadata Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/az/ * Translated using Weblate (Turkish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/tr/ * Translated using Weblate (Turkish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/tr/ * Translated using Weblate (Turkish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/tr/ * Translated using Weblate (Russian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ru/ * Translated using Weblate (Russian) Currently translated at 100.0% (65 of 65 strings) Translation: Auxio/Metadata Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/ru/ * Translated using Weblate (French) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fr/ * Translated using Weblate (Lithuanian) Currently translated at 100.0% (65 of 65 strings) Translation: Auxio/Metadata Translate-URL: https://hosted.weblate.org/projects/auxio/metadata/lt/ * Translated using Weblate (Lithuanian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/lt/ --------- Co-authored-by: Nicolae Fericitu Co-authored-by: jonnysemon Co-authored-by: Sunniva Løvstad Co-authored-by: zeh zhou <18201521626@139.com> Co-authored-by: hosêyň abāspanā Co-authored-by: Vaclovas Intas Co-authored-by: Yağız Co-authored-by: rehork Co-authored-by: Milo Ivir Co-authored-by: Mads Rumle Nordstrøm Co-authored-by: Baor Hoàng Gia Co-authored-by: Arif Budiman Co-authored-by: Temuri Doghonadze Co-authored-by: Joonas Reinholm Co-authored-by: Swapnil Saste | INDIA Co-authored-by: NecRaul Co-authored-by: Quint Co-authored-by: korablin <218695736+Gwocha@users.noreply.github.com> Co-authored-by: Mickaël Binos --- app/src/main/res/values-ar/strings.xml | 24 ++ app/src/main/res/values-az/strings.xml | 219 +++++++++++++++++- app/src/main/res/values-da/strings.xml | 108 +++++++++ app/src/main/res/values-fi/strings.xml | 2 +- app/src/main/res/values-fr/strings.xml | 51 ++-- app/src/main/res/values-in/strings.xml | 42 +++- app/src/main/res/values-ka/strings.xml | 14 +- app/src/main/res/values-lt/strings.xml | 92 ++++---- app/src/main/res/values-mr/strings.xml | 11 + app/src/main/res/values-nn/strings.xml | 60 ++--- app/src/main/res/values-pl/strings.xml | 22 +- app/src/main/res/values-ro/strings.xml | 63 ++--- app/src/main/res/values-ru/strings.xml | 19 +- app/src/main/res/values-tr/strings.xml | 128 +++++----- app/src/main/res/values-vi/strings.xml | 4 + app/src/main/res/values-zh-rCN/strings.xml | 2 +- .../metadata/android/az/full_description.txt | 24 ++ .../android/bqi/short_description.txt | 1 + .../metadata/android/da/short_description.txt | 1 + .../metadata/android/hr/full_description.txt | 3 +- .../metadata/android/lt/full_description.txt | 26 +-- .../metadata/android/lt/short_description.txt | 2 +- .../metadata/android/nn/full_description.txt | 14 +- .../metadata/android/ro/short_description.txt | 2 +- .../metadata/android/ru/full_description.txt | 3 +- .../metadata/android/sr/full_description.txt | 24 ++ .../metadata/android/sr/short_description.txt | 1 + .../metadata/android/vi/short_description.txt | 1 + 28 files changed, 710 insertions(+), 253 deletions(-) create mode 100644 app/src/main/res/values-da/strings.xml create mode 100644 app/src/main/res/values-mr/strings.xml create mode 100644 app/src/main/res/values-vi/strings.xml create mode 100644 fastlane/metadata/android/az/full_description.txt create mode 100644 fastlane/metadata/android/bqi/short_description.txt create mode 100644 fastlane/metadata/android/da/short_description.txt create mode 100644 fastlane/metadata/android/sr/full_description.txt create mode 100644 fastlane/metadata/android/sr/short_description.txt create mode 100644 fastlane/metadata/android/vi/short_description.txt diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index c3e106439..518abb5d9 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -330,4 +330,28 @@ المجلدات المستثناة استخدم ذاكرة التخزين المؤقت لنظام الملفات يحسن أوقات التحميل، ولكنه قد يمنع إضافة صوت جديد + قد يؤدي منح أذونات التخزين الخارجي إلى إصلاح المشكلات في بعض الأجهزة. + امنح أذونات التخزين الخارجي لتفعيل هذا الخيار. + حمّل من + منتقي الملفات + النظام + يوصى بالوصول إلى التخزين + مطلوب الوصول إلى التخزين + المجلدات المراد تحميلها + مجلدات مراد تجاهلها + المجلدات المصفاة + وضع التصفية + ضمّن + استثنِ + إعدادات أكثر + لا مجلدات + أضف مجلد + + %d ثانية + ثانية + ثانيتان + %d ثوانِ + %d ثانية + %d ثانية + diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index cb873c0ba..748d57ed5 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -17,7 +17,7 @@ Kompilyasiya Kompilyasiyalar Saundtrek - Android üçün asan, səmərəli musiqi səsləndirici. + Android üçün asan, səmərəli musiqi pleyeri. Musiqi kitabxanası yoxlanılır Canlı EP EP @@ -106,7 +106,7 @@ Versiya Mənbə kodu Viki - Kitabxana statistikası + Musiqi kitabxana statistikası Lisenziyalar Seçim Yol üsulu @@ -128,4 +128,219 @@ Pleylist silindi Pleylist yaradıldı Növbəyə əlavə edildi + Bura adınızı əlavə etmək üçün layihəyə bağışlayın! + Musiqi kitabxananızı axtarın… + Sizin mahnılarınız burada görünəcək. + Sizin albomlarınız burada görünəcək. + Sizin ifaçılarınız burada görünəcək. + Sizin janrlarınız burada görünəcək. + Sizin pleylistləriniz burada görünəcək. + Bu mahnı növbəti ifa olunacaq + Xarici yaddaş icazəsi vermək bəzi cihazlarda problemləri həll edə bilər. + Bu seçimi aktivləşdirmək üçün xarici yaddaş icazəsi verin. + Seçilmiş qovluqlardan kənar mahnılar nəzərə alınmayacaq. + Seçilmiş qovluqlardakı mahnılar nəzərə alınmayacaq. + Parametrlər + Görünüş və hissiyyat + Proqramın tema və rənglərini dəyişin + Seçdiyiniz qovluqlardan mahnılar yükləyin. Daha yavaş, amma, daha etibarlı. Vanilla fayl menecerinin quraşdırılmasını tələb edir. + Android əməliyyat sisteminin avtomatik aşkar etdiyi mahnıları yükləyin. Daha sürətli, amma, daha az etibarlı. Fayl sistemindən asılı cover.jpg kimi funksiyalar dəstəklənmir. + Tema + Avtomatik + İşıqlı + Qaranlıq + Rəng sxemi + Qaranlıq tema + Saf-qaranlıq temadan istifadə et + Dairəvi rejim + İstifadəçi isterfeysində əlavə elementlərdə dairəvi küncləri aktivləşdir (albom qapaqlarının dairəvi olmasını tələb edir) + Fərdiləşdir + İstifadəçi interfeys nəzarət və davranışını fərdiləşdir + Musiqi kitabxanası teblərı + Musiqi kitabxanası teblərinin görünürlüyünü və sırasını dəyiş + Displey + Fərdi bildiriş əməliyyatı + Növbətiyə keç + Təkrar rejimi + Davranış + Musiqi kitabxanasından səsləndiriləndə + Element detallarından səsləndiriləndə + Görünən elementdən səsləndir + Bütün mahnılardan səsləndir + Albomdan səsləndir + İfaçıdan səsləndir + Janrdan səsləndir + Sadəcə mahnını səsləndir + Qarışdırmağı yadda saxla + Yeni mahnı səsləndiriləndə qarışdırmağı davam et + Məzmun + Mahnı və şəkillərin necə yükləndiyinə nəzarət et + Musiqi + Avtomatik yenidən yüklənmə + Dəyişiklik baş verəndə musiqi kitabxanasını yenidən yüklə (davamlı bildiriş tələb edir) + Musiqi olmayanları nəzərə alma + Podkast kimi, musiqi olmayan audio fayllarını nəzərə alma + Gizli faylları nəzərə al + Gizli audio fayllarını nəzərə al (məs. .cache) + Çox-dəyərli ayırıcılar + Bir neçə teq dəyərini göstərən simvolları konfiqurasiya et + Vergül (,) + Nöqtəli vergül (;) + Sleş (/) + Üstəgəl (+) + \"Və\" işarəsi (&) + Xəbərdarlıq: Bu parametrdən istifadə bəzi teqlərin birdən çox dəyərə malik olduğu kimi yanlış şərh edilməsi ilə nəticələnə bilər. Arzuolunmaz ayırıcı simvolları əks sleş (\\) ilə prefiks etməklə bunu həll edə bilərsiniz. + Ağıllı çeşidləmə + Rəqəmlərlə və ya \"the\" kimi artikllarla başlayan adları düzgün çeşidləyin (İngilis dilli musiqi ilə ən yaxşı işləyir) + Digər ifaçılar və əməkdaşları gizlə + Yalnız birbaşa albomda qeyd olunan ifaçıları göstər (yaxşı teqlənmiş musiqi kitabxanalarında ən yaxşı işləyir) + Şəkillər + Albom qapağı + Söndür + Yaddaş saxla + Balanslaşdırılmış + Yüksək keyfiyyətli + Olduğu kimi + Albom qapaqlarını kvadrata məcbur et + Bütün albom qapaqlarını 1:1 aspekt nisbətinə kəs + Audio + Səs və oxutma davranışını konfiqurasiya et + Səsləndirmə + Qulaqlıqla avtomatik səsləndirmə + Qulaqlıq qoşulduqda həmişə səsləndirməni başla (bütün cihazlarda işləməyə bilər) + Təkrarda mahnını dayandır + Mahnı təkrarlananda onu dayandır + Dayandırmağı yadda saxla + Növbəni dəyişdirərkən və ya atlayarkən səsləndirmədə/dayandırmada qalın + Səs həcmini normallaşdırma + Sistem + Yaddaş icazəsi tövsiyə olunur + Yaddaş icazəsi tələb olunur + Yüklənəcək qovluqlar + Nəzərə alınmayacaq qovluqlar + Filtrlənmiş qovluqlar + Filtr rejimi + Nəzərə al + Nəzərə alma + Daha çox parametrlər + Fayl sisteminin keşindən istifadə edin + Yükləmə vaxtlarını sürətləndirir, amma, yeni mahnıların əlavə edilməsinin qarşısını ala bilər + Nəzərə alınmayan qovluqlar + Musiqi yükləmək nəzərə alınmayacaq qovluqları idarə et + Musiqiləri yenilə + Mümkün olduqda keşlənmiş teqlərdən istifadə edərək musiqi kitabxanasını yenilə + Musiqiləri yenidən skan et + Keşlənmiş teqləri təmizlə və musiqi kitabxanasını yenidən skan et (daha yavaş, amma, daha tamamlı) + Musiqini yükləmək alınmadı + Bu fayldan pleylist yükləmək mümkün olmadı + Bu fayla pleylist yükləmək mümkün olmadı + ReplayGain strategiyası + Söndür + Trekə üstünlük ver + Alboma üstünlük ver + Alboma üstünlük ver əgər biri səsləndirilirsə + ReplayGain pre-amp + Pre-amp səsləndirmə zamanı mövcud tənzimləmə üçün tətbiq edilir + Teqlərlə tənzimləmə + Teqlərsiz tənzimləmə + Xəbərdarlıq: Pre-ampi yüksək müsbət dəyərə dəyişdirmək bəzi mahnılarda pikləşməyə səbəb ola bilər. + Musiqi kitabxanası + Musiqi mənbələri + Musiqinin hardan yüklənəcəyini idarə et + Burdan yüklə + Fayl seçici + + %d mahnı + %d mahnı + + + %d albom + %d albom + + + %d ifaçı + %d ifaçı + + Bu tapşırığı yerinə yetirə biləcək proqram tapılmadı + Bu qovluq dəstəklənmir + Qovluq yoxdur + Trek %d + Səsləndir və ya dayandır + Sonrakı mahnıya keç + Axırdakı mahnıya keç + Təkrar rejimini dəyişdir + Qarışdırmanı yandır və ya söndür + Səsləndirməni dayandır + Bu mahnını kənarlaşdır + Bu mahnını köçür + Növbəni aç + Bu tebi köçür + Axtarışı təmizlə + Qovluğu əlavə et + Qovluğu çıxar + Auxio ikonu + Albom qapağı + %s üçün albom qapağı + %s üçün ifaçı şəkli + %s üçün janr şəkli + %s üçün pleylist şəkli + Seçim şəkli + Tanınmayan albom + Tanınmayan ifaçı + Tanınmayan janr + Tarix yoxdur + Disk yoxdur + Trek yoxdur + Mahnı yoxdur + Albom yoxdur + Mahnı səsləndirilmir + MPEG-1 audio + MPEG-4 audio + Tərkibində %s olan MPEG-4 + Advanced Audio Coding (AAC) + Apple Lossless Audio Codec (ALAC) + Ogg audio + Free Lossless Audio Codec (FLAC) + Tanınmayan + Qırmızı + Çəhrayı + Bənövşəyi + Tünd bənövşəyi + İndiqo + Göy + Tünd göy + Yaşıl + Tünd yaşıl + Sarı + Narıncı + Qəhvəyi + Boz + Dinamik + %1$s, %2$s + %d seçilmiş + %s redaktə edilir + Disk %d + Pleylist %d + +%.1f dB + -%.1f dB + %d kbps + %d Hz + Musiqi kitabxanası yüklənir... (%1$d/%2$d) + %s-nı sil? Bu geri qaytarıla bilməz. + Yüklənmir mahnılar: %d + Yüklənmiş albomlar: %d + Yüklənmiş ifaçılar: %d + Yüklənmiş janrlar: %d + Ümumi müddət: %s + + %d saniyə + %d saniyə + + Siyan + Tıl + Limon yaşılı + Auxio-nu əvvəldən saxlanmış vəziyyətdən istifadə edərək başlatmaq. Saxlanmış vəziyyət mövcud deyilsə, büyün mahnılar qarışdırılacaq. Səsləndirmə dərhal başlayacaq.\n\nXƏBƏRDARLIQ: Bu xidmətdən istifadə edərkən diqqətli olun, onu bağlasanız və sonra yenidən istifadə etməyə cəhd etsəniz, ehtimal ki, proqram çökəcək. + Fərdi səsləndirmə barı hərəkəti + Geri atlamadan əvvəl geri sar + Əvvəlki mahnıya keçmədən əvvəl geri sar diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml new file mode 100644 index 000000000..e245819ef --- /dev/null +++ b/app/src/main/res/values-da/strings.xml @@ -0,0 +1,108 @@ + + + En simpel og rationel musikafspiller til Android. + Musikindlæser + Indlæser musik + Holder øje med musikbibliotek + Prøv igen + Sange + Sang + Alle sange + Albummer + Album + Livealbum + Remixalbum + EP\'er + EP + Live-EP + Remix-EP + Singler + Single + Live single + Remixsingle + Opsamlingsalbummer + Opsamlingsalbum + Live opsamlingsalbum + Remix opsamlingsalbum + Lydspor + Lydspor + Mixtapes + Mixtape + Demo + Demoer + DJ-mix + DJ-mix + Live + Remix + Medvirker på + Kunstner + Kunstnere + Genre + Genrer + Spilleliste + Spillelister + Ny spilleliste + Tom spilleliste + Importeret spilleliste + Importer + Importer spilleliste + Eksporter + Eksporter spilleliste + Omdøb + Omdøb spilleliste + Slet + Slet spilleliste? + Rediger + Søg + Filtrer + Alle + Navn + Dato + Varighed + Antal sange + Plade + Nummer + Dato tilføjet + Sorter + Sorter efter + Retning + Stigende + Faldende + Spilles nu + Equalizer + Afspil + Bland + Kø + Afspil næste + Tilføj til kø + Tilføj til spilleliste + Gå til kunstner + Gå til album + Vis egenskaber + Vis + Del + Sangegenskaber + Sti + Format + Størrelse + Bithastighed + Samplingsfrekvens + Bland + Bland alle + Begynd afspilning + OK + Annuller + Gem + Nulstil + Flere + Absolut + Relativ + Stiform + Anvend stier kompatible med Windows + Om + Version + Kildekode + Wiki + Licenser + Statistik over bibliotek + diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 75d4e0f91..1d4fb1e59 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -1,4 +1,4 @@ - + Yksinkertainen ja rationaalinen musiikkisoitin Androidille. Musiikki latautuu diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index ef79cd7a2..f2a602bd5 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -1,6 +1,5 @@ - + - Réessayer Genres Artistes @@ -26,7 +25,6 @@ Code source Licences Développé par Alexandre Capehart - Paramètres Apparence Thème @@ -36,13 +34,9 @@ Couleur d\'accentuation Audio Personnalisation - - Morceau %d Lecture ou pause - Recherchez dans votre bibliothèque… - Rouge Rose Violet @@ -57,7 +51,6 @@ Orange Brun Gris - Titres chargés : %d %d titre @@ -94,11 +87,11 @@ Album Année Durée - Nombre de chansons + Nombre de titres Disque Piste Voir les propriétés - Propriétés de la chanson + Propriétés du titre EP live EP de remix Single live @@ -158,7 +151,7 @@ Esperluette (&) Playlist Pour la lecture à partir des détails de l\'élément - Garde la lecture aléatoire après la lecture d\'une autre chanson + Laissez la lecture aléatoire activée lors de la lecture d\'un nouveau titre Lire à partir de l\'élément affiché Garder la lecture aléatoire Contrôler le chargement de la musique et des images @@ -176,7 +169,7 @@ Pour la lecture à partir de la bibliothèque Séparateurs multi-valeurs Rechargement automatique - Lire depuis toutes les chansons + Lire depuis tous les titres Lire depuis l\'artiste Lire à partir du genre Virgule (,) @@ -193,7 +186,7 @@ Lecture Toujours commencer la lecture lorsqu\'un périphérique audio est connecté (peut ne pas fonctionner sur tous les appareils) Stratégie ReplayGain - Par chanson + Préférer le titre Par album Par album si un album est en lecture Bibliothèque @@ -210,10 +203,10 @@ Préampli ReplayGain Recharge la bibliothèque musicale, en se servant de balises en cache si possible Nouvelle playlist - Passer à la chanson suivante + Passer au titre suivant Activer ou désactiver la lecture aléatoire %d Hz - Passer à la dernière chanson + Revenir au titre précédent Ajouter à la playlist Artistes chargés : %d Rembobiner avant de passer en arrière @@ -221,7 +214,7 @@ Aucune piste Aucune musique en cours de lecture Supprimer - Pause quand une chanson se répète + Pause lorsqu\'un titre se répète Déplacer cet onglet Renommer Modifier le mode de répétition @@ -238,7 +231,7 @@ Modifier Pause en cas de répétition - Rembobine avant de passer à la chanson précédente + Revenez en arrière avant de passer au titre précédent Arrêter la lecture Playlist créée Playlist renommée @@ -249,15 +242,15 @@ -%.1f dB Supprimer %s ? Cette opération ne peut pas être annulée. Attention&nbsp;: Le fait de régler le préampli très fort peut entraîner des distortions audibles sur certaines pistes audio. - Liste de lecture %d + Playlist %d Apparaît sur Renommer la playlist Supprimer la playlist ? Partager - Retirer cette chanson - Déplacer cette chanson + Supprimer ce titre + Déplacer ce titre Ouvrir la file d\'attente - Aucune chanson + Aucun titre Modification de %s Genres chargés : %d Image de genre pour %s @@ -270,7 +263,7 @@ Recadrer toutes les pochettes d\'album à l\'aspect 1:1 Titre Voir - Lire la chanson par elle-même + Lire le titre seul Image de sélection Trier par Direction @@ -296,7 +289,7 @@ Soutiens Faites un don au projet pour que votre nom soit ajouté ici ! Garder la pause - Reste en lecture ou en pause quand vous passez une chanson ou modifiez la file d’attente + La lecture/pause reste active lors du passage à la file d\'attente ou de sa modification Exporter Exporter la playlist Importer @@ -313,12 +306,12 @@ Envoyer un courriel Inconnu MPEG-4 contenant %s - Vos chansons s\'afficheront ici. - Vos playlists vont s\'afficher ici. - Les genres musicaux vont s\'afficher ici. + Vos titres s\'afficheront ici. + Vos playlists s\'afficheront ici. + Les genres musicaux s\'afficheront ici. Inclure les fichiers audios qui sont cachés (ex. .cache) - Vos albums vont s\'afficher ici. - Vos artistes vont s\'afficher ici. + Vos albums s\'afficheront ici. + Vos artistes s\'afficheront ici. Inclure les fichiers cachés Économie d\'espace Album inconnu @@ -326,7 +319,7 @@ Tel quel Dossiers exclus Gérer les dossiers pour exclure du chargement de musique - La chanson va être lu juste après + Le titre suivant sera joué Charger de la musique à partir des dossiers que vous allez sélectionner. Moins rapide, mais plus fiable. La présence de l\'application de navigateur fichier natif sera requise. Charger de la musique détectée par Android automatiquement. Plus rapide, mais moins fiable. Les fonctionnalités nécessitant l\'accès au système de fichiers, comme les fichiers d\'image de pochettes, ne seront pas disponible. Accorder l\'accès au stockage externe peut corriger des problèmes sur certains appareils. diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index d2c2a5021..06eaae3a0 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -131,7 +131,7 @@ Hapus lagu antrian ini Hapus kueri pencarian Penyesuaian tanpa tag - Folder musik + Sumber musik Putar dari artis Loncat ke lagu terakhir Tidak ada tanggal @@ -305,4 +305,44 @@ Buat masalah di GitHub Kirim email Memulai Auxio menggunakan status yang disimpan sebelumnya. Jika tidak ada status yang disimpan, semua lagu akan diputar secara acak. Pemutaran akan dimulai segera.\n\nPERINGATAN: Hati-hati saat mengontrol layanan ini, jika Anda menutupnya dan kemudian mencoba menggunakannya lagi, aplikasi kemungkinan besar akan mengalami kegagalan. + Lagu akan diputar selanjutnya + Album Anda akan ditampilkan di sini. + Seniman Anda akan muncul di sini. + Genre Anda akan ditampilkan di sini. + Playlist Anda akan ditampilkan di sini. + Muat musik dari folder yang Anda pilih. Lebih lambat, tetapi lebih andal. Membutuhkan aplikasi pengelola berkas bawaan untuk diinstal. + Memuat musik yang secara otomatis terdeteksi oleh sistem operasi Android. Lebih cepat, tetapi kurang andal. Tidak mendukung fitur yang bergantung pada sistem berkas, seperti cover.jpg. + Memberikan izin penyimpanan eksternal dapat memperbaiki masalah pada beberapa perangkat. + Berikan izin penyimpanan eksternal untuk mengaktifkan opsi ini. + Musik di luar folder yang dipilih akan diabaikan. + Musik di dalam folder yang dipilih akan diabaikan. + Sertakan berkas tersembunyi + Sertakan berkas audio yang tersembunyi (misalnya .cache) + Hemat ruang + Seperti yang ada + Muat Dari + Pemilih berkas + Sistem + Akses penyimpanan disarankan + Akses penyimpanan diperlukan + Folder yang akan dimuat + Folder yang Diabaikan + Folder yang Disaring + Mode Filter + Sertakan + Kecualikan + Pengaturan tambahan + Gunakan cache sistem berkas + Mempercepat waktu pemuatan, tetapi dapat mencegah penambahan musik baru + Folder yang dikecualikan + Kelola folder yang akan dikecualikan dari proses pemuatan musik + Tidak Ada Folder + Tambahkan Folder + Album yang tidak diketahui + MPEG-4 yang berisi %s + Apple Lossless Audio Codec (ALAC) + Tidak diketahui + + %d detik + diff --git a/app/src/main/res/values-ka/strings.xml b/app/src/main/res/values-ka/strings.xml index 5bced8d07..f09ae62c4 100644 --- a/app/src/main/res/values-ka/strings.xml +++ b/app/src/main/res/values-ka/strings.xml @@ -97,7 +97,7 @@ ფერები ავტომატური ჩატვირთვა სურათები - მუსიკის საქაღალდე + მუსიკის წყაროები ბოლო სიმღერაზე გადასვლა სტატისტიკა ლიცენზიები @@ -110,4 +110,16 @@ თქვენი ჟანრები აქ გამოჩნდება. სრული ხანგრძლივობა: %s ჟანრების რაოდენობა: %d + + %d სიმღერა + %d სიმღერა + + + %d ალბომი + %d ალბომი + + + %d შემსრულებელი + %d შემსრულებელი + diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 34bb4a193..9214faf51 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -1,4 +1,4 @@ - + Dainos Visos dainos @@ -22,7 +22,7 @@ Dydis Bitų sparta Skaitmeninimo dažnis - Automatinis + Automatinė Šviesi Tamsi Spalvų schema @@ -43,7 +43,7 @@ Versija Nustatymai Tema - Naudok grynai juodą tamsią temą. + Naudoti grynai juodą tamsią temą. Paprasta, racionali „Android“ muzikos leistuvė. Muzikos įkėlimas Peržiūrėkite ir valdykite muzikos įrašo perklausą @@ -58,7 +58,7 @@ Singlas Atlikėjas Nežinomas žanras - Nėra datos + Be datos Raudona Violetinė Mėlyna @@ -78,7 +78,7 @@ „ReplayGain“ strategija Singlai Gerai - Įjunk suapvalintų kampų papildomiems naudotojo sąsajos elementams (reikia, kad albumo viršeliai būtų suapvalinti). + Įjungti suapvalintų kampų papildomuose NS elementuose (privaloma, kad albumo viršeliai būtų suapvalinti). Garso takelis Garso takeliai Garsas @@ -115,7 +115,7 @@ Gyvai albumas Remikso albumas Gyvai - Visada pradėk leisti, kai ausinės yra prijungtos (gali neveikti visuose įrenginiuose). + Visada pradėti leisti, kai ausinės prijungtos (gali neveikti visuose įrenginiuose). Ogg garsas Aleksandras Keiphartas (angl. Alexander Capehart) Pageidauti takelį @@ -125,11 +125,11 @@ Praleisti į paskutinę dainą Mikso juosta Mikso juostos - Bibliotekos skirtukai - Keisk bibliotekos skirtukų matomumą ir tvarką. + Bibliotekos kortelės + Keiskite bibliotekos kortelių matomumą ir tvarką. Pageidauti albumą Pageidauti albumą, jei vienas leidžiamas - Programos nerasta, kuri galėtų atlikti šią užduotį. + Programos nerasta, kuri galėtų apdoroti šią užduotį. „Auxio“ piktograma Perkelti šią dainą Perkelti šią kortelę @@ -143,9 +143,9 @@ Rinkiniai Rinkinys Prisiminti maišymą - Palik maišymą įjungtą, kai groja nauja daina. + Laikyti maišymą įjungtą, kai leidžiama nauja daina. Persukti prieš praleidžiant atgal - Persuk atgal prieš praleidžiant į ankstesnę dainą. + Persukti atgal prieš praleidžiant į ankstesnę dainą. Pauzė ant kartojimo Kai leidžiant iš bibliotekos Kai leidžiant iš elemento informacijos @@ -153,10 +153,10 @@ Žanras Ieškokite savo bibliotekoje… Ekvalaizeris - Automatinis perkėlimas + Automatinis įkėlimas iš naujo Stabdyti įrašo perklausą - Nėra takelio - Praleisti į kitą + Be takelio + Praleisti į sekančią Automatinis ausinių leidimas Kartojimo režimas Atverti eilę @@ -167,25 +167,25 @@ Leisti iš albumo Leisti iš atlikėjo %d Hz - Perkelk muzikos biblioteką, kai ji pasikeičia (reikia nuolatinio pranešimo). + Įkelti iš naujo muzikos biblioteką, kai ji pasikeičia (privalomas nuolatinis pranešimas). Įkeltos dainos: %d - Įkeltos žanros: %d + Įkelti žanrai: %d Įkelti albumai: %d Įkelti atlikėjai: %d - Įkeliama jūsų muzikos biblioteka… (%1$d/%2$d) + Įkeliama jūsų muzikos biblioteka… (%1$d / %2$d) Suasmeninti Įspėjimas: keičiant išankstinį stiprintuvą į didelę teigiamą reikšmę, kai kuriuose garso takeliuose gali atsirasti tarpų. Albumo viršelis, skirtas „%s“ - Atlikėjo vaizdas, skirtas „%s“ - Nėra leidžiamos muzikos - Sustabdyk, kai daina kartojasi. + Atlikėjo vaizdas, skirtas %s + Nėra leidžiama muzika + Pristabdyti, kai daina kartojasi. Turinys Muzikos šaltiniai Atnaujinti muziką - Įkelkite iš naujo muzikos biblioteką, naudojant podėlio žymes, kai įmanoma. + Įkelti iš naujo muzikos biblioteką, naudojant podėlio žymes, kai įmanoma. Pasirinktinis įrašo perklausos juostos veiksmas „ReplayGain“ išankstinis stiprintuvas - Tvarkykite, kur muzika turėtų būti įkeliama iš. + Tvarkykite, iš kur turėtų muzika būti įkeliama. Žanro vaizdas, skirtas „%s“ Įjungti arba išjungti maišymą %d takelis @@ -201,20 +201,20 @@ Pliusas (+) Ampersandas (&) Albumų viršeliai - Išjungta - Greita - Konfigūruok simbolius, kurie nurodo kelias žymių reikšmes. + Išjungtas + Subalansuotas + Konfigūruokite simbolius, kurie nurodo daugybę žymių reikšmių. Kablelis (,) Koreguoti be žymių Įspėjimas: naudojant šį nustatymą, kai kurios žymes gali būti neteisingai interpretuojamos kaip turinčios kelias reikšmes. Tai galima išspręsti prieš nepageidaujamus skiriamuosius ženklus su agalinių brūkšniu (\\). Kabliataškis (;) Aukštos kokybės Neįtraukti nemuzikinių - Ignoruok garso failus, kurie nėra muzika, tokius kaip tinklalaides. + Ignoruoti garso įrašų failus, kurie nėra muzika, tokius kaip tinklalaides. Išankstinis stiprintuvas taikomas esamam koregavimui įrašo perklausos metu. Koreguoti su žymėmis Slėpti bendradarbius - Rodyk tik tuos atlikėjus, kurie yra tiesiogiai įvardyti į albumą (geriausiai veikia gerai pažymėtose bibliotekose). + Rodyti tik atlikėjus, kurie yra tiesiogiai įvardyti albume (geriausiai veikia gerai pažymėtose bibliotekose). %d atlikėjas %d atlikėjai @@ -222,25 +222,25 @@ %d atlikėjų Perskenuoti muziką - Išvalykite žymių podėlį ir pilnai įkelkite iš naujo muzikos biblioteką (lėčiau, bet labiau užbaigta). + Išvalyti žymių podėlį ir pilnai įkelti iš naujo muzikos biblioteką (lėčiau, bet labiau užbaigta). %d pasirinkta Leisti iš žanro Viki %1$s, %2$s Atkurti Biblioteka - Elgesys + Elgsena Pakeiskite programos temą ir spalvas. - Valdyk, kaip muzika ir vaizdai įkeliami. - Konfigūruok garso ir įrašo perklausos elgesį. - Pritaikyk naudotojo sąsajos valdiklius ir elgseną. + Valdykite, kaip muzika ir vaizdai yra įkelti. + Konfigūruokite garso ir įrašo perklausos elgseną. + Tinkinkite NS valdymo elementus ir elgseną. Muzika Vaizdai Įrašo perklausa Garsumo normalizavimas Mažėjantis - Teisingai surūšiuok pavadinimus, kurie prasideda skaičiais arba žodžiais, tokiais kaip „the“ (geriausiai veikia su anglų kalbos muzika). - Išmanusis rūšiavimas + Teisingai surikiuoti pavadinimus, kurie prasideda skaičiais arba žodžiais kaip „the“ (geriausiai veikia su anglų kalbos muzika). + Išmanusis rikiavimas Grojaraštis Grojaraščiai Grojaraščio vaizdas, skirtas „%s“ @@ -248,7 +248,7 @@ Įtraukti į grojaraštį Įtraukta į grojaraštį Ištrinti - Ištrinti %s\? To negalima atkurti. + Ištrinti „%s“? To negalima atkurti. Pervadinti Pervadinti grojaraštį Ištrinti grojaraštį\? @@ -259,12 +259,12 @@ %d grojaraštis Grojaraštis sukurtas Grojaraštis ištrintas - Nėra disko + Be disko Redaguojama „%s“ Pasirodo Daina Peržiūrėti - Apkarpyk visus albumų viršelius iki 1:1 kraštinių koeficiento. + Apkarpyti visus albumų viršelius iki 1:1 kraštinių koeficiento. Priversti kvadratinių albumų viršelius Leisti dainą pačią Rikiuoti pagal @@ -281,8 +281,8 @@ Grojaraštis importuotas Grojaraštis eksportuotas Nepavyksta eksportuoti grojaraščio į šį failą. - „ReplayGain“ takelio koregavimas - „ReplayGain“ albumo koregavimas + „ReplayGain“ takelio priderinimas + „ReplayGain“ albumo priderinimas Autorius Aukoti Palaikytojai @@ -299,14 +299,14 @@ Santykinis Naudoti „Windows“ suderinamus kelius Prisiminti pauzę - Išlaikykite leidžiamą / pristabdymą praleidžiant arba redaguojant eilę. + Išlaikyti leidžiamą / pristabdymą praleidžiant arba redaguojant eilę. Išjungta - Paleidžia „Auxio“ naudojant anksčiau išsaugotą būseną. Jei nėra išsaugotos būsenos, visos dainos bus išmaišytos. Įrašo perklausa bus pradėta iš karto. \n \nĮSPĖJIMAS: būkite atsargūs valdant šią paslaugą, jei ją uždarysite ir vėl bandysite naudoti, tikriausiai sutriks programa. + Paleidžia „Auxio“ naudojant anksčiau išsaugotą būseną. Jei nėra išsaugotos būsenos, visos dainos bus išmaišytos. Įrašo perklausa bus pradėta iš karto. \n \nĮSPĖJIMAS: būkite atsargūs valdydami šią paslaugą, jei ją užversite ir vėl bandysite naudoti, tikriausiai sutriks programa. Pradėti įrašo perklausą Daugiau Atsiliepimai Sukurti problemą platformoje „GitHub“ - MPEG-4, turintis %s + MPEG-4, turintis kodeką %s Nežinomas albumas Čia bus rodomos jūsų dainos. Čia bus rodomi jūsų albumai. @@ -319,11 +319,11 @@ Išsaugoti vietos Kaip yra Įtraukti paslėptus failus - Įtraukite garso failus, kurie paslėpti (pvz., .cache) + Įtraukti garso įrašų failus, kurie paslėpti (pvz., .cache). Neįtraukti aplankai - Tvarkykite aplankus, kuriuos norite neįtraukti iš muzikos įkėlimo. + Tvarkykite aplankus, kuriuos neįtraukti į muzikos įkėlimą. Įkelkite muziką iš jūsų pasirinktų aplankų. Lėtesnis, bet patikimesnis. Reikia įdiegti pagrindinę failų tvarkytuvės programą. - Įkelkite muziką, kurią „Android“ operacinė sistema automatiškai aptinka. Spartesnis, bet mažiau patikimas. Gamintojai gali tai sugadinti. + Įkelkite muziką, kurią „Android“ operacinė sistema automatiškai aptinka. Spartesnis, bet mažiau patikimas. Nepalaiko failų sistemos priklausomų funkcijų kaip cover.jpg. Suteikus išorinės saugyklos leidimus, kai kuriuose įrenginiuose galima ištaisyti problemas. Suteikite išorinės saugyklos leidimus, kad įjungtumėte šią parinktį. Muzika, esanti už pasirinktų aplankų, bus ignoruojama. @@ -331,7 +331,7 @@ Įkelti iš Failų parinkiklio Sistemos - Saugyklos prieiga rekomenduojama + Saugyklos prieiga rekomenduotina Saugyklos prieiga privaloma Aplankus įkelti Aplankus ignoruoti diff --git a/app/src/main/res/values-mr/strings.xml b/app/src/main/res/values-mr/strings.xml new file mode 100644 index 000000000..bc153f788 --- /dev/null +++ b/app/src/main/res/values-mr/strings.xml @@ -0,0 +1,11 @@ + + + गाणे लोड होत आहे + गाणे लोड करत आहे + पुन्हा प्रयत्न करा + गाणी + गाणे + सर्व गाणी + अल्बम्स + अल्बम + diff --git a/app/src/main/res/values-nn/strings.xml b/app/src/main/res/values-nn/strings.xml index c839db0b2..2f19d7aaa 100644 --- a/app/src/main/res/values-nn/strings.xml +++ b/app/src/main/res/values-nn/strings.xml @@ -60,7 +60,7 @@ Lengd Songtal Platetal - Dato tillagt + Dato lagt til Spelar no Tonekontroll Spel @@ -75,11 +75,11 @@ ReplayGain-albumjustering Bland Avbryt - Tilbakestill + Attstill Meir Banestil Relativ - Nytt Windows-kompatible baner + Nøyt Windows-kompatible baner Om Utgåve Samlingsstatistikk @@ -112,7 +112,7 @@ Fallande Utviklar Utval - Feilopplysningar + Feilopplysingar La til i speleliste Albumomslag for %s Opprett ei sak på GitHub @@ -120,10 +120,10 @@ Doner Støttespelarar Syn og kontroller musikkavspeling - Held auga med endringar i musikksamlinga di… + Held auga med brigdingar i musikksamlinga di… La til i køen Speleliste importert - Namn på speleliste endra + Namn på speleliste brigdt Speleliste eksportert Spelelista vart sletta Doner til prosjektet, så skal namnet ditt leggjast til her! @@ -133,7 +133,7 @@ Automatisk Fargedrakt Svart drakt - Nytt ei heilsvart mørk drakt + Nøyt ei heilsvart mørk drakt Avrunda hjørne Slå på avrunda hjørne på fleire grensesnittselement (krev at albumomslag er òg avrunda) Skjerm @@ -163,12 +163,12 @@ Høg kvalitet Raskt Påtving firkanta albumomslag - Beskjer alle albumomslag til 1:1-sideforhold + Avskjer alle albumomslag til 1:1-sideforhold Still inn ljod- og avspelingsåtferd Avspeling Automatisk avspeling med hovudsett Spol att før spor vert hoppa over - Spol att før Auxio hoppar til forrige song + Spol att før Auxio hoppar til førre song Pause ved gjentaking Hugs pausemodus Vert spelande/pausa ved sporbytting eller købrigding @@ -178,8 +178,8 @@ Føretrekk spor Føretrekk album Føretrekk album om eit album vert avspela - ReplayGain-forforsterkning - Forforsterkning vert nytta på justeringa allereie teken i bruk under avspeling + ReplayGain-forforsterking + Førestyrkjing vert nøytt på justeringa allereie teken i bruk under avspeling Justering med etikettar Justering utan etikettar Samling @@ -187,7 +187,7 @@ Gjenoppfrisk musikk Kan ikkje importere ei speleliste frå denne fila Hopp til neste song - Endre gjentakingsmodus + Brigd gjentakingsmodus Slå på/av blanding Opne køen Albumomslag @@ -221,38 +221,38 @@ %d artist %d artistar - Gje tilbakemelding + Gjev attmelding Lastar inn musikksamlinga di… Speleliste oppretta - Startar Auxio med den forrige lagra tilstanden. Dersom ingen lagra tilstand er tilgjengeleg, skal alle songar blandast. Avspeling byrjar med éin gong.\n\nÅTVARING: Ver varsom med å kontrollere denne tenesta, om du lukkar ho og så prøver å nytte ho att, skal det nok få appen til å krasje. + Startar Auxio med den førre lagra tilstanden. Dersom ingen lagra tilstand er tilgjengeleg, skal alle songar blandast. Avspeling byrjar med éin gong.\n\nÅTVARING: Ver varsam med å styre denne tenesta; om du lèt ho att og så prøver å nøyte ho att, skal det nok få appen til å krasje. Innstillingar - Endre drakta og programfargane + Brigd drakta og programfargane Ljos Mørk Tilpass Tilpass grensesnittskontrollar og åtferd Eigendefinert avspelingsfelthandling Eigendefinert merknadshandling - Endre synlegleik og rekkjefylgje på samlingsfaner + Brigd synlegdom og rekkjefylgje på samlingsfaner Spel frå synt element Ved avspeling frå elementsdetaljar Spel frå alle songar Spel frå artist Kontroller korleis musikk og bilete vert innlasta - Last inn musikksamlinga på nytt når ho vert endra (krev vedvarande varsel) + Last inn musikksamlinga på nytt når ho vert brigd (krev vedvarande varsel) Varetak blanding når ein ny song vert spela Ignorer ljodfiler som ikkje er musikk, som t.d. podkastar Semikolon (;) Skråstrek (/) Plussteikn (+) - Ampersand (&) + Og-teikn (&) Åtvaring: Om dette valet er påslege, kan enkelte etikettar verte feiltolka som om dei har fleire verdiar. Dette kan løysast ved å leggje ein omvend skråstrek (\\) bak skiljeteiknet som ikkje skal skilja verdiar. Ljod - Alltid byrj avspeling når hovudtelefonar vert tilkopla (verkar kanskje ikkje på alle einingar) + Byrja alltid avspeling når hovudtelefonar vert kopla til (fungerer kanskje ikkje på alle einingar) Pause når ein song vert gjenteken - Åtvaring: Å endre forforsterkninga til høge positive verdiar kan valde forvrenging ved høge ljodtrykk på nokre spor. + Åtvaring: Å brigde førestyrkinga til høge positive verdiar kan valde forvrenging ved høge ljodtrykk på nokre spor. Musikkkjelder - Last inn musikksamlinga på nytt og nytt hurtiglagra etikettar når mogleg + Last inn musikksamlinga på nytt og nøyt hurtiglagra etikettar når mogleg Skann musikk på nytt Tøm etiketthurtiglager og last inn heile musikksamlinga på nytt (tregare, men meir fullstendig) Artistbilete for %s @@ -265,7 +265,7 @@ Spor %d Fjern denne songen Flytt denne songen - Hopp til forrige song + Hopp til førre song Stopp avspeling Flytt denne fana Tøm søket @@ -308,13 +308,13 @@ Dine sjangrar skal dukke opp her. Dine spelelister skal dukke opp her. Last inn musikk frå mappene som du vel. Tregare, men meir påliteleg. Krev at den standard filhandsamarapplikasjonen er installert. - Last inn musikk som Android-operativsystemet oppdagar sjølvverkande. Snøggare, men mindre påliteleg. Ingen støtte for filsystemavhengige funksjonar som cover.jpg. + Last inn musikk som Android-operativsystemet oppdagar sjølvverkande. Snøggare, men mindre påliteleg. Inga stytte for filsystemsavhengige funksjonar som cover.jpg. Det å løyve tilgang til ekstern lagring på nokre einingar kan fikse feil. Løyv tilgang til ekstern lagring for å slå på dette valet. Musikk utanfor dei valde mappene skal ignorerast. Musikk innanfor dei valde mappene skal ignorerast. - Inkluder løynde filer - Inkluder ljodfiler som er løynde (t.d. .cache) + Tak med løynde filer + Tak med ljodfiler som er løynde (t.d. .cache) Spar lagringsplass Ubrigda Last inn frå @@ -326,13 +326,13 @@ Mapper som skal ignorerast Filtrerte mapper Filtreringsmodus - Inkluder - Ekskluder + Tak med + Lat ut Fleire innstillingar - Nytt filsystemets hurtiglagring + Nøyt filsystemets hurtiglagring Betrar innlastingsfarta, men kan forhindre at ny musikk dukkar opp - Ekskluderte mapper - Handsam mapper som skal ekskluderast frå musikkinnlasting + Utelatne mapper + Handsam mapper som skal latast ut frå musikkinnlasting Ingen mapper Legg til mappe Ukjent album diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 3479d95df..0ed966b7a 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -246,26 +246,26 @@ %1$s, %2$s Muzyka Malejąco - Playlisty + Listy odtwarzania Playlista - Obraz playlisty %s + Obraz listy odtwarzania dla %s Inteligentne sortowanie Ignoruj słowa takie jak „the” oraz liczby w tytule podczas sortowania (działa najlepiej z utworami w języku angielskim) Nowa playlista - Dodaj do playlisty + Dodaj do listy odtwarzania Utworzono playlistę Brak utworów - Dodano do playlisty + Dodano do listy odtwarzania Playlista %d Usuń Usunąć %s\? Tego nie da się cofnąć. Zmień nazwę - Zmień nazwę playlisty + Zmień nazwę listy odtwarzania Usunąć playlistę\? Edytuj Pojawia się na Udostępnij - Zmieniono nazwę playlisty + Zmieniono nazwę listy odtwarzania Usunięto playlistę Brak nr. płyty Edytowanie %s @@ -277,7 +277,7 @@ Sortuj według Kierunek Brak albumów - Zaimportowane playlisty + Zaimportowane listy odtwarzania Importuj Zgłoś Relatywna @@ -302,14 +302,14 @@ Dema Więcej Uruchamia Auxio z użyciem poprzednio zapisanego stanu. Jeśli nie zapisano poprzedniego stanu, wszystkie utwory będą odtwarzane w losowej kolejności. Odtwarzanie rozpocznie się natychmiast.\n\nUWAGA: Zachowaj ostrożność przy korzystaniu z tej opcji. Jeśli ją zamkniesz, a następnie spróbujesz ponownie z niej skorzystać, aplikacja może się zawiesić. - Nie udało się wyeksportować playlisty do tego pliku + Nie udało się wyeksportować listy odtwarzania do tego pliku Dopasowanie głośności utworu (ReplayGain) Dopasowanie głośności albumu (ReplayGain) Wesprzyj projekt darowizną, aby Twoje imię pojawiło się tutaj! Pozostań w trakcie odtwarzania/zatrzymania podczas pomijania lub edytowania kolejki Zapamiętaj pauzę Zacznij odtwarzanie - Nie udało się zaimportować playlisty z tego pliku + Nie udało się zaimportować listy odtwarzania z tego pliku Używaj ścieżek kompatybilnych z Windows Wyślij e-maila Informacja zwrotna @@ -322,7 +322,7 @@ Tutaj pojawią się dodane utwory. Tutaj pojawią się dodane albumy. Tutaj pojawią się dodani artyści. - Tutaj pojawią się dodane playlisty. + Tutaj pojawią się dodane listy odtwarzania. Tutaj pojawią się dodane gatunki. Utwór zostanie odtworzony jako następny Załaduj muzykę z wybranych folderów. Wolniejsze, ale bardziej niezawodne. Wymaga zainstalowania standardowej aplikacji do zarządzania plikami. @@ -333,7 +333,7 @@ Muzyka znajdująca się w wybranych folderach zostanie pominięta. Uwzględniaj ukryte pliki Uwzględniaj pliki audio, które są ukryte (np. .cache) - Jako + Bez zmiany Ładuj z Selektor plików System diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index a3bebbf04..04678cc37 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -1,7 +1,7 @@ - Reîncercați + Reîncearcă Genuri Artiști Albume @@ -12,15 +12,15 @@ Toate Sortează Crescător - Redă - Amestecare + Redare + Redare aleatorie În curs de redare - Lista de așteptare + Coada de redare Redă următoarea - Adăugați la lista de așteptare - A fost adăugat la lista de așteptare + Adaugă în coada de redare + Adăugat în coada de redare Mergi la artist - Accesați albumul + Mergi la album Despre Versiune Cod sursă @@ -68,7 +68,7 @@ %d de albume Durată totală: %s - Un player de muzică simplu și rațional pentru android. + Un player muzical simplu și rațional pentru Android. Album live Album cu remixuri Single live @@ -88,11 +88,11 @@ Compilații de remixuri EP-uri Amestecă-le pe toate - Bine + OK Anulează Disc - Vezi proprietăți - Data + Afișează proprietățile + Dată Mix Mixuri Piesă @@ -103,7 +103,7 @@ Data adăugării Format Proprietățile cântecului - Amestecare + Aleator Frecvența de eșantionare Salvează Gen @@ -131,23 +131,23 @@ Descrescător Treceți la următoarea Redă de la artist - Redă din genul + Redă după gen Resetează Wiki - Vizualizați și controlați redarea muzicii + Vizualizează și controlează redarea muzicii Schimbă vizibilitatea și ordinea taburilor din bibliotecă Taburi din bibliotecă Nu uita de shuffle Redă din toate melodiile - În timpul redării din bibliotecă - Redă de la articolul afișat + Când redai din bibliotecă + Redă din elementul afișat Conținut Acțiune de notificare personalizată Menține funcția shuffle activată la redarea unei melodii noi Personalizarea acțiunii bării de redare Modul de repetare Redă din album - În timpul redării de la detaliile articolului + Când redai din detaliile elementului Comportament Listă de redare nouă Ignoră fișiere audio care nu sunt muzică, precum podcasturi @@ -164,35 +164,35 @@ Redenumiți Controlează cum muzica și imaginile sunt încărcate Sortează după - Sortare corectă pentru nume care incep cu numere sau cuvinte precum \"the\" (funcționează cel mai bine cu melodii în limba engleză) + Sortează corect numele care încep cu numere sau cuvinte precum \"The\" (funcționează cel mai bine pentru muzica în limba engleză) Forțează coperți de album pătrate Rapid Calitate mare Punct și virgulă (;) Editează Exclude non-muzică - Adaugat către lista de redare + Adăugată în lista de redare Reîncărcare automată Virgulă (,) Reîncărcați biblioteca de muzică oricând se schimbă (Necesită notificare persistentă) Imagini Apare în - Partajați + Partajează Listă de redare redenumită Listă de redare ștearsă Coperți de album - Adaugă către listă de redare + Adaugă la lista de redare Direcție Fără dată Playlist gol Atenție: Folosirea acestei setări poate rezulta în unele taguri interpretate greșit ca având mai multe valori. \nPoți rezolva asta punând un backslash (\\) înaintea caracterelor de separare nedorite. Pornește mereu redarea când niște căști sunt conectate (s-ar putea să nu meargă pe toate dispozitivele) - Re-scanează muzica + Rescanează muzica Șterge memoria cache cu taguri și reîncarcă biblioteca de muzică de tot (mai încet, dar mai complet) Cântece încărcate %d Bleu - Nu se redă muzică + Nicio melodie redată Ștergi %s? Nu te poți răzgândi după aceea. Artiști încărcați: %d Playlist importat @@ -202,12 +202,12 @@ %d artiști %d de artiști - Arată doar artiști care sunt creditați direct pe albun (Funcționează mai bine pe bibloteci cu taguri puse bine) + Afișează doar artiștii creditați direct pe un album (funcționează cel mai bine pentru colecțiile cu etichetare corectă) Dosarul ăsta nu e suportat Copertă album Bibliotecă Slash (/) - Deschide lista de așteptare + Deschide coada de redare Imagine gen pentru %s Imagine playlist pentru %s Artist necunoscut @@ -220,7 +220,7 @@ Donează Playlist exportat Donează proiectului ca să ai numele adăugat aici! - Redă automat la conectarea căștilor + Redare automată la conectarea căștilor N-a fost găsită nicio aplicație care poate face asta Se editează %s Discul %d @@ -228,7 +228,7 @@ Genuri încărcate: %d Redare Pauză la repetare - Configurează comportamentul sunetului și redării + Configurează sunetul și comportamentul redării Fără track Configurează de unde se încarcă muzica Reîncarcă muzica @@ -249,15 +249,18 @@ Informații despre eroare Copiat Raportează - Redă cântecul fără să facă parte din nicio listă + Redă doar melodia Pune pauză atunci când un cântec se repetă Încărcarea muzicii a eșuat Mută acest cântec - Pornește sau oprește amestecarea + Activează sau dezactivează redarea aleatorie Oprește redarea Elimină acest cântec Exportă Exportă playlistul Importă Nu se poate importa un playlist din acest fișier - \ No newline at end of file + Vizualizează + Sistem + Încarcă muzica detectată automat de sistemul de operare Android. Este mai rapid, dar mai puțin fiabil. Nu suportă funcții dependente de sistemul de fișiere, cum ar fi cover.jpg. + diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index c790eee7a..3e0b7379d 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -1,9 +1,7 @@ - + - Простой и рациональный музыкальный проигрыватель. Настройки воспроизведения - Повторить попытку Жанры Исполнители @@ -37,7 +35,6 @@ Исходный код Лицензии Разработано Александром Кейпхартом - Настройки Внешний вид Тема @@ -71,13 +68,10 @@ Библиотека Обновить музыку Обновлять библиотеку, при возможности используя кэш тегов - Ошибка чтения библиотеки Нет приложений для открытия данной ссылки Эта папка не поддерживается - Найти в библиотеке… - Трек %d Играть или остановить Перейти к следующему треку @@ -94,12 +88,10 @@ Обложка альбома %s Фото исполнителя %s Картинка жанра %s - Неизвестный исполнитель Неизвестный жанр Дата не указана Музыка не играет - Красный Розовый Пурпурный @@ -116,7 +108,6 @@ Оранжевый Коричневый Серый - Композиций загружено: %d %d трек @@ -332,14 +323,14 @@ Показывать скрытые аудио (например, те, что в .cache) Как есть Следующая песня - Загрузить музыку из выбранных вами папок. Медленнее, но более надёжно. Для этого требуется установленный стандартный файловый менеджер. - Загрузить музыку, которую автоматически обнаруживает ОС Android. Быстрее, но менее надёжно. Не поддерживаются функции, зависящие от файловой системы, такие как cover.jpg. + Загружать музыку из выбранных папок. Медленнее, но более надёжно. Для этого требуется установленный стандартный файловый менеджер. + Загружать музыку, которую ОС Android обнаруживает автоматически. Быстрее, но менее надёжно. Не поддерживаются функции, зависящие от файловой системы, такие как cover.jpg. Предоставление разрешения на доступ к внешнему хранилищу может решить проблемы на некоторых устройствах. Предоставьте разрешение на доступ к внешнему хранилищу, чтобы включить эту опцию. Музыка, находящаяся вне выбранных папок, будет проигнорирована. Музыка из выбранных папок будет проигнорирована. - Загрузить из - Выбор файла + Загружать из + Выбор Рекомендуется предоставить доступ к хранилищу Требуется доступ к хранилищу Папки для загрузки diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 0ba5a8dbe..3f18eced4 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -8,17 +8,17 @@ Şarkılar Bütün Şarkılar Ara - Süz + Filtrele Hepsi - Sıralama + Sırala Artan Çal - Karıştır + Karışık Çal Şu an çalan - Kuyruk - Sonraki şarkı - Kuyruğa ekle - Kuyruğa eklendi + Çalma Sırası + Sırada çal + Çalma sırasına ekle + Çalma sırasına eklendi Sanatçıya git Albüme git Hakkında @@ -27,32 +27,32 @@ Lisanslar Ayarlar - Dış görünüş + Arayüz görünüşü Tema Otomatik Açık Koyu Ana Renk Ses - Tercihler + Kişiselleştir Kitaplığınız taranıyor… Parça %d - Çal veya Durdur + Çal veya durdur %d şarkı - %d şarkılar + %d şarkı %d albüm - %d albümler + %d albüm Özellikleri görüntüle Şarkı özellikleri - Biçim + Format Karıştır Hepsini karıştır Tamam @@ -90,8 +90,8 @@ Tüm şarkılardan çal Albümden çal Müzik kaynakları - %s Albümünün kapağı - %s Sanatçısının resmi + %s albümünün kapağı + %s sanatçısının resmi Parça yok İleri Düzeyde Ses Kodlama (AAC) Bağımsız Kayıpsız Ses Kodlama (FLAC) @@ -101,7 +101,7 @@ Koyu mor Yeşil Koyu yeşil - Kireç + Misket limonu Sarı Turuncu Kitaplıktan çalarken @@ -111,7 +111,7 @@ Yüklenen türler: %d %d Hz Müzik çalmıyor - %s Türünün resmi + %s türünün resmi Bilinmeyen tür Bilinmeyen sanatçı MPEG-1 Ses @@ -129,14 +129,14 @@ Müzik kitaplığınız yükleniyor… (%1$d/%2$d) Yüklenen şarkılar: %d Yüklenen albümler: %d - Özel bildirim eylemi + Bildirim eylemi Çalan bir albüm varsa tercih et Kulaklıkta otomatik çalma Bir kulaklık takıldığında müzik çalmaya başlar (bütün cihazlarda çalışmayabilir) Parçayı tercih et Albümü tercih et - Geri atlamadan önce geriye sar - Önceki şarkıya atlamadan önce geri sar + Öncekine geçmeden önce başa sar + Önceki şarkıya geçmeden önce şimdiki şarkıyı başa sar Bir şarkı tekrarlandığında duraklat İçerik Karıştırmayı hatırla @@ -145,7 +145,7 @@ Mümkün olduğunda önbelleğe alınmış etiketleri kullanarak müzik kitaplığını yeniden yükleyin Bu klasör desteklenmiyor Sonraki şarkıya geç - Son şarkıya geç + Önceki şarkıya geç Tekrarlama modunu değiştir Müzik yüklemesi başarısız oldu Bu görevi yerine getirebilecek bir uygulama bulunamadı @@ -154,7 +154,7 @@ Auxio simgesi Bu sekmeyi taşı Albüm kapağı - Arama sorgusunu temizle + Arama geçmişini temizle Müziğin nereden yükleneceğini yönetin Tarih yok Koyu mavi @@ -169,9 +169,9 @@ Otomatik yeniden yükleme Müzik kitaplığı her değiştiğinde yeniden yükleyin (kalıcı bildirim gerektirir) Eklendiği tarih - Remix albüm + Remiks albüm Canlı albüm - Bu şarkıyı kuyruktan kaldır + Bu şarkıyı çalma sırasından kaldır Tekliler Tekli Karışık kaset @@ -193,19 +193,19 @@ Remiksler Film Müzikleri Film Müziği - Yüksek kaliteli + Yüksek kalite Katılımcaları gizleyin Yalnızca bir albümde doğrudan adı geçen sanatçıları gösterin (iyi etiketlenmiş kütüphanelerde en iyi sonucu verir) Albüm kapakları Kapalı - Hızlı + Dengeli %d Seçili %d sanatçı - %d sanatçılar + %d sanatçı DJ Miksleri - DJ Mix + DJ Miksi Etiket önbelleğini temizleyin ve müzik kitaplığını tamamen yeniden yükleyin (daha yavaş, ancak daha eksiksiz) Çok değerli ayırıcılar Birden fazla etiket değerini ifade eden karakterleri yapılandırın @@ -214,19 +214,19 @@ Artı (+) Ve (&) Çalmayı durdur - Viki + Wiki Müzikleri yeniden tara - Özel çalma çubuğu eylemi + Çalma çubuğu eylemi Sonrakine geç Eğik çizgi (/) - Kuyruğu aç - Tekrar kipi + Çalma sırasını aç + Tekrarla Türden çal Podcast\'ler gibi müzik olmayan ses dosyalarını yok say - Uyarı: Bu ayarın kullanılması bazı etiketlerin yanlışlıkla birden fazla değere sahip olarak yorumlanmasına neden olabilir. Bunu, istenmeyen ayırıcı karakterlerin önüne ters eğik çizgi (\\) koyarak çözebilirsiniz. + Uyarı: Bu ayarın kullanılması bazı etiketlerin yanlışlıkla birden fazla değere sahip olarak yorumlanmasına neden olabilir. Bunu istenmeyen ayırıcı karakterlerin önüne ters eğik çizgi (\\) koyarak çözebilirsiniz. Müzik olmayanları hariç tut ReplayGain yöntemi - Bu şarkıyı kuyrukta taşı + Bu şarkıyı çalma sırasında taşı %1$s, %2$s Müzik ve görüntülerin nasıl yükleneceğini denetleyin Müzik @@ -238,23 +238,23 @@ Uygulamanın temasını ve renklerini değiştirin Arayüz kontrollerini ve davranışını özelleştirin Davranış - Ses normaleştirmesi - %s için oynatma listesi resmi - oynatma listesi - çalma listeleri - Sıralama yaparken makaleleri yoksay - Ada göre sıralarken \"the\" gibi kelimeleri yok sayın (en iyi ingilizce müzikle çalışır) - Yeni Oynatma Listesi + Ses normalleştirmesi + %s için çalma listesi resmi + Çalma Listesi + Çalma Listeleri + Akıllı sıralama + Sıralama yaparken \"the\" gibi kelimeleri yok sayın (en iyi ingilizce müzikle çalışır) + Yeni çalma listesi Sil Yeniden Adlandır - Oynatma Listesini Yeniden Adlandır - Oynatma listesini silmek istiyor musun\? + Çalma listesini yeniden adlandır + Çalma listesini silmek istiyor musun? Yön Seçim görüntüsü Seçim Şarkıyı kendi kendine çal Çalma listesi %d - Oynatma listesi oluşturuldu + Çalma listesi oluşturuldu Disk yok Kopyalandı Çalma listesine ekle @@ -262,9 +262,9 @@ Düzenle Çalma listesine eklendi Şarkı yok - Tüm albüm kapaklarını 1:1 en boy oranına kırp + Tüm albüm kapaklarını 1:1 en boy oranında kırp %s düzenleniyor - Göre sırala + Sıralama kriteri Görünüm Şarkı Çalma listesi silindi @@ -275,39 +275,39 @@ %s silinsin mi\? Geri alınamaz. Üzerinde görünür Albüm yok - Oynatma listesini dışa aktar + Çalma listesini dışa aktar Denemeler - ReplayGain albüm ayarlaması + ReplayGain Albüm Ayarlaması Dosya yolu biçimi Yakın Kesin - Oynatma listesi içe aktarıldı - Oynatma listesi dışa aktarıldı + Çalma listesi içe aktarıldı + Çalma listesi dışa aktarıldı Destekçiler İsminizin buraya eklenmesi için projeye bağış yapabilirsiniz! Durmayı hatırla - Şarkı durduğunda sonraki şarkılara geçildiği zaman ve ya şarkı kuyruğunu düzenlerken durmaya devam et + Şarkı durduğunda sonraki şarkılara geçildiği zaman veya çalma sırasını düzenlerken durmaya devam et Kapalı - Bu dosyadan bir oynatma listesi yüklenemiyor + Bu dosyadan bir çalma listesi yüklenemiyor Bilinmeyen biçim - İçe aktarılmış oynatma listesi + İçe aktarılmış çalma listesi Bilimeyen albüm Deneme Albümleriniz burada gösterilecek. - Oynatma listeleriniz burada gösterilecek. + Çalma listeleriniz burada gösterilecek. Türleriniz burada gösterilecek. - ReplayGain parça ayarlaması + ReplayGain Parça Ayarlaması Yazar Bağış yap - Oynatma listesi aktar - Boş oynatma listesi + Çalma listesini içeri aktar + Boş çalma listesi Dosya yolu Dışa aktar İçe aktar Daha fazla Sanatçılarınız burada gösterilecek. Şarkılarınız burada gösterilecek. - Oynatmayı başlat + Çalmayı başlat Windows uyumlu yollar kullan Auxio\'yu önceden kaydedilen durumla başlatır. Eğer kayıtlı bir durum yoksa bütün şarkılar hemen karışık olarak çalmaya başlanacak.\n\nUYARI: Bu servisi kullanırken dikkatli olun. Kapatırsanız ve sonra tekrar kullanmaya çalışırsanız muhtemelen uygulamayı çökertirsiniz. Az alan kullan @@ -316,14 +316,14 @@ Geri bildirim E-posta yolla Github\'da rapor aç - Bu dosyaya bir oynatma listesi aktarılamıyor + Bu dosyaya bir çalma listesi aktarılamıyor Gizli dosyaları içer Gizli olan ses dosyalarını içer (örn. .cache) Olduğu gibi Müzik yüklemesinde sayılmayacak klasörleri yönet - Sayılmayan klasörler + Görmezden gelinen klasörler Şarkı bundan sonra başlayacak - Şeçtiğiniz klasörlerden müzik yükler. Daha yavaştır fakat daha güvenilirdir. Standart dosya yönetici uygulamasının kurulu olması gerekir. + Seçtiğiniz klasörlerden müzik yükler. Daha yavaştır fakat daha güvenilirdir. Standart dosya yönetici uygulamasının kurulu olması gerekir. Android\'in otomatik olarak tespit ettiği müzikleri yükler. Daha hızlıdır fakat daha az güvenilirdir. Dosya sistemine bağımlı özellikleri desteklemez. Mesela, cover.jpg. Dış depolama izinleri vermek bazı cihazlarda sorunları giderebilir. Bu şeçeneği etkinleştirmek için dış depolama izinleri verin. @@ -342,7 +342,11 @@ Hariç et Daha fazla ayar Dosya sistemi önbelleğini kullan - Yükleme zamanlarını azaltır ama yeni müzik eklenmesini önleyebilir + Yükleme zamanlarını azaltır ama otomatik olarak yeni müzik eklenmesini önleyebilir Klasör yok Klasör ekle + + %d saniye + %d saniye + diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml new file mode 100644 index 000000000..7700b2af1 --- /dev/null +++ b/app/src/main/res/values-vi/strings.xml @@ -0,0 +1,4 @@ + + + Một trình phát nhạc tối giản và hiệu quả cho android. + diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 60e15b610..cac618ad0 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -279,7 +279,7 @@ 样曲 导入了播放列表 路径 - 清空播放列表 + 新建播放列表 无法从此文件导入播放列表 绝对 导入 diff --git a/fastlane/metadata/android/az/full_description.txt b/fastlane/metadata/android/az/full_description.txt new file mode 100644 index 000000000..619f4260e --- /dev/null +++ b/fastlane/metadata/android/az/full_description.txt @@ -0,0 +1,24 @@ +Auxio local musiqi pleyeridir və digər musiqi pleyerlərində olan bir çox lazımsız xüsusiyyət olmadan sürətli və etibarlı istifadəçi interfeysi və təcrübəsi təmin edir. Müasir media pleyer kitabxanalarına əsaslanan Auxio, köhnəlmiş Android funksionallığından istifadə edən digər tətbiqlərə nisbətən üstün kitabxana dəstəyi və dinləmə keyfiyyəti təqdim edir. Qısaca, Musiqi ifa edir. + +Xüsusiyyətlər + +- Media3 ExoPlayer əsasında səsləndirmə +- Son Material Design qaydalarına uyğun sürətli istifadəçi interfeysi +- Asan istifadəni ön plana çıxaran, lakin kənar halları çox düşünməyən istifadəçi təcrübəsi +- Fərdiləşdirilə bilən davranış +- Disk nömrələri, çoxsaylı ifaçılar, buraxılış növləri, dəqiq/original tarixlər, sort teqləri və daha çox şey üçün dəstək +- İfaçılar və albom ifaçılarını birləşdirən inkişaf etmiş ifaçı sistemi +- SD kartdan xəbəri olan qovluq idarəsi +- Etibarlı pleylist funksionallığı +- Səsləndirmə vəziyyətinin saxlanması +- Android Auto dəstəyi +- Avtomatik fasiləsiz səsləndirmə +- Tam ReplayGain dəstəyi (MP3, FLAC, OGG, OPUS və MP4 fayllarında) +- Xarici ekvalayzer dəstəyi (məs. Wavelet) +- Kənardan kənara dizayn +- Əlavə edilmiş albom qapaqları dəstəyi +- Axtarış funksionallığı +- Qulaqcıq ilə avtomatik oynatma +- Ölçüyə uyğunlaşan stilizə edilmiş vidjetlər +- Tamamilə şəxsi və oflayn +- Dairəvi albom qapaqlarını yığışdırmaq (əgər istəsəniz) diff --git a/fastlane/metadata/android/bqi/short_description.txt b/fastlane/metadata/android/bqi/short_description.txt new file mode 100644 index 000000000..e51d6e692 --- /dev/null +++ b/fastlane/metadata/android/bqi/short_description.txt @@ -0,0 +1 @@ +ی پشک کوننده آرنگ ساڌه وو منتقی diff --git a/fastlane/metadata/android/da/short_description.txt b/fastlane/metadata/android/da/short_description.txt new file mode 100644 index 000000000..bf0914180 --- /dev/null +++ b/fastlane/metadata/android/da/short_description.txt @@ -0,0 +1 @@ +En simpel og rationel musikafspiller diff --git a/fastlane/metadata/android/hr/full_description.txt b/fastlane/metadata/android/hr/full_description.txt index a5c141a11..1f01f9b02 100644 --- a/fastlane/metadata/android/hr/full_description.txt +++ b/fastlane/metadata/android/hr/full_description.txt @@ -10,6 +10,7 @@ Auxio je lokalni glazbeni player s brzim, pouzdanim UI/UX bez mnogih beskorisnih - Napredni sustav izvođača koji ujedinjuje izvođače i izvođače albuma - Upravljanje mapama koje podržava SD karticu - Pouzdana funkcija popisa pjesama +- Očuvanje stanja reprodukcije - Automaska podrška za Android Auto - Automatska reprodukcija bez prekida - Puna podrška za ReplayGain (na MP3, FLAC, OGG, OPUS i MP4 datotekama) @@ -17,7 +18,7 @@ Auxio je lokalni glazbeni player s brzim, pouzdanim UI/UX bez mnogih beskorisnih - Od ruba do ruba - Podrška za ugrađene naslovnice - Funkcionalnost pretraživanja -- Automatska reprodukcija slušalica +- Automatska reprodukcija na slušalicama - Elegantni widgeti koji se automatski prilagođavaju njihovoj veličini - Potpuno privatno i izvan mreže - Bez zaobljenih naslovnica albuma (ako ih želite) diff --git a/fastlane/metadata/android/lt/full_description.txt b/fastlane/metadata/android/lt/full_description.txt index ee03b302f..db2ff7d84 100644 --- a/fastlane/metadata/android/lt/full_description.txt +++ b/fastlane/metadata/android/lt/full_description.txt @@ -1,24 +1,24 @@ -„Auxio“ – tai vietinė muzikos leistuvė su sparčia, patikima NS / NP be daugybės nenaudingų funkcijų, esančių kituose muzikos leistuvėse. Sukurta remiantis iš šiuolaikinių medijos įrašo perklausos bibliotekų, „Auxio“ turi geresnį bibliotekos palaikymą ir klausymo kokybę, palyginti su kitomis programėles, kurios naudoja pasenusias „Android“ funkcijas. Trumpai tariant, jame leidžiama muziką. +„Auxio“ – tai vietinė muzikos leistuvė su sparčia, patikima NS / NP be daugybės nenaudingų funkcijų, esančių kituose muzikos leistuvėse. Sukurta remiantis iš šiuolaikinių medijos įrašo perklausos bibliotekų, „Auxio“ turi geresnį bibliotekos palaikymą ir klausymo kokybę, palyginti su kitomis programose, kurios naudoja pasenusias „Android“ funkcijas. Trumpai tariant, ji leidžia muziką. Funkcijos - „Media3 ExoPlayer“ pagrįsta įrašo perklausa -- Sparti naudotojo sąsaja, sukurta pagal naujausias „Material Design“ gaires -- Nuomonę turintis naudotojo potyris, kuriame prioritetas teikiamas naudojimo paprastumui, o ne kraštutiniam atvejui -- Tinkiniama elgsena -- Palaikoma diskų numerių, daugybę atlikėjų, leidinių tipų palaikymas, tikslių / originalių datų, rūšiavimo žymių ir daugiau +- Sparti naudotojo sąsaja, paremta pagal naujausias „Material Design“ gaires +- Nuomoninga naudotojo potyris, kuri teikia pirmenybę naudojimo paprastumui vietoj kraštutinių atvejų +- Tinkinamoji elgsena +- Palaikoma diskų numerių, daugybę atlikėjų, leidinių tipų palaikymas, tikslių / originalių datų, rikiavimo žymių ir daugiau - Išplėstinė atlikėjų sistema, kuri suvienija atlikėjus ir albumų atlikėjus -- SD kortelių aplankų valdymas -- Patikima grojaraščių sukūrimo funkcija -- Įrašo perklausos būsenos išsaugojimas +- SD korteles atpažįstantis aplankų tvarkymas +- Patikimas grojaraščių kūrimo funkcionalumas +- Įrašo perklausos būsenos pastovumas - „Android Auto“ palaikymas - Automatinė betarpinė įrašo perklausa -- Visiškas „ReplayGain“ palaikymas (MP3, MP4, FLAC, OGG, OPUS ir MP4 failuose) -- Išorinio ekvalaizerio funkcija (pvz., „Wavelet“) +- Pilnas „ReplayGain“ palaikymas (MP3, MP4, FLAC, OGG, OPUS ir MP4 failuose) +- Išorinio ekvalaizerio palaikymas (pvz., „Wavelet“) - Kraštas iki krašto - Įterptųjų viršelių palaikymas -- Paieškos funkcija +- Paieškos funkcionalumas - Automatinis ausinių leidimas - Stilingi valdikliai, kurie automatiškai prisitaiko prie savo dydžio -- Visiškai privati ir neprisijungus -- Jokių suapvalintų albumų viršelių (jei jų norite) +- Visiškai privati ir neprisijungusi (prie interneto) +- Jokių suapvalintų albumų viršelių (nebent jų norite) diff --git a/fastlane/metadata/android/lt/short_description.txt b/fastlane/metadata/android/lt/short_description.txt index da6a95ed7..5cbb54130 100644 --- a/fastlane/metadata/android/lt/short_description.txt +++ b/fastlane/metadata/android/lt/short_description.txt @@ -1 +1 @@ -Paprasta, racionali muzikos leistuvė +Paprasta, racionali muzikos leistuvė. diff --git a/fastlane/metadata/android/nn/full_description.txt b/fastlane/metadata/android/nn/full_description.txt index 3bc61b44d..7738775a5 100644 --- a/fastlane/metadata/android/nn/full_description.txt +++ b/fastlane/metadata/android/nn/full_description.txt @@ -1,4 +1,4 @@ -Auxio er ein lokal musikkavspelar med ein snøgg, påliteleg brukaroppleving utan dei mange fåfengde funksjonane til stades i andre musikkavspelarar. Byggd med moderne avspelingsbibliotek, har Auxio betre støtte for samlingar og ljodkvalitet jamført med andre appar som nyttar utdatert Android-funksjonar. Kort sagt, han spelar av musikk. +Auxio er ein lokal musikkspelar med ei snøgg, påliteleg brukaroppleving utan dei mange fåfengde funksjonane til stades i andre musikkspelarar. Byggd med moderne avspelingsbibliotek, har Auxio betre stytte for samlingar og ljodkvalitet jamført med andre appar som nøyter utdaterte Android-funksjonar. Kort sagt, han spelar musikk. Funksjonar @@ -6,17 +6,17 @@ Auxio er ein lokal musikkavspelar med ein snøgg, påliteleg brukaroppleving uta - Snøgt brukargrensesnitt avleia frå dei seinaste Material Design-riktingslinjene - Meiningsfylt brukaroppleving som gjev nyttehugnad forrang framfor ekstremtilfelle - Tilpasseleg åtferd -- Støtte for platetal, fleire artistar, sleppingstypar, omhyggjelege/opphavelege datoar, etikettsortering med meir +- Stytte for platetal, fleire artistar, utgåvetypar, omhyggjelege/opphavelege datoar, etikettsortering med meir - Avansert artistsystem som sameinar artistar og albumartistar -- Mappehandsaming med støtte for SD-kort +- Mappehandsaming med stytte for SD-kort - Pålitelege spelelister - Varetaking av avspelingstilstand -- Støtte for Android Auto +- Stytte for Android Auto - Automatisk holfri avspeling -- Full støtte for ReplayGain (På MP3, FLAC, OGG, OPUS og MP4-filer) -- Støtte for ekstern tonekontroll (t.d. Wavelet) +- Full stytte for ReplayGain (På MP3, FLAC, OGG, OPUS og MP4-filer) +- Stytte for ekstern tonekontroll (t.d. Wavelet) - Rand-til-rand -- Støtte for innebyggde omslag +- Stytte for innebyggde omslag - Søkjefunksjon - Autoavspeling med hovudsett - Stilige widgetar som tilpassar seg sjølvverkande til storleiken deira diff --git a/fastlane/metadata/android/ro/short_description.txt b/fastlane/metadata/android/ro/short_description.txt index 13d6046d3..e7c117eb2 100644 --- a/fastlane/metadata/android/ro/short_description.txt +++ b/fastlane/metadata/android/ro/short_description.txt @@ -1 +1 @@ -Un player de muzică simplu și rațional +Un player muzical simplu și rațional diff --git a/fastlane/metadata/android/ru/full_description.txt b/fastlane/metadata/android/ru/full_description.txt index 73900800f..f28a312de 100644 --- a/fastlane/metadata/android/ru/full_description.txt +++ b/fastlane/metadata/android/ru/full_description.txt @@ -6,8 +6,7 @@ Auxio — это локальный музыкальный плеер с быс - Быстрый UI создан в соответствии с последними рекомендациями Material Design - Продуманный UX, который предпочитает простоту использования над крайностями - Настраиваемое поведение -- Поддержка номеров дисков, нескольких исполнителей, типов выпусков, -- точные/оригинальные даты, теги сортировки и т.д. +- Поддержка номеров дисков, нескольких исполнителей, типов выпусков, точные/оригинальные даты, теги сортировки и т.д. - Расширенная система исполнителей, объединяющая исполнителей и исполнителей альбомов - Управление папками на SD-карте - Надежная функция составления плейлистов diff --git a/fastlane/metadata/android/sr/full_description.txt b/fastlane/metadata/android/sr/full_description.txt new file mode 100644 index 000000000..56cbf2310 --- /dev/null +++ b/fastlane/metadata/android/sr/full_description.txt @@ -0,0 +1,24 @@ +Auxio je lokalni plejer za muziku sa brzim i pouzdanim UI/UX-om, bez mnogih beskorisnih funkcija koje se nalaze u drugim plejerima. Izgrađen na modernim bibliotekama za reprodukciju medija, Auxio ima superiornu podršku za biblioteku i kvalitet slušanja u poređenju sa drugim aplikacijama koje koriste zastarelu Android funkcionalnost. Ukratko, Reprodukuje muziku. + +Funkcije + +- Reprodukcija zasnovana na Media3 ExoPlayer-u +- Brz UI izveden iz najnovijih smernica Material Design-a +- UX koji favorizuje jednostavnost korišćenja nad rubnim slučajevima +- Prilagodljivo ponašanje +- Podrška za brojeve diskova, više izvođača, tipove izdanja, precizne/originalne datume, sort tegle i još mnogo toga +- Napredni sistem izvođača koji ujedinjuje izvođače i album izvođače +- Upravljanje fasciklama sa podrškom za SD karticu +- Pouzdana funkcionalnost plejlista +- Očuvanje stanja reprodukcije +- Podrška za Android Auto +- Automatska reprodukcija bez prekida +- Puna ReplayGain podrška (za MP3, FLAC, OGG, OPUS i MP4 fajlove) +- Podrška za spoljašnji ekvilajzer (npr. Wavelet) +- Od ivice do ivice dizajn +- Podrška za ugrađene omote albuma +- Funkcija pretrage +- Automatska reprodukcija sa slušalicama +- Stilizovani vidžeti koji se automatski prilagođavaju veličini +- Potpuno privatno i offline +- Nema zaobljenih omota albuma (ako želite) diff --git a/fastlane/metadata/android/sr/short_description.txt b/fastlane/metadata/android/sr/short_description.txt new file mode 100644 index 000000000..e8431e8bb --- /dev/null +++ b/fastlane/metadata/android/sr/short_description.txt @@ -0,0 +1 @@ +Jednostavan, racionalan plejer za muziku diff --git a/fastlane/metadata/android/vi/short_description.txt b/fastlane/metadata/android/vi/short_description.txt new file mode 100644 index 000000000..1389d8e86 --- /dev/null +++ b/fastlane/metadata/android/vi/short_description.txt @@ -0,0 +1 @@ +Một trình phát nhạc tối giản và hiệu quả From 82ffcf3bd3c9ca8ecc72739817e4f91fa01f2450 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Wed, 31 Dec 2025 20:12:39 -0700 Subject: [PATCH 07/15] remove unneeded conversion function --- .../oxycblt/auxio/settings/AboutFragment.kt | 2 +- .../java/org/oxycblt/auxio/util/SizeUtil.kt | 28 ------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 app/src/main/java/org/oxycblt/auxio/util/SizeUtil.kt diff --git a/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt b/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt index 7bbd253f1..7f1ce9cfe 100644 --- a/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt @@ -36,9 +36,9 @@ import org.oxycblt.auxio.playback.formatDurationMs import org.oxycblt.auxio.ui.ViewBindingFragment import org.oxycblt.auxio.util.collectImmediately import org.oxycblt.auxio.util.openInBrowser -import org.oxycblt.auxio.util.formatFileSize import org.oxycblt.auxio.util.startIntent import org.oxycblt.auxio.util.systemBarInsetsCompat +import android.text.format.Formatter /** * A [ViewBindingFragment] that displays information about the app and the current music library. diff --git a/app/src/main/java/org/oxycblt/auxio/util/SizeUtil.kt b/app/src/main/java/org/oxycblt/auxio/util/SizeUtil.kt deleted file mode 100644 index 44f93e821..000000000 --- a/app/src/main/java/org/oxycblt/auxio/util/SizeUtil.kt +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2025 Auxio Project - * SizeUtil.kt is part of Auxio. - */ - -package org.oxycblt.auxio.util - -import java.util.Locale - -/** - * Format a byte count into a human readable string (B, KB, MB, GB, ...). - */ -fun Long.formatFileSize(): String { - if (this <= 0L) return "0 B" - var size = this.toDouble() - val units = arrayOf("B", "KB", "MB", "GB", "TB") - var unitIndex = 0 - while (size >= 1024.0 && unitIndex < units.size - 1) { - size /= 1024.0 - unitIndex++ - } - val formatted = when { - size >= 100 -> String.format(Locale.getDefault(), "%.0f", size) - size >= 10 -> String.format(Locale.getDefault(), "%.1f", size) - else -> String.format(Locale.getDefault(), "%.2f", size) - } - return "$formatted ${units[unitIndex]}" -} From 6bc813e91179ce6838762823a8c9d0207238ef8d Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Wed, 31 Dec 2025 20:34:17 -0700 Subject: [PATCH 08/15] about: use proper icon for file size --- app/src/main/res/drawable/ic_file_24.xml | 12 ++++++++++++ app/src/main/res/layout/fragment_about.xml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/ic_file_24.xml diff --git a/app/src/main/res/drawable/ic_file_24.xml b/app/src/main/res/drawable/ic_file_24.xml new file mode 100644 index 000000000..b2a66e7f8 --- /dev/null +++ b/app/src/main/res/drawable/ic_file_24.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 2e61a90ea..d9c342f63 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -369,7 +369,7 @@ style="@style/Widget.Auxio.TextView.Icon" android:layout_width="match_parent" android:layout_height="wrap_content" - app:drawableStartCompat="@drawable/ic_time_24" + app:drawableStartCompat="@drawable/ic_file_24" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/about_licenses" From 56991a8c7981d9f3b5b75f8eae79675db3109434 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Wed, 31 Dec 2025 20:35:18 -0700 Subject: [PATCH 09/15] all: reformat --- .../main/java/org/oxycblt/auxio/music/MusicViewModel.kt | 4 ++-- .../main/java/org/oxycblt/auxio/settings/AboutFragment.kt | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt b/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt index 4ec8656cb..bde670b0d 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/MusicViewModel.kt @@ -101,7 +101,7 @@ constructor( library.artists.size, library.genres.size, library.songs.sumOf { it.durationMs }, - library.songs.sumOf { it.size }) + library.songs.sumOf { it.size }, ) L.d("Updated statistics: ${_statistics.value}") } @@ -371,7 +371,7 @@ constructor( val artists: Int, val genres: Int, val durationMs: Long, - val totalSizeBytes: Long + val totalSizeBytes: Long, ) } diff --git a/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt b/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt index 7f1ce9cfe..82787ab25 100644 --- a/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/settings/AboutFragment.kt @@ -21,6 +21,7 @@ package org.oxycblt.auxio.settings import android.content.Context import android.content.Intent import android.os.Bundle +import android.text.format.Formatter import android.view.LayoutInflater import androidx.core.net.toUri import androidx.core.view.updatePadding @@ -38,7 +39,6 @@ import org.oxycblt.auxio.util.collectImmediately import org.oxycblt.auxio.util.openInBrowser import org.oxycblt.auxio.util.startIntent import org.oxycblt.auxio.util.systemBarInsetsCompat -import android.text.format.Formatter /** * A [ViewBindingFragment] that displays information about the app and the current music library. @@ -98,12 +98,14 @@ class AboutFragment : ViewBindingFragment() { binding.aboutTotalDuration.text = getString( R.string.fmt_lib_total_duration, - (statistics?.durationMs ?: 0).formatDurationMs(false)) + (statistics?.durationMs ?: 0).formatDurationMs(false), + ) binding.aboutTotalSize.text = getString( R.string.fmt_lib_total_size, - (statistics?.totalSizeBytes ?: 0L).formatFileSize()) + Formatter.formatFileSize(context, statistics?.totalSizeBytes ?: 0L), + ) } private fun Context.sendEmail(recipient: String) { From 141d9e4d2ee1a30e6816a5af27bfc76542d4afcb Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Wed, 31 Dec 2025 20:47:19 -0700 Subject: [PATCH 10/15] music: introduce more optimized uid format --- .../src/main/java/org/oxycblt/musikr/Music.kt | 44 ++++++++++++++----- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/musikr/src/main/java/org/oxycblt/musikr/Music.kt b/musikr/src/main/java/org/oxycblt/musikr/Music.kt index 594df1dfd..a9c955a54 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/Music.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/Music.kt @@ -93,17 +93,17 @@ sealed interface Music { override fun equals(other: Any?) = other is UID && format == other.format && item == other.item && uuid == other.uuid - override fun toString() = "${format.namespace}:${item.intCode.toString(16)}-$uuid" + override fun toString() = "u${format.microNamespace}${item.microNamespace}$uuid" - internal enum class Item(val intCode: Int) { + internal enum class Item(val intCode: Int, val microNamespace: Char) { // Item used to be MusicType back when the music module was // part of Auxio, so these old integer codes remain. // TODO: Introduce new UID format that removes these. - SONG(0xA10B), - ALBUM(0xA10A), - ARTIST(0xA109), - GENRE(0xA108), - PLAYLIST(0xA107), + SONG(0xA10B, 's'), + ALBUM(0xA10A, 'a'), + ARTIST(0xA109, 'r'), + GENRE(0xA108, 'g'), + PLAYLIST(0xA107, 'p'), } /** @@ -111,12 +111,12 @@ sealed interface Music { * * @param namespace Namespace to use in the [Music.UID]'s string representation. */ - private enum class Format(val namespace: String) { + private enum class Format(val namespace: String, val microNamespace: Char) { /** @see auxio */ - AUXIO("org.oxycblt.auxio"), + AUXIO("org.oxycblt.auxio", 'a'), /** @see musicBrainz */ - MUSICBRAINZ("org.musicbrainz"), + MUSICBRAINZ("org.musicbrainz", 'm'), } object TypeConverters { @@ -202,6 +202,30 @@ sealed interface Music { * representation was invalid. */ fun fromString(uid: String): UID? { + if (uid.startsWith("u")) { + // switch to new micro-format parsing + val microFormat = + when (uid.getOrNull(1)) { + Format.AUXIO.microNamespace -> Format.AUXIO + Format.MUSICBRAINZ.microNamespace -> Format.MUSICBRAINZ + else -> return null + } + val microItem = + when (uid.getOrNull(2)) { + Item.SONG.microNamespace -> Item.SONG + Item.ALBUM.microNamespace -> Item.ALBUM + Item.ARTIST.microNamespace -> Item.ARTIST + Item.GENRE.microNamespace -> Item.GENRE + Item.PLAYLIST.microNamespace -> Item.PLAYLIST + else -> return null + } + if (uid.length < 4) { + // not quite sure if substring will error on malformed uids + return null + } + val uuid = uid.substring(3 until uid.length).toUuidOrNull() ?: return null + return UID(microFormat, microItem, uuid) + } val split = uid.split(':', limit = 2) if (split.size != 2) { return null From 82c14d0c0552a56fd99fd18ea9d602beb18d66db Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 3 Jan 2026 17:35:00 -0700 Subject: [PATCH 11/15] music: compress down mediaitem ids --- .../music/service/MediaItemTranslation.kt | 23 +++++++++++++++++-- .../oxycblt/auxio/music/service/TabNode.kt | 23 +++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt b/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt index ea0ef6f81..31a3a3323 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt @@ -37,24 +37,43 @@ import org.oxycblt.musikr.Album import org.oxycblt.musikr.Artist import org.oxycblt.musikr.Genre import org.oxycblt.musikr.Music +import org.oxycblt.musikr.Music.UID import org.oxycblt.musikr.MusicParent import org.oxycblt.musikr.Playlist import org.oxycblt.musikr.Song sealed interface MediaSessionUID { data class Tab(val node: TabNode) : MediaSessionUID { - override fun toString() = "$ID_CATEGORY:${node.id}" + override fun toString() = "$MICRO_ID_CATEGORY${node.microId}" } data class SingleItem(val uid: Music.UID) : MediaSessionUID { - override fun toString() = "$ID_ITEM:$uid" + override fun toString() = "$MICRO_ID_ITEM$uid" } companion object { const val ID_CATEGORY = BuildConfig.APPLICATION_ID + ".category" + const val MICRO_ID_CATEGORY = "mc" const val ID_ITEM = BuildConfig.APPLICATION_ID + ".item" + const val MICRO_ID_ITEM = "mi" fun fromString(str: String): MediaSessionUID? { + if (str.startsWith("mc")) { + if (str.length < 3) { + return null + } + return Tab( + TabNode.fromString(str.substring(2 until str.length)) + ?: return null) + } + if (str.startsWith("mi")) { + if (str.length < 3) { + return null + } + return SingleItem( + UID.fromString(str.substring(2 until str.length)) ?: return null + ) + } val parts = str.split(":", limit = 2) if (parts.size != 2) { return null diff --git a/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt b/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt index d13dd42be..c2aa49a0a 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt @@ -23,6 +23,7 @@ import org.oxycblt.auxio.music.MusicType sealed class TabNode { abstract val id: String + abstract val microId: String abstract val nameRes: Int abstract val bitmapRes: Int? @@ -30,6 +31,7 @@ sealed class TabNode { data object Root : TabNode() { override val id = "root" + override val microId: String = "tt" override val nameRes = R.string.info_app_name override val bitmapRes = null @@ -38,12 +40,21 @@ sealed class TabNode { data object More : TabNode() { override val id = "more" + override val microId: String = "tm" override val nameRes = R.string.lbl_more override val bitmapRes = R.drawable.ic_more_bitmap_24 } data class Home(val type: MusicType) : TabNode() { override val id = "$ID/${type.intCode}" + override val microId: String = "t{${ + when (type) { + MusicType.SONGS -> 's' + MusicType.ALBUMS -> 'a' + MusicType.ARTISTS -> 'r' + MusicType.GENRES -> 'g' + MusicType.PLAYLISTS -> 'p' + }}}" override val bitmapRes: Int get() = when (type) { @@ -63,6 +74,18 @@ sealed class TabNode { companion object { fun fromString(str: String): TabNode? { + if (str.startsWith("t")) { + return when (val id = str.getOrNull(1)) { + 't' -> Root + 'm' -> More + 's' -> Home(MusicType.SONGS) + 'a' -> Home(MusicType.ALBUMS) + 'r' -> Home(MusicType.ARTISTS) + 'g' -> Home(MusicType.GENRES) + 'p' -> Home(MusicType.PLAYLISTS) + else -> null + } + } return when { str == Root.id -> Root str == More.id -> More From 5fcc1537bafe3a01b6e38b134b556efede5d3070 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 3 Jan 2026 17:36:10 -0700 Subject: [PATCH 12/15] music: indicate compressed format --- app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt | 3 ++- musikr/src/main/java/org/oxycblt/musikr/Music.kt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt b/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt index c2aa49a0a..6eeb4c07b 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt @@ -75,7 +75,8 @@ sealed class TabNode { companion object { fun fromString(str: String): TabNode? { if (str.startsWith("t")) { - return when (val id = str.getOrNull(1)) { + // new compressed id format + return when (str.getOrNull(1)) { 't' -> Root 'm' -> More 's' -> Home(MusicType.SONGS) diff --git a/musikr/src/main/java/org/oxycblt/musikr/Music.kt b/musikr/src/main/java/org/oxycblt/musikr/Music.kt index a9c955a54..c7b819ac0 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/Music.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/Music.kt @@ -203,7 +203,7 @@ sealed interface Music { */ fun fromString(uid: String): UID? { if (uid.startsWith("u")) { - // switch to new micro-format parsing + // new compressed-format parsing val microFormat = when (uid.getOrNull(1)) { Format.AUXIO.microNamespace -> Format.AUXIO From dd4b9f152e702711f642494abc918d8fcd7b9769 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 3 Jan 2026 17:49:05 -0700 Subject: [PATCH 13/15] music: reformat --- .../oxycblt/auxio/music/service/MediaItemTranslation.kt | 8 ++------ .../main/java/org/oxycblt/auxio/music/service/TabNode.kt | 3 ++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt b/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt index 31a3a3323..e439f6191 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/service/MediaItemTranslation.kt @@ -62,17 +62,13 @@ sealed interface MediaSessionUID { if (str.length < 3) { return null } - return Tab( - TabNode.fromString(str.substring(2 until str.length)) - ?: return null) + return Tab(TabNode.fromString(str.substring(2 until str.length)) ?: return null) } if (str.startsWith("mi")) { if (str.length < 3) { return null } - return SingleItem( - UID.fromString(str.substring(2 until str.length)) ?: return null - ) + return SingleItem(UID.fromString(str.substring(2 until str.length)) ?: return null) } val parts = str.split(":", limit = 2) if (parts.size != 2) { diff --git a/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt b/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt index 6eeb4c07b..da73dd8af 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt @@ -47,7 +47,8 @@ sealed class TabNode { data class Home(val type: MusicType) : TabNode() { override val id = "$ID/${type.intCode}" - override val microId: String = "t{${ + override val microId: String = + "t{${ when (type) { MusicType.SONGS -> 's' MusicType.ALBUMS -> 'a' From 9c43a63707d6d3bbaf31b9c2d6d6b95d4eed9e17 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 3 Jan 2026 18:04:22 -0700 Subject: [PATCH 14/15] music: remove accidental double bracket --- app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt b/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt index da73dd8af..966475969 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/service/TabNode.kt @@ -48,14 +48,14 @@ sealed class TabNode { data class Home(val type: MusicType) : TabNode() { override val id = "$ID/${type.intCode}" override val microId: String = - "t{${ + "t${ when (type) { MusicType.SONGS -> 's' MusicType.ALBUMS -> 'a' MusicType.ARTISTS -> 'r' MusicType.GENRES -> 'g' MusicType.PLAYLISTS -> 'p' - }}}" + }}" override val bitmapRes: Int get() = when (type) { From 462b950c17a3754d96174c0f48a8aec11a94dd71 Mon Sep 17 00:00:00 2001 From: "Weblate (bot)" Date: Sat, 10 Jan 2026 23:42:27 +0100 Subject: [PATCH 15/15] Translations update from Hosted Weblate (#1260) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Translated using Weblate (Turkish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/tr/ * Translated using Weblate (Welsh) Currently translated at 97.2% (322 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/cy/ * Translated using Weblate (Welsh) Currently translated at 97.2% (322 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/cy/ * Translated using Weblate (Arabic) Currently translated at 98.1% (325 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ar/ * Translated using Weblate (Hungarian) Currently translated at 92.4% (306 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/hu/ * Translated using Weblate (Hungarian) Currently translated at 92.4% (306 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/hu/ * Translated using Weblate (Odia) Currently translated at 1.5% (5 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/or/ * Translated using Weblate (Interlingua) Currently translated at 59.8% (198 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ia/ * Translated using Weblate (Galician) Currently translated at 67.6% (224 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/gl/ * Translated using Weblate (Galician) Currently translated at 67.6% (224 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/gl/ * Translated using Weblate (Italian) Currently translated at 99.6% (330 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/it/ * Translated using Weblate (Italian) Currently translated at 99.6% (330 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/it/ * Translated using Weblate (Italian) Currently translated at 99.6% (330 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/it/ * Translated using Weblate (Finnish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fi/ * Translated using Weblate (Ukrainian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/uk/ * Translated using Weblate (Ukrainian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/uk/ * Translated using Weblate (Portuguese (Portugal)) Currently translated at 99.6% (330 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pt_PT/ * Translated using Weblate (Portuguese (Portugal)) Currently translated at 99.6% (330 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pt_PT/ * Translated using Weblate (Romanian) Currently translated at 72.2% (239 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ro/ * Translated using Weblate (Romanian) Currently translated at 72.2% (239 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ro/ * Translated using Weblate (Romanian) Currently translated at 72.2% (239 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ro/ * Translated using Weblate (Czech) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/cs/ * Translated using Weblate (Czech) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/cs/ * Translated using Weblate (Norwegian Nynorsk) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/nn/ * Translated using Weblate (Spanish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/es/ * Translated using Weblate (Spanish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/es/ * Translated using Weblate (Albanian) Currently translated at 99.6% (330 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/sq/ * Translated using Weblate (Nepali) Currently translated at 18.4% (61 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ne/ * Translated using Weblate (Korean) Currently translated at 87.9% (291 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ko/ * Translated using Weblate (Korean) Currently translated at 87.9% (291 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ko/ * Translated using Weblate (Punjabi (Pakistan)) Currently translated at 5.1% (17 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pa_PK/ * Translated using Weblate (Punjabi (Pakistan)) Currently translated at 5.1% (17 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pa_PK/ * Translated using Weblate (Hebrew) Currently translated at 91.8% (304 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/he/ * Translated using Weblate (Hebrew) Currently translated at 91.8% (304 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/he/ * Translated using Weblate (Hebrew) Currently translated at 91.8% (304 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/he/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pt_BR/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pt_BR/ * Translated using Weblate (Arabic (ar_IQ)) Currently translated at 76.1% (252 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ar_IQ/ * Translated using Weblate (Norwegian Bokmål) Currently translated at 87.9% (291 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/nb_NO/ * Translated using Weblate (Norwegian Bokmål) Currently translated at 87.9% (291 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/nb_NO/ * Translated using Weblate (Malayalam) Currently translated at 24.4% (81 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ml/ * Translated using Weblate (Malayalam) Currently translated at 24.4% (81 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ml/ * Translated using Weblate (Lithuanian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/lt/ * Translated using Weblate (Vietnamese) Currently translated at 0.3% (1 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/vi/ * Translated using Weblate (Serbian) Currently translated at 7.2% (24 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/sr/ * Translated using Weblate (Chinese (Traditional Han script)) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/zh_Hant/ * Translated using Weblate (Persian) Currently translated at 96.0% (318 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fa/ * Translated using Weblate (German) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/de/ * Translated using Weblate (German) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/de/ * Translated using Weblate (German) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/de/ * Translated using Weblate (Croatian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/hr/ * Translated using Weblate (Croatian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/hr/ * Translated using Weblate (Belarusian) Currently translated at 90.9% (301 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/be/ * Translated using Weblate (Belarusian) Currently translated at 90.9% (301 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/be/ * Translated using Weblate (Japanese) Currently translated at 91.8% (304 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ja/ * Translated using Weblate (Japanese) Currently translated at 91.8% (304 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ja/ * Translated using Weblate (Luri (Bakhtiari)) Currently translated at 28.3% (94 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/bqi/ * Translated using Weblate (Punjabi) Currently translated at 86.7% (287 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pa/ * Translated using Weblate (Punjabi) Currently translated at 86.7% (287 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pa/ * Translated using Weblate (Thai) Currently translated at 41.0% (136 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/th/ * Translated using Weblate (Slovenian) Currently translated at 86.1% (285 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/sl/ * Translated using Weblate (Slovenian) Currently translated at 86.1% (285 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/sl/ * Translated using Weblate (Polish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pl/ * Translated using Weblate (Polish) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pl/ * Translated using Weblate (Estonian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/et/ * Translated using Weblate (Hindi) Currently translated at 86.7% (287 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/hi/ * Translated using Weblate (Hindi) Currently translated at 86.7% (287 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/hi/ * Translated using Weblate (Swedish) Currently translated at 90.3% (299 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/sv/ * Translated using Weblate (Swedish) Currently translated at 90.3% (299 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/sv/ * Translated using Weblate (Swedish) Currently translated at 90.3% (299 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/sv/ * Translated using Weblate (Tamil) Currently translated at 99.0% (328 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ta/ * Translated using Weblate (Tamil) Currently translated at 99.0% (328 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ta/ * Translated using Weblate (Arabic (Saudi Arabia)) Currently translated at 0.0% (0 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ar_SA/ * Translated using Weblate (Filipino) Currently translated at 26.8% (89 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fil/ * Translated using Weblate (Filipino) Currently translated at 26.8% (89 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fil/ * Translated using Weblate (Danish) Currently translated at 31.7% (105 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/da/ * Translated using Weblate (Marathi) Currently translated at 2.4% (8 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/mr/ * Translated using Weblate (Dutch) Currently translated at 91.8% (304 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/nl/ * Translated using Weblate (Dutch) Currently translated at 91.8% (304 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/nl/ * Translated using Weblate (Greek) Currently translated at 31.1% (103 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/el/ * Translated using Weblate (Greek) Currently translated at 31.1% (103 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/el/ * Translated using Weblate (French) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fr/ * Translated using Weblate (French) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fr/ * Translated using Weblate (French) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fr/ * Translated using Weblate (French) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fr/ * Translated using Weblate (Russian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ru/ * Translated using Weblate (Russian) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ru/ * Translated using Weblate (Portuguese) Currently translated at 92.1% (305 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pt/ * Translated using Weblate (Latvian) Currently translated at 0.0% (0 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/lv/ * Translated using Weblate (Chinese (Simplified Han script)) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/zh_Hans/ * Translated using Weblate (Chinese (Simplified Han script)) Currently translated at 100.0% (331 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/zh_Hans/ * Translated using Weblate (Georgian) Currently translated at 34.1% (113 of 331 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ka/ * Update translation files Updated by "Remove blank strings" hook in Weblate. Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/ * Translated using Weblate (Chinese (Simplified Han script)) Currently translated at 100.0% (332 of 332 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/zh_Hans/ * Translated using Weblate (French) Currently translated at 100.0% (332 of 332 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fr/ * Translated using Weblate (Czech) Currently translated at 100.0% (332 of 332 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/cs/ * Translated using Weblate (Estonian) Currently translated at 100.0% (332 of 332 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/et/ * Translated using Weblate (Finnish) Currently translated at 100.0% (332 of 332 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/fi/ * Translated using Weblate (Polish) Currently translated at 100.0% (332 of 332 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/pl/ * Translated using Weblate (German) Currently translated at 100.0% (332 of 332 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/de/ * Translated using Weblate (Bulgarian) Currently translated at 100.0% (332 of 332 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/bg/ * Translated using Weblate (Azerbaijani) Currently translated at 100.0% (332 of 332 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/az/ * Translated using Weblate (Chinese (Traditional Han script)) Currently translated at 100.0% (332 of 332 strings) Translation: Auxio/Strings Translate-URL: https://hosted.weblate.org/projects/auxio/strings/zh_Hant/ --------- Co-authored-by: Bai Co-authored-by: fin-w Co-authored-by: Tibor Botfai (gidano) Co-authored-by: Iago Co-authored-by: lorenzoch02 Co-authored-by: atilluF <110931720+atilluF@users.noreply.github.com> Co-authored-by: Jiri Grönroos Co-authored-by: BMT[UA] Co-authored-by: Макар Разин Co-authored-by: pringless Co-authored-by: Yokyrole Co-authored-by: Ilie Co-authored-by: Fjuro Co-authored-by: sunniva Co-authored-by: Deleted User Co-authored-by: D. Co-authored-by: Yurical Co-authored-by: bgo-eiu Co-authored-by: Yosef Or Boczko Co-authored-by: FAYE Co-authored-by: Edmundo Nocchi Co-authored-by: santiago046 Co-authored-by: Allan Nordhøy Co-authored-by: Deleted User Co-authored-by: Vaclovas Intas Co-authored-by: Unknownman820 Co-authored-by: Mahyar-Saberifard Co-authored-by: min7-i Co-authored-by: Ettore Atalan Co-authored-by: Elizabeth Wega Co-authored-by: Milo Ivir Co-authored-by: ShareASmile Co-authored-by: K_Lar Co-authored-by: Priit Jõerüüt Co-authored-by: Sunniva Løvstad Co-authored-by: Deleted User Co-authored-by: Dhanajayan K Co-authored-by: martx Co-authored-by: SecularSteve Co-authored-by: lunand Co-authored-by: J. Lavoie Co-authored-by: Firepal Co-authored-by: cwpute Co-authored-by: Victor Lamoine Co-authored-by: 大王叫我来巡山 Co-authored-by: Mickaël Binos Co-authored-by: Joonas Reinholm Co-authored-by: rehork Co-authored-by: qwerty287 Co-authored-by: Trunars Co-authored-by: NecRaul --- app/src/main/res/values-ar-rSA/strings.xml | 3 +- app/src/main/res/values-az/strings.xml | 1 + app/src/main/res/values-be/strings.xml | 8 ++--- app/src/main/res/values-bg/strings.xml | 1 + app/src/main/res/values-cs/strings.xml | 39 ++++++++-------------- app/src/main/res/values-cy/strings.xml | 4 +-- app/src/main/res/values-de/strings.xml | 19 +++-------- app/src/main/res/values-el/strings.xml | 2 +- app/src/main/res/values-es/strings.xml | 17 ++-------- app/src/main/res/values-et/strings.xml | 5 ++- app/src/main/res/values-fi/strings.xml | 5 +-- app/src/main/res/values-fil/strings.xml | 2 +- app/src/main/res/values-fr/strings.xml | 21 ++++++------ app/src/main/res/values-gl/strings.xml | 2 +- app/src/main/res/values-hi/strings.xml | 10 +++--- app/src/main/res/values-hr/strings.xml | 10 +++--- app/src/main/res/values-hu/strings.xml | 4 +-- app/src/main/res/values-ia/strings.xml | 2 +- app/src/main/res/values-it/strings.xml | 13 ++------ app/src/main/res/values-iw/strings.xml | 4 +-- app/src/main/res/values-ja/strings.xml | 4 +-- app/src/main/res/values-ko/strings.xml | 8 ++--- app/src/main/res/values-lt/strings.xml | 4 +-- app/src/main/res/values-lv/strings.xml | 3 +- app/src/main/res/values-ml/strings.xml | 2 +- app/src/main/res/values-nb-rNO/strings.xml | 2 +- app/src/main/res/values-nl/strings.xml | 6 ++-- app/src/main/res/values-nn/strings.xml | 2 +- app/src/main/res/values-or/strings.xml | 2 +- app/src/main/res/values-pa-rPK/strings.xml | 2 +- app/src/main/res/values-pa/strings.xml | 10 +++--- app/src/main/res/values-pl/strings.xml | 14 +++----- app/src/main/res/values-pt-rBR/strings.xml | 17 +++------- app/src/main/res/values-pt-rPT/strings.xml | 2 +- app/src/main/res/values-ro/strings.xml | 5 ++- app/src/main/res/values-ru/strings.xml | 12 +++---- app/src/main/res/values-sl/strings.xml | 6 ++-- app/src/main/res/values-sq/strings.xml | 2 +- app/src/main/res/values-sr/strings.xml | 2 +- app/src/main/res/values-sv/strings.xml | 4 +-- app/src/main/res/values-tr/strings.xml | 2 +- app/src/main/res/values-uk/strings.xml | 16 +++------ app/src/main/res/values-zh-rCN/strings.xml | 16 ++------- app/src/main/res/values-zh-rTW/strings.xml | 9 ++--- 44 files changed, 119 insertions(+), 205 deletions(-) diff --git a/app/src/main/res/values-ar-rSA/strings.xml b/app/src/main/res/values-ar-rSA/strings.xml index 3a0906840..4a4cb755f 100644 --- a/app/src/main/res/values-ar-rSA/strings.xml +++ b/app/src/main/res/values-ar-rSA/strings.xml @@ -1,2 +1,3 @@ - \ No newline at end of file + + diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 748d57ed5..648fae5c1 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -343,4 +343,5 @@ Fərdi səsləndirmə barı hərəkəti Geri atlamadan əvvəl geri sar Əvvəlki mahnıya keçmədən əvvəl geri sar + Ümumi ölçü: %s diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 152521672..078742ddb 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -251,10 +251,10 @@ Паведамленні ў плэйліст Без трэкаў Выдаліць - Выдаліць %s\? Гэтае дзеянне не можа быць адменена. + Выдаліць %s? Гэтае дзеянне не можа быць адменена. Перайменаваць Перайменаваць плэйліст - Выдаліць плэйліст\? + Выдаліць плэйліст? Змяніць Плэйліст перайменаван Плэйліст выдален @@ -302,9 +302,7 @@ Пакідаць прайграванне/паўзу падчас пропуску або рэдагаванні чаргі Адкл. Пачаць прайграванне - Запускаць auxio, выкарыстоўваючы раней захаваны стан. Калі захаваны стан недаступны, усе песні будуць ператасаваныя. Прайграванне пачнецца неадкладна. -\n -\nПапярэджанне: будзьце асцярожныя пры кіраванні гэтай службай, калі вы закрыеце яе, а затым паспрабуеце выкарыстоўваць зноў, вы, верагодна, прывядзеце да збою прыкладання. + Запускаць auxio, выкарыстоўваючы раней захаваны стан. Калі захаваны стан недаступны, усе песні будуць ператасаваныя. Прайграванне пачнецца неадкладна. \n \nПапярэджанне: будзьце асцярожныя пры кіраванні гэтай службай, калі вы закрыеце яе, а затым паспрабуеце выкарыстоўваць зноў, вы, верагодна, прывядзеце да збою прыкладання. Больш MPEG-4, які змяшчае %s Невядомы альбом diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index e28e70eab..6fb714e24 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -343,4 +343,5 @@ %d секунда %d секунди + Общ размер: %s diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 183e58ffa..132e04ee0 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -1,10 +1,8 @@ - + - Jednoduchý, rozumný hudební přehrávač pro Android. Načítání hudby Zobrazení a ovládání přehrávání hudby - Načítání vaší hudební knihovny… Zkusit znovu Žánry @@ -37,9 +35,7 @@ Přidáno do fronty Přejít na umělce Přejít na album - OK - Zrušit Uložit O aplikaci @@ -48,7 +44,6 @@ Licence Vytvořil Alexander Capehart Statistiky knihovny - Nastavení Vzhled a chování Motiv @@ -87,13 +82,10 @@ Obsah Obnovit hudbu Znovu načíst hudební knihovnu, pokud možno s použitím značek uložených v mezipaměti - Načítání hudby selhalo Nebyla nalezena žádná aplikace, která by dokázala vykonat tuto akci Tato složka není podporována - Prohledat vaší knihovnu… - Skladba %d Přehrát nebo pozastavit Přeskočit na další skladbu @@ -110,13 +102,11 @@ Obal alba %s Obrázek umělce %s Obrázek žánru %s - Neznámý umělec Neznámý žánr Žádné datum Žádná stopa Nehraje žádná hudba - Červená Růžová Fialová @@ -134,7 +124,6 @@ Hnědá Šedá Dynamické - Disk %d +%.1f dB -%.1f dB @@ -145,16 +134,16 @@ Načtených žánrů: %d Celková doba trvání: %s - "%d skladba" - "%d skladby" - "%d skladeb" - "%d skladeb" + %d skladba + %d skladby + %d skladeb + %d skladeb - "%d album" - "%d alba" - "%d alb" - "%d alb" + %d album + %d alba + %d alb + %d alb Náhodně Vše náhodně @@ -262,8 +251,8 @@ Nový seznam skladeb Seznam skladeb %d Odstranit - Odstranit seznam skladeb\? - Odstranit seznam %s\? Tato akce je nevratná. + Odstranit seznam skladeb? + Odstranit seznam %s? Tato akce je nevratná. Přejmenovat Seznam skladeb přejmenován Seznam skladeb odstraněn @@ -313,9 +302,7 @@ Zapamatovat pozastavení Vypnuto Spustit přehrávání - Spustí Auxio pomocí naposledy uloženého stavu. Pokud není dostupný žádný uložený stav, budou náhodně přehrány všechny skladby. Přehrávání se spustí ihned. -\n -\nVAROVÁNÍ: při ovládání této služby buďte opatrní, pokud ji zavřete a pak se ji znovu pokusíte použít, aplikace nejspíše spadne. + Spustí Auxio pomocí naposledy uloženého stavu. Pokud není dostupný žádný uložený stav, budou náhodně přehrány všechny skladby. Přehrávání se spustí ihned. \n \nVAROVÁNÍ: při ovládání této služby buďte opatrní, pokud ji zavřete a pak se ji znovu pokusíte použít, aplikace nejspíše spadne. Více Zpětná vazba Vytvořit problém na GitHubu @@ -361,6 +348,8 @@ %d sekunda %d sekundy + %d sekund %d sekund + Celková velikost: %s diff --git a/app/src/main/res/values-cy/strings.xml b/app/src/main/res/values-cy/strings.xml index a03fe97d2..d91839d60 100644 --- a/app/src/main/res/values-cy/strings.xml +++ b/app/src/main/res/values-cy/strings.xml @@ -302,9 +302,7 @@ Dangos dim ond artistiaid sy\'n cael eu cydnabyddiaeth ar albwm (mae\'n gweithio gorau ar llyfrgelloedd gyda thagiau da) Dechrau chwarae bob amser pan fydd clustffon wedi\'i gysylltu (efallai na fydd yn gweithio gyda phob un dyfeisiau) Mae\'r pre-amp yn cael ei gymhwyso i\'r addasiad presennol yn ystod chwarae - Yn dechrau Auxio yn y cyflwr wedi\'i gadw\'n barod. Os nad yw cyflwr sydd wedi\'i gadw ar gael, bydd pob cân yn cael eu chwarae ar hap. Bydd chwarae yn dechrau\'n syth. -\n -\nRHYBUDD: Byddwch yn ofalus wrth reoli\'r gwasanaeth hwn. Os ydych yn ei gau ac yna\'n ceisio ei ddefnyddio, mae\'n debygol y byddwch yn chwalu\'r ap. + Yn dechrau Auxio yn y cyflwr wedi\'i gadw\'n barod. Os nad yw cyflwr sydd wedi\'i gadw ar gael, bydd pob cân yn cael eu chwarae ar hap. Bydd chwarae yn dechrau\'n syth. \n \nRHYBUDD: Byddwch yn ofalus wrth reoli\'r gwasanaeth hwn. Os ydych yn ei gau ac yna\'n ceisio ei ddefnyddio, mae\'n debygol y byddwch yn chwalu\'r ap. Cadw y modd chwarae ar hap wrth chwarae cân newydd Rheoli sut mae cerddoriaeth a lluniau\'n cael eu llwytho Ail-lwytho\'r llyfrgell cerddoriaeth pryd bynnag y bydd yn ei newid (mae angen hysbysiad di-ball) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 0b00b3cb5..ec5d292a3 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -1,6 +1,5 @@ - + - Erneut versuchen Genres Künstler @@ -29,7 +28,6 @@ Quellcode Lizenzen Entwickelt von Alexander Capehart - Einstellungen Erscheinungsbild Farbschema @@ -60,13 +58,10 @@ Inhalt Musik neu laden Musikbibliothek neu laden, verwendet gecachte Tags wenn möglich - Laden der Musik fehlgeschlagen Es konnte keine App gefunden werden, die diese Aufgabe übernehmen kann Das Verzeichnis wird nicht unterstützt - Musikbibliothek durchsuchen… - Titel %d Abspielen oder pausieren Zum letzten Lied springen @@ -77,10 +72,8 @@ Albumcover für %s Künstlerbild für %s Genrebild für %s - Unbekanntes Genre Kein Datum - Rot Rosa Lila @@ -97,7 +90,6 @@ Orange Braun Grau - Geladene Lieder: %d %d Lied @@ -251,10 +243,10 @@ Zur Wiedergabeliste hinzufügen Wiedergabeliste erstellt Löschen - Wiedergabeliste löschen\? + Wiedergabeliste löschen? Keine Lieder Wiedergabeliste %d - %s löschen\? Dies kann nicht rückgängig gemacht werden. + %s löschen? Dies kann nicht rückgängig gemacht werden. Umbenennen Wiedergabeliste umbenennen Wiedergabeliste umbenannt @@ -304,9 +296,7 @@ Wiedergabe/Pause beim Springen oder Bearbeiten der Warteschlange beibehalten Aus Wiedergabe starten - Startet Auxio mit dem vorher gespeicherten Zustand. Wenn kein gespeicherter Zustand vorhanden ist, werden alle Lieder zufällig abgespielt. Die Wiedergabe startet sofort. -\n -\nACHTUNG: Sei vorsichtig bei der Steuerung dieses Dienstes. Wenn du ihn schließt und dann erneut versuchst, ihn zu nutzen, stürzt die App wahrscheinlich ab. + Startet Auxio mit dem vorher gespeicherten Zustand. Wenn kein gespeicherter Zustand vorhanden ist, werden alle Lieder zufällig abgespielt. Die Wiedergabe startet sofort. \n \nACHTUNG: Sei vorsichtig bei der Steuerung dieses Dienstes. Wenn du ihn schließt und dann erneut versuchst, ihn zu nutzen, stürzt die App wahrscheinlich ab. Mehr Ein Issue auf GitHub erstellen Rückmeldung @@ -353,4 +343,5 @@ %d Sekunde %d Sekunden + Gesamte Größe: %s diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index a4bbc2bb2..7ee194e1f 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -124,4 +124,4 @@ Ισοσταθμιστής Ενιαία κυκλοφορία Σινγκλ - \ No newline at end of file + diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index a6afc5c8c..2c3a20f17 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -1,9 +1,7 @@ - + - Un reproductor de música simple y racional para Android. Ver y controlar la reproducción musical - Reintentar Géneros Artistas @@ -37,7 +35,6 @@ Código fuente Licencias Desarrollado por Alexander Capehart - Configuración Aspecto y comportamiento Tema @@ -69,13 +66,10 @@ Contenido Actualizar música Recargar la biblioteca musical, utilizando las etiquetas en caché cuando sea posible - Falló la carga de música No se encontró ninguna aplicación que pueda manejar esta tarea No se admite esta carpeta - Buscar en la fonoteca… - Pista %d Reproducir o pausar Saltar a la siguiente canción @@ -92,13 +86,11 @@ Carátula de álbum para %s Imagen de artista para %s Imagen de género para %s - Artista desconocido Género desconocido Sin fecha Ninguna pista Sin música en reproducción - Rojo Rosa Púrpura @@ -115,7 +107,6 @@ Naranja Marrón Gris - Canciones cargadas: %d %d canción @@ -261,7 +252,7 @@ Cambiar nombre de lista de reproducción Lista de reproducción renombrada Lista de reproducción eliminada - ¿Borrar %s\? Esto no se puede deshacer. + ¿Borrar %s? Esto no se puede deshacer. ¿Quiere eliminar la lista de reproducción? Editar Editando %s @@ -308,9 +299,7 @@ Permanecer en reproducción/pausa al saltar o editar la cola Apagar Iniciar reproducción - Inicia Auxio utilizando el estado previamente guardado. Si no hay ningún estado guardado, todas las canciones se reproducirán aleatoriamente. La reproducción comenzará inmediatamente. -\n -\nADVERTENCIA: Ten cuidado al controlar este servicio, si lo cierras y luego intentas usarlo de nuevo, probablemente se bloqueará la aplicación. + Inicia Auxio utilizando el estado previamente guardado. Si no hay ningún estado guardado, todas las canciones se reproducirán aleatoriamente. La reproducción comenzará inmediatamente. \n \nADVERTENCIA: Ten cuidado al controlar este servicio, si lo cierras y luego intentas usarlo de nuevo, probablemente se bloqueará la aplicación. Más Crear una incidencia en GitHub Enviar un correo electrónico diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 7e4266040..1e7d1ba43 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -166,9 +166,7 @@ +%.1f dB %d Hz Laadime sinu muusikakogu… (%1$d/%2$d) - Auxio käivitub varem salvestatud olekus. Kui sellist olekut ei leidu, siis segatakse kõikide lugude järjekord ning taasesitus algab koheselt. -\n -\nHOIATUS: Ole selle teenuse kasutamisel hoolikas - kui sa ta sulged ja siis proovid uuesti kasutada, siis rakendus ilmselt jookseb kokku. + Auxio käivitub varem salvestatud olekus. Kui sellist olekut ei leidu, siis segatakse kõikide lugude järjekord ning taasesitus algab koheselt. \n \nHOIATUS: Ole selle teenuse kasutamisel hoolikas - kui sa ta sulged ja siis proovid uuesti kasutada, siis rakendus ilmselt jookseb kokku. Kohanda endale sobivaks Seadista kasutajaliidese juhtnuppe ning käitumist Ekraan @@ -345,4 +343,5 @@ %d sekund %d sekundit + Maht kokku: %s diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 1d4fb1e59..d2005caa3 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -222,7 +222,7 @@ Poista Nimeä uudelleen Nimeä soittolista uudelleen - Poistetaanko soittolista\? + Poistetaanko soittolista? Muokataan %s Muokkaa Poista tämä kappale @@ -235,7 +235,7 @@ Näytä ja hallinnoi musiikin toistoa Siirrä tämä kappale Ei levyä - Poistetaanko %s\? Tätä toimenpidettä ei voi perua. + Poistetaanko %s? Tätä toimenpidettä ei voi perua. Pakota neliömäiset albumikannet Lataa musiikkikirjasto uudelleen, käytä välimuistissa olevia tunnisteita kun mahdollista Rajaa kaikki albumikannet 1:1-suhteeseen @@ -343,4 +343,5 @@ %d sekunti %d sekuntia + Koko yhteensä: %s diff --git a/app/src/main/res/values-fil/strings.xml b/app/src/main/res/values-fil/strings.xml index 36d92e856..5ffa4d997 100644 --- a/app/src/main/res/values-fil/strings.xml +++ b/app/src/main/res/values-fil/strings.xml @@ -95,4 +95,4 @@ Naisin ang track Babala: Ang pag-iba ng pre-amp sa mataas na positibong ayos ay maaaring magdulot ng karurukan sa ilang mga audio track. Ayos na \'di gamit ang mga tag - \ No newline at end of file + diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index f2a602bd5..7eb0e188b 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -51,7 +51,7 @@ Orange Brun Gris - Titres chargés : %d + Titres chargés : %d %d titre %d titres @@ -175,7 +175,7 @@ Virgule (,) Point-virgule (;) Ignore les fichiers audio qui ne sont pas de la musique, tels que les podcasts - Attention : L\'utilisation de ce paramètre peut entraîner l\'interprétation incorrecte de certaines balises comme ayant plusieurs valeurs. Vous pouvez résoudre ce problème en préfixant les caractères de séparation indésirables avec une barre oblique inverse (\\). + Attention : L\'utilisation de ce paramètre peut entraîner l\'interprétation incorrecte de certaines balises comme ayant plusieurs valeurs. Vous pouvez résoudre ce problème en préfixant les caractères de séparation indésirables avec une barre oblique inverse (\\). Exclure non-musique Lire depuis l\'album Barre oblique (/) @@ -208,7 +208,7 @@ %d Hz Revenir au titre précédent Ajouter à la playlist - Artistes chargés : %d + Artistes chargés : %d Rembobiner avant de passer en arrière Image d\'artiste pour %s Aucune piste @@ -218,8 +218,8 @@ Déplacer cet onglet Renommer Modifier le mode de répétition - Albums chargés : %d - Durée totale : %s + Albums chargés : %d + Durée totale : %s Effacer la requête de recherche Image de la playlist pour %s Disque %d @@ -240,19 +240,19 @@ %d kbits/s +%.1f dB -%.1f dB - Supprimer %s ? Cette opération ne peut pas être annulée. + Supprimer %s ? Cette opération ne peut pas être annulée. Attention&nbsp;: Le fait de régler le préampli très fort peut entraîner des distortions audibles sur certaines pistes audio. Playlist %d Apparaît sur Renommer la playlist - Supprimer la playlist ? + Supprimer la playlist ? Partager Supprimer ce titre Déplacer ce titre Ouvrir la file d\'attente Aucun titre Modification de %s - Genres chargés : %d + Genres chargés : %d Image de genre pour %s Codec audio gratuit sans perte (FLAC) %d sélectionnés @@ -287,7 +287,7 @@ Faire un don Playlist importée Soutiens - Faites un don au projet pour que votre nom soit ajouté ici ! + Faites un don au projet pour que votre nom soit ajouté ici ! Garder la pause La lecture/pause reste active lors du passage à la file d\'attente ou de sa modification Exporter @@ -299,7 +299,7 @@ Utiliser les chemins compatibles Windows Désactivé Démarrer la lecture - Démarre Auxio en utilisant le dernier état enregistré. S\'il n\'y en a aucun, tous les titres seront remélangés et la lecture commencera immédiatement.\n\nATTENTION : Faites attention en contrôlant ce service, si vous le fermez puis essayez de l\'utiliser à nouveau, vous ferez probablement planter l\'appli. + Démarre Auxio en utilisant le dernier état enregistré. S\'il n\'y en a aucun, tous les titres seront remélangés et la lecture commencera immédiatement.\n\nATTENTION : Faites attention en contrôlant ce service, si vous le fermez puis essayez de l\'utiliser à nouveau, vous ferez probablement planter l\'appli. Plus Avis Faire un ticket sur GitHub @@ -347,4 +347,5 @@ %d secondes %d secondes + Taille totale : %s diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index eb68df5f4..0a3f29205 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -238,4 +238,4 @@ Imaxe da lista de reprodución para %s ampersand ganancia da repetición - \ No newline at end of file + diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index ea3995d17..bcd2f08cd 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -93,7 +93,7 @@ प्लेलिस्टें गोल मोड सभी गीतों से चलाएं - %s हटाएँ\? इसे पूर्ववत नहीं किया जा सकता। + %s हटाएँ? इसे पूर्ववत नहीं किया जा सकता। लोड किए गए गाने: %d अवरोही लायब्रेरी टैब की दृश्यता और क्रम बदलें @@ -109,7 +109,7 @@ लाइव सिंगल रीमिक्स सिंगल संकलन - प्लेलिस्ट हटाएँ\? + प्लेलिस्ट हटाएँ? ब्लैक थीम संगीत प्लेबैक देखें और नियंत्रित करें रीसेट @@ -303,7 +303,5 @@ कतार छोड़ते या संपादित करते समय चलता/रोका रखिए बंद प्लेबैक शुरू करें - पहले से सहेजे गए स्टेट का उपयोग करके Auxio को शुरू करता है। यदि कोई सहेजा हुआ स्टेट उपलब्ध नहीं है, तो सभी गाने शफल पर चलेंगे और प्लेबैक तुरंत शुरू हो जाएगा। -\n -\nचेतावनी: इस सेवा को नियंत्रित करते समय सावधान रहें, यदि आप इसे बंद करके फिर से उपयोग करने का प्रयास करते हैं, तो संभवतः ऐप क्रैश हो जाएगा। - \ No newline at end of file + पहले से सहेजे गए स्टेट का उपयोग करके Auxio को शुरू करता है। यदि कोई सहेजा हुआ स्टेट उपलब्ध नहीं है, तो सभी गाने शफल पर चलेंगे और प्लेबैक तुरंत शुरू हो जाएगा। \n \nचेतावनी: इस सेवा को नियंत्रित करते समय सावधान रहें, यदि आप इसे बंद करके फिर से उपयोग करने का प्रयास करते हैं, तो संभवतः ऐप क्रैश हो जाएगा। + diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 271d92ee8..71525a208 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -1,4 +1,4 @@ - + Učitavanje glazbe Učitavanje tvoje zbirke glazbe … @@ -248,13 +248,13 @@ Popis pjesama %d Preimenuj Preimenuj popis pjesama - Izbrisati popis pjesama\? + Izbrisati popis pjesama? Popis pjesama je stvoren Popis pjesama je preimenovan Popis pjesama je izbrisan Dodano u popis pjesama Uredi - Izbrisati %s\? To je nepovratna radnja. + Izbrisati %s? To je nepovratna radnja. Uređivanje popisa pjesama %s Sudjeluje u Dijeli @@ -299,9 +299,7 @@ Nastavi reprodukciju/pauziranje prilikom preskakanja ili uređivanja redoslijeda Isključeno Pokreni reprodukciju - Pokreće Auxio koristeći prethodno spremljeno stanje. Ako nijedno spremljeno stanje nije dostupno, sve će se pjesme nasumično reproducirati. Reprodukcija će započeti odmah. -\n -\nUPOZORENJE: Oprez pri upravljanju ovom uslugom. Ako je zatvoriš i zatim je pokušaš ponovo koristiti, aplikacija će se vjerojatno zatvoriti. + Pokreće Auxio koristeći prethodno spremljeno stanje. Ako nijedno spremljeno stanje nije dostupno, sve će se pjesme nasumično reproducirati. Reprodukcija će započeti odmah. \n \nUPOZORENJE: Oprez pri upravljanju ovom uslugom. Ako je zatvoriš i zatim je pokušaš ponovo koristiti, aplikacija će se vjerojatno zatvoriti. Više Povratne informacije Prijavi problem na GitHubu diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index b28b85802..059d016d1 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -124,7 +124,7 @@ Lejátszólistához adva Visszatekerés visszaugrás előtt Ismétlés szünet - %s törlése\? Ez nem fordítható vissza. + %s törlése? Ez nem fordítható vissza. Hangsáv Új dal lejátszásakor a keverési mód bekapcsolva tartása A számokkal vagy \"the\" típusú szavakkal kezdődő nevek helyes rendezése (legjobban angol nyelvű zenékkel működik) @@ -258,7 +258,7 @@ Advanced Audio Coding (AAC) Megjelenik itt, Megoszt - Lejátszólista törlése\? + Lejátszólista törlése? Távolítsa el ezt a dalt Auxio ikon Nincs lemez diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index 3aa7ad135..b68fd8a9e 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -208,4 +208,4 @@ Modificante %s Lista de reproduction %d Initiar le reproduction - \ No newline at end of file + diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index d2f59828f..8ecef4b2d 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -1,4 +1,4 @@ - + Un lettore musicale semplice ed intuitivo per Android. @@ -37,7 +37,6 @@ Licenze Alexander Capehart Statistiche della libreria - Impostazioni Aspetto Tema @@ -71,13 +70,10 @@ Contenuti Aggiorna libreria Ricarica la libreria musicale, usando i tag nella cache quando possibile - Caricamento musica fallito Nessuna app può completare questa azione Questa cartella non è supportata - Cerca nella libreria… - Traccia %d Riproduci o metti in pausa Passa al brano successivo @@ -94,13 +90,11 @@ Copertina album di %s Immagine artista per %s Immagine genere per %s - Artista sconosciuto Genere sconosciuto Data sconosciuta Nessuna traccia Nessun brano in riproduzione - Rosso Rosa Viola @@ -117,7 +111,6 @@ Arancione Marrone Grigio - Brani trovati: %d Album trovati: %d Artisti trovati: %d @@ -256,11 +249,11 @@ Nessun brano Playlist %d Elimina - Eliminare la playlist\? + Eliminare la playlist? Rinomina Rinomina playlist Modifica - Eliminare %s\? L\'operazione non può essere annullata. + Eliminare %s? L\'operazione non può essere annullata. Playlist eliminata Playlist rinominata Condividi diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 2e9b21ce2..cc00b79bb 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -160,7 +160,7 @@ מחיקה שינוי שם שינוי שם רשימת השמעה - למחוק את רשימת ההשמעה\? + למחוק את רשימת ההשמעה? עריכה כתום תיקיות מוזיקה @@ -235,7 +235,7 @@ אין דיסק ירוק עמוק צהוב - למחוק את %s\? פעולה זו לא ניתן לביטול. + למחוק את %s? פעולה זו לא ניתן לביטול. שיר מיון חכם הצגה diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index afbc8ccbe..92a3ea8e8 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -244,11 +244,11 @@ 消去 名前の変更 プレイリストの名前を変更する - プレイリストを削除しますか\? + プレイリストを削除しますか? プレイリストが削除されました 編集 プレイリストの名前が変更されました - %sを削除しますか\? この操作は元に戻すことができません。 + %sを削除しますか? この操作は元に戻すことができません。 共有 ディスクがありません %sを編集中 diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index b544d67dd..6980eba9f 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -253,10 +253,10 @@ 재생 목록 %d 노래 없음 삭제 - %s 항목을 삭제하시겠습니까\? 이 작업은 취소할 수 없습니다. + %s 항목을 삭제하시겠습니까? 이 작업은 취소할 수 없습니다. 이름 바꾸기 재생 목록 이름 바꾸기 - 재생 목록을 삭제하시겠습니까\? + 재생 목록을 삭제하시겠습니까? 편집 에 나타납니다 공유 @@ -304,9 +304,7 @@ 일시 중지 기억 끄기 재생 시작 - 이전에 저장된 상태에 따라 Auxio를 시작합니다. 저장된 상태가 없으면 모든 곡을 무작위 재생합니다. 재생은 즉시 시작됩니다. -\n -\n경고: 이 서비스는 주의하여 사용하세요. 서비스를 닫은 뒤 다시 사용하려고 할 경우 앱이 충돌할 수 있습니다. + 이전에 저장된 상태에 따라 Auxio를 시작합니다. 저장된 상태가 없으면 모든 곡을 무작위 재생합니다. 재생은 즉시 시작됩니다. \n \n경고: 이 서비스는 주의하여 사용하세요. 서비스를 닫은 뒤 다시 사용하려고 할 경우 앱이 충돌할 수 있습니다. 더 보기 전자우편을 전송합니다 깃허브에 문제를 제기합니다 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 9214faf51..485e170d6 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -102,7 +102,7 @@ %d daina %d dainos - %d albumų + %d dainų %d dainų Dinaminė @@ -251,7 +251,7 @@ Ištrinti „%s“? To negalima atkurti. Pervadinti Pervadinti grojaraštį - Ištrinti grojaraštį\? + Ištrinti grojaraštį? Nėra dainų Redaguoti Bendrinti diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index a6b3daec9..4a4cb755f 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -1,2 +1,3 @@ - \ No newline at end of file + + diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 744e33f5e..2ee144041 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -95,4 +95,4 @@ കാണുക പങ്കിടുക ദൃശ്യമാകുന്നു - \ No newline at end of file + diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 4f3ec22c4..3291bf7f0 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -113,7 +113,7 @@ Intelligent sortering Gi nytt navn Gi spillelisten nytt navn - Slett spilleliste\? + Slett spilleliste? OK Versjon Wiki diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index f1a85658c..ae3ce66db 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -16,9 +16,9 @@ Oplopend Speel af Shuffle - Speel van alle nummers + Speel van alle nummers Speel vanaf album - Speel van artiest + Speel van artiest Nu afspelen Wachtrij Speel volgende @@ -212,7 +212,7 @@ Verwijder afspeellijst? Herhaalmodus Open de wachtrij - %s verwijderen\? Dit kan niet ongedaan worden gemaakt. + %s verwijderen? Dit kan niet ongedaan worden gemaakt. Uit Hoge kwaliteit Genre diff --git a/app/src/main/res/values-nn/strings.xml b/app/src/main/res/values-nn/strings.xml index 2f19d7aaa..5d6c9e821 100644 --- a/app/src/main/res/values-nn/strings.xml +++ b/app/src/main/res/values-nn/strings.xml @@ -1,4 +1,4 @@ - + Spor Sorter diff --git a/app/src/main/res/values-or/strings.xml b/app/src/main/res/values-or/strings.xml index 9b90d0cd7..9811642e1 100644 --- a/app/src/main/res/values-or/strings.xml +++ b/app/src/main/res/values-or/strings.xml @@ -5,4 +5,4 @@ ସବୁଜ ନୀଳ ଘନ ନୀଳ - \ No newline at end of file + diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index 836dc4d8c..821ca3014 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -17,4 +17,4 @@ البم اینڈروئیڈ لئی سادے سنگیت دی اَیپ۔ ریمیکس دا سنگل - \ No newline at end of file + diff --git a/app/src/main/res/values-pa/strings.xml b/app/src/main/res/values-pa/strings.xml index c7108561d..28045a317 100644 --- a/app/src/main/res/values-pa/strings.xml +++ b/app/src/main/res/values-pa/strings.xml @@ -195,10 +195,10 @@ ਨਾਂ ਬਦਲੋ ਪਲੇਅ-ਲਿਸਟ ਦਾ ਨਾਂ ਬਦਲੋ - ਪਲੇਅ-ਲਿਸਟ ਮਿਟਾਓ\? + ਪਲੇਅ-ਲਿਸਟ ਮਿਟਾਓ? ਸੂਝ-ਬੂਝ ਨਾਲ ਲੜੀਬੱਧ ਉਹਨਾਂ ਨਾਵਾਂ ਨੂੰ ਠੀਕ ਤਰ੍ਹਾਂ ਲੜੀਬੱਧ ਕਰੋ ਜੋ ਨੰਬਰਾਂ ਜਾਂ ਸ਼ਬਦਾਂ ਨਾਲ ਸ਼ੁਰੂ ਹੁੰਦੇ ਹਨ ਜਿਵੇਂ ਕਿ \"ਦਾ\" (ਅੰਗਰੇਜ਼ੀ-ਭਾਸ਼ਾ ਦੇ ਸੰਗੀਤ ਦੇ ਨਾਲ ਸਭ ਤੋਂ ਵਧੀਆ ਕੰਮ ਕਰਦਾ ਹੈ) - %s ਹਟਾਉਣਾ ਹੈ\? ਇਸ ਨੂੰ ਅਣਕੀਤਾ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ। + %s ਹਟਾਉਣਾ ਹੈ? ਇਸ ਨੂੰ ਅਣਕੀਤਾ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ। ਗੂੜ੍ਹਾ ਨੀਲਾ %d ਕਲਾਕਾਰ @@ -296,7 +296,5 @@ ਵਿਰਾਮ ਯਾਦ ਰੱਖੋ ਬੰਦ ਪਲੇਬੈਕ ਸ਼ੁਰੂ ਕਰੋ - ਪਹਿਲਾਂ ਸੁਰੱਖਿਅਤ ਕੀਤੀ ਸਥਿਤੀ ਦੀ ਵਰਤੋਂ ਕਰਕੇ Auxio ਨੂੰ ਸ਼ੁਰੂ ਕਰਦਾ ਹੈ। ਜੇਕਰ ਕੋਈ ਰੱਖਿਅਤ ਸਥਿਤੀ ਉਪਲਬਧ ਨਹੀਂ ਹੈ, ਤਾਂ ਸਾਰੇ ਗੀਤ ਸ਼ਫਲ ਤੇ ਚੱਲਣਗੇ ਅਤੇ ਪਲੇਬੈਕ ਤੁਰੰਤ ਸ਼ੁਰੂ ਹੋ ਜਾਵੇਗਾ। -\n -\nਚੇਤਾਵਨੀ: ਇਸ ਸੇਵਾ ਨੂੰ ਨਿਯੰਤਰਿਤ ਕਰਨ ਵਿੱਚ ਸਾਵਧਾਨ ਰਹੋ, ਜੇਕਰ ਤੁਸੀਂ ਇਸਨੂੰ ਬੰਦ ਕਰਦੇ ਹੋ ਅਤੇ ਫਿਰ ਇਸਨੂੰ ਦੁਬਾਰਾ ਵਰਤਣ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰਦੇ ਹੋ, ਤਾਂ ਤੁਸੀਂ ਸ਼ਾਇਦ ਐਪ ਨੂੰ ਕ੍ਰੈਸ਼ ਕਰ ਦਿਓਗੇ। - \ No newline at end of file + ਪਹਿਲਾਂ ਸੁਰੱਖਿਅਤ ਕੀਤੀ ਸਥਿਤੀ ਦੀ ਵਰਤੋਂ ਕਰਕੇ Auxio ਨੂੰ ਸ਼ੁਰੂ ਕਰਦਾ ਹੈ। ਜੇਕਰ ਕੋਈ ਰੱਖਿਅਤ ਸਥਿਤੀ ਉਪਲਬਧ ਨਹੀਂ ਹੈ, ਤਾਂ ਸਾਰੇ ਗੀਤ ਸ਼ਫਲ ਤੇ ਚੱਲਣਗੇ ਅਤੇ ਪਲੇਬੈਕ ਤੁਰੰਤ ਸ਼ੁਰੂ ਹੋ ਜਾਵੇਗਾ। \n \nਚੇਤਾਵਨੀ: ਇਸ ਸੇਵਾ ਨੂੰ ਨਿਯੰਤਰਿਤ ਕਰਨ ਵਿੱਚ ਸਾਵਧਾਨ ਰਹੋ, ਜੇਕਰ ਤੁਸੀਂ ਇਸਨੂੰ ਬੰਦ ਕਰਦੇ ਹੋ ਅਤੇ ਫਿਰ ਇਸਨੂੰ ਦੁਬਾਰਾ ਵਰਤਣ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰਦੇ ਹੋ, ਤਾਂ ਤੁਸੀਂ ਸ਼ਾਇਦ ਐਪ ਨੂੰ ਕ੍ਰੈਸ਼ ਕਰ ਦਿਓਗੇ। + diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 0ed966b7a..7455540f4 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -1,6 +1,5 @@ - + - Ponów Gatunki Wykonawcy @@ -25,7 +24,6 @@ Wersja Kod źródłowy Licencje - Ustawienia Wygląd Motyw @@ -35,13 +33,9 @@ Kolor akcentów Dźwięk Interfejs - - Utwór %d Odtwórz albo zapauzuj - Szukaj w bibliotece… - Czerwony Różowy Fioletowy @@ -55,7 +49,6 @@ Pomarańczowy Brązowy Szary - %d utwór %d utwory @@ -258,10 +251,10 @@ Dodano do listy odtwarzania Playlista %d Usuń - Usunąć %s\? Tego nie da się cofnąć. + Usunąć %s? Tego nie da się cofnąć. Zmień nazwę Zmień nazwę listy odtwarzania - Usunąć playlistę\? + Usunąć playlistę? Edytuj Pojawia się na Udostępnij @@ -358,4 +351,5 @@ %d sekund %d sekund + Całkowita wielkość: %s diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 478a6bac5..54d2b1c8b 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -1,6 +1,5 @@ - + - Tentar novamente Gêneros Artistas @@ -25,7 +24,6 @@ Código-fonte Licenças Desenvolvido por Alexander Capehart - Configurações Visualização e Aparência Tema @@ -36,13 +34,9 @@ Áudio Personalizar Manter modo aleatório ativado - - Faixa %d Reproduzir ou pausar - Pesquise na sua biblioteca… - Vermelho Rosa Roxo @@ -56,7 +50,6 @@ Laranja Marrom Cinza - Músicas carregadas: %d %d música @@ -259,13 +252,13 @@ Editando %s Organizar por Música - Apagar playlist\? + Apagar playlist? Playlist deletada Nova playlist Playlist renomeada Renomear playlist Aparece em - Apagar %s\? Esta ação não pode ser desfeita. + Apagar %s? Esta ação não pode ser desfeita. Demo Playlist importada Visualizar @@ -306,9 +299,7 @@ Reproduzir música sozinha Imagem de seleção Iniciar a reprodução - Inicia o Auxio usando o estado salvo anteriormente. Se nenhum estado salvo estiver disponível, todas as músicas serão reproduzidas aleatoriamente. -\n -\nAVISO: Tenha cuidado ao controlar este serviço. Se você fechá-lo e então tentar usá-lo novamente, provavelmente ocasionará um crash no aplicativo. + Inicia o Auxio usando o estado salvo anteriormente. Se nenhum estado salvo estiver disponível, todas as músicas serão reproduzidas aleatoriamente. \n \nAVISO: Tenha cuidado ao controlar este serviço. Se você fechá-lo e então tentar usá-lo novamente, provavelmente ocasionará um crash no aplicativo. Mais Envie um e-mail Crie uma issue no GitHub diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 4a12fbc37..86e5481d7 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -276,7 +276,7 @@ Forçar capas em formato quadrado Lista de reprodução renomeada Renomear lista de reprodução - Excluir %s\? Não pode ser desfeito. + Excluir %s? Não pode ser desfeito. Só aparecer Desligado Incapaz de exportar a lista de reprodução para este ficheiro diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 04678cc37..9e3d45d2e 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -160,7 +160,7 @@ Taie toate coperțile de album la raportul de aspect 1:1 Sortare inteligentă Redenumiți lista da redare - Șterge lista de redare\? + Șterge lista de redare? Redenumiți Controlează cum muzica și imaginile sunt încărcate Sortează după @@ -185,8 +185,7 @@ Direcție Fără dată Playlist gol - Atenție: Folosirea acestei setări poate rezulta în unele taguri interpretate greșit ca având mai multe valori. -\nPoți rezolva asta punând un backslash (\\) înaintea caracterelor de separare nedorite. + Atenție: Folosirea acestei setări poate rezulta în unele taguri interpretate greșit ca având mai multe valori. \nPoți rezolva asta punând un backslash (\\) înaintea caracterelor de separare nedorite. Pornește mereu redarea când niște căști sunt conectate (s-ar putea să nu meargă pe toate dispozitivele) Rescanează muzica Șterge memoria cache cu taguri și reîncarcă biblioteca de muzică de tot (mai încet, dar mai complet) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 3e0b7379d..9d9f0a8ef 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -113,13 +113,13 @@ %d трек %d трека %d треков - %d трека + %d треков %d альбом %d альбома %d альбомов - %d альбомы + %d альбомов Музыка загружается Загрузка музыки @@ -253,11 +253,11 @@ Удалить Переименовать Переименовать плейлист - Удалить плейлист\? + Удалить плейлист? Плейлист переименован Плейлист удалён Редактировать - Удалить %s\? Это действие не может быть отменено. + Удалить %s? Это действие не может быть отменено. Появляется на Редактирование %s Нет диска @@ -301,9 +301,7 @@ Оставлять воспроизведение/паузу во время пропуска или редактирования очереди Запоминать паузу Откл. - Запускать Auxio, используя ранее сохранённое состояние. если сохранённое состояние недоступно, все песни будут перетасованы. Воспроизведение начнётся немедленно. -\n -\nПредупреждение: будьте осторожны при управлении этой службой, если вы закроете её, а затем попытаетесь использовать снова, вы, вероятно, приведёте к сбою приложения. + Запускать Auxio, используя ранее сохранённое состояние. если сохранённое состояние недоступно, все песни будут перетасованы. Воспроизведение начнётся немедленно. \n \nПредупреждение: будьте осторожны при управлении этой службой, если вы закроете её, а затем попытаетесь использовать снова, вы, вероятно, приведёте к сбою приложения. Начать воспроизведение Больше Отзывы diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 043a6ed8e..5326d91c4 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -195,7 +195,7 @@ Slika žanra za %s Nastavitev virov za nalaganje glasbe DJ Miksi - Odstrani seznam predvajanja\? + Odstrani seznam predvajanja? Modra Temno modra Zaobljen način @@ -263,7 +263,7 @@ Vsebina Preimenuj seznam predvajanja Bitna hitrost - Odstraniti %s\? Tega ni mogoče razveljaviti. + Odstraniti %s? Tega ni mogoče razveljaviti. Nastavitve Konfigurirajte znake, ki označujejo več vrednosti zaporedoma Ni skladbe @@ -301,4 +301,4 @@ Izvozite Absolutna Relativna - \ No newline at end of file + diff --git a/app/src/main/res/values-sq/strings.xml b/app/src/main/res/values-sq/strings.xml index 4d096c9d0..38a5003a3 100644 --- a/app/src/main/res/values-sq/strings.xml +++ b/app/src/main/res/values-sq/strings.xml @@ -1,4 +1,4 @@ - + Ngarkimi i muzikës Duke ngarkuar muzikën diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 1d151baf7..6b010b61a 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -24,4 +24,4 @@ Ливе епизод Епизоде Епизод - \ No newline at end of file + diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index f79067b37..7461ea9d3 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -29,7 +29,7 @@ Spellistor Ny spellista Byt namn på spellista - Ta bort spellista\? + Ta bort spellista? Sök Filtrera Namn @@ -310,5 +310,5 @@ Påbörja uppspelning Spara utrymme MPEG-4 innehållande %s - Påbörjar Auxio med det tidigare sparade tillståndet. Om inget sparad tillstånd är tillgängligt kommer alla låtar blandas. Uppspelning börjar omedelbart. \n\nOBS: Var försiktig vid användning av denna tjänst, om du stänger ner den och sedan försöker använda den igen kommer du troligen få appen att krascha. + Påbörjar Auxio med det tidigare sparade tillståndet. Om inget sparad tillstånd är tillgängligt kommer alla låtar blandas. Uppspelning börjar omedelbart. \n\nOBS: Var försiktig vid användning av denna tjänst, om du stänger ner den och sedan försöker använda den igen kommer du troligen få appen att krascha. diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 3f18eced4..dd161d16c 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -272,7 +272,7 @@ Hata bilgisi Kare albüm kapaklarına zorla Çalma listesi yeniden adlandırıldı - %s silinsin mi\? Geri alınamaz. + %s silinsin mi? Geri alınamaz. Üzerinde görünür Albüm yok Çalma listesini dışa aktar diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 2665931e8..abe1afda1 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -1,6 +1,5 @@ - + - Повторити спробу Жанри Виконавці @@ -24,7 +23,6 @@ Версія Вихідний код Ліцензії - Налаштування Вигляд Тема @@ -32,13 +30,9 @@ Темна Аудіо Персоналізація - - Пошук в бібліотеці… - Пісня %d Відтворити/Зупинити - Завантажено пісень: %d %d пісня @@ -257,8 +251,8 @@ Список відтворення створено Немає пісень Видалити - Видалити список відтворення\? - Видалити %s\? Цю дію не можна скасувати. + Видалити список відтворення? + Видалити %s? Цю дію не можна скасувати. Список відтворення видалено Перейменувати Перейменувати список відтворення @@ -308,9 +302,7 @@ Запам\'ятовувати паузу Вимкнено Почати відтворення - Запускати auxio, використовуючи раніше збережений стан. Якщо збережений стан недоступний, усі пісні будуть перетасовані. відтворення розпочнеться негайно. -\n -\nПопередження: будьте обережні при керуванні цією службою, якщо ви закриєте її, а потім спробуєте використовувати знову, ви, ймовірно, призведе до збою застосунка. + Запускати auxio, використовуючи раніше збережений стан. Якщо збережений стан недоступний, усі пісні будуть перетасовані. відтворення розпочнеться негайно. \n \nПопередження: будьте обережні при керуванні цією службою, якщо ви закриєте її, а потім спробуєте використовувати знову, ви, ймовірно, призведе до збою застосунка. Більше Зворотній зв\'язок Зробіть випуск на GitHub diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index cac618ad0..627d8424f 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -1,9 +1,7 @@ - + - 一款简洁、克制的 Android 音乐播放器。 查看并控制音乐播放 - 重试 流派 艺术家 @@ -37,7 +35,6 @@ 源代码 许可证 由 Alexander Capehart 开发 - 设置 外观和感觉 主题 @@ -71,13 +68,10 @@ 内容 刷新音乐 重新加载音乐库,如有可能使用缓存的标签 - 加载音乐失败 未找到可以处理此任务的应用 该目录不受支持 - 在曲库中搜索… - 第 %d 首曲目 播放或暂停 切换到下一首歌 @@ -94,13 +88,11 @@ %s 的专辑封面 %s 的艺术家图像 %s 的流派图像 - 未知艺术家 未知流派 没有日期 无曲目 未播放音乐 - 红色 粉色 紫色 @@ -117,7 +109,6 @@ 橙色 棕色 灰色 - 已加载 %d 首曲目 %d 首歌曲 @@ -302,9 +293,7 @@ 记住暂停状态 关闭 开始播放 - 使用之前使用的状态启动 Auxio。如果没有可用的已保存状态,将打乱所有歌曲的顺序。播放将立刻开始。 -\n -\n警告:请小心控制此服务,如果将其关闭然后试图再次使用可能造成应用崩溃。 + 使用之前使用的状态启动 Auxio。如果没有可用的已保存状态,将打乱所有歌曲的顺序。播放将立刻开始。 \n \n警告:请小心控制此服务,如果将其关闭然后试图再次使用可能造成应用崩溃。 更多 在 GithHub 上开 issue 发送电子邮件 @@ -350,4 +339,5 @@ %d 秒 + 总大小:%s diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index e84677593..382de6e29 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -1,6 +1,5 @@ - + - 重試 類型 演出者 @@ -25,7 +24,6 @@ 版本 原始碼 授權 - 設定 外觀 主題 @@ -36,13 +34,9 @@ 音訊 個人化 記憶隨機播放 - - 音軌 %d 播放 / 暫停 - 搜尋您的媒體… - %d 首歌曲 @@ -345,4 +339,5 @@ %d 秒 + 大小總計:%s