Merge pull request #1149 from OxygenCobalt/dev

v4.0.7
This commit is contained in:
Alexander Capehart
2025-07-10 21:30:49 -06:00
committed by GitHub
132 changed files with 3178 additions and 2505 deletions
+15
View File
@@ -1,5 +1,20 @@
# Changelog
## 4.0.7
#### What's New
- The MediaStore backend is back, enabling faster loading at without a file manager
the cost of reliability.
- All of the loading options added prior have been consolidated into a single
"music sources" dialog
#### Date Added
- Date added now reflects FileSystem date added
#### What's Fixed
- Fixed playlist songs incorrectly updating when resorting
- Fixed artists without songs having enabled play/pause toolbar options
## 4.0.6
#### What's Improved
+129 -87
View File
@@ -4,120 +4,162 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Project Overview
Auxio is a modern Android music player written in Kotlin that emphasizes simplicity and performance. It uses Media3 ExoPlayer for playback and includes a custom native music indexing library called musikr.
Auxio is a simple, rational music player for Android built on Media3 ExoPlayer. It features gapless playback, ReplayGain support, Android Auto integration, and advanced music indexing capabilities.
## Build System & Commands
## Essential Build Commands
### Prerequisites
- `cmake` and `ninja-build` must be installed before building
- Project uses git submodules - clone with `git clone --recurse-submodules`
- **Cannot build on Windows** - requires Unix-based system for Media3 build scripts
- Unix-based system (cannot build on Windows)
- Install `cmake` and `ninja-build`
- Clone with submodules: `git clone --recurse-submodules`
### Common Build Commands
### Build Commands
```bash
# Build debug version
# Build debug APK
./gradlew assembleDebug
# Build release version
# Build release APK
./gradlew assembleRelease
# Run tests
./gradlew test
# Clean build
./gradlew clean build
# Run connected tests
./gradlew connectedAndroidTest
# Code formatting (Spotless)
./gradlew spotlessApply
# Check code formatting
./gradlew spotlessCheck
# Install debug build on device
./gradlew installDebug
```
### Development Modules
- `app/` - Main Android application
- `musikr/` - Native music indexing library with TagLib integration
- `media/` - Patched Media3 ExoPlayer libraries (git submodule)
### Code Quality Commands
```bash
# Check code formatting (MUST pass before committing)
./gradlew spotlessCheck
# Apply code formatting fixes
./gradlew spotlessApply
# Run Android lint
./gradlew lint
# Run lint with automatic fixes
./gradlew lintFix
```
### Testing Commands
```bash
# Run unit tests
./gradlew test
# Run debug unit tests
./gradlew testDebugUnitTest
# Run musikr module tests specifically
./gradlew musikr:testDebug
# Run instrumentation tests (requires device/emulator)
./gradlew connectedAndroidTest
```
### Development Workflow
```bash
# Before committing: format code and run checks
./gradlew spotlessApply
./gradlew check
# Run a single test class
./gradlew test --tests "org.oxycblt.auxio.YourTestClass"
# Run a single test method
./gradlew test --tests "org.oxycblt.auxio.YourTestClass.yourTestMethod"
```
## Architecture Overview
### Core Architecture Pattern
- **MVVM** with ViewModels for each major screen (Home, Detail, Playback, Search)
- **Repository Pattern** - MusicRepository as single source of truth for music data
- **Dependency Injection** - Hilt/Dagger for modular dependency management
- **Single Activity Architecture** with Navigation Components
- **Service-Oriented** background music processing
### High-Level Architecture
- **Pattern**: MVVM (Model-View-ViewModel) with Dagger Hilt dependency injection
- **Navigation**: Single Activity architecture with Navigation Component
- **UI**: Material Design 3 with edge-to-edge display
- **Data**: Repository pattern with Room database and custom Musikr library
- **Playback**: MediaBrowserServiceCompat with vendored Media3/ExoPlayer
### Key Modules & Components
### Key Components
#### Music Management (`app/src/main/java/org/oxycblt/auxio/music/`)
- `MusicRepository` - Central music library state management
- `MusicViewModel` - UI layer for music data access
- `service/` - MediaBrowserServiceCompat integration
- `shim/` - Abstraction layer for musikr integration
#### Service Architecture
- `AuxioService` - Main MediaBrowserService for background playback
- `PlaybackServiceFragment` - Handles all playback operations
- `MusicServiceFragment` - Manages music browsing and library
#### Playback Engine (`app/src/main/java/org/oxycblt/auxio/playback/`)
- `PlaybackViewModel` - Main playback UI interface
- `PlaybackStateManager` - Core playback state management
- `service/` - Background ExoPlayer integration
- `queue/` - Playback queue management
- `persist/` - Playback state persistence (Room database)
- `replaygain/` - Audio processing for volume normalization
#### Data Layer
- `MusicRepository` - Primary interface for music data access
- `PersistenceRepository` - Handles playback state and playlists
- `Musikr` - Custom music indexing library (separate module)
- Bypasses MediaStore limitations
- Supports advanced metadata and tags
- Background indexing with progress
#### UI Structure (`app/src/main/java/org/oxycblt/auxio/`)
- `home/` - Main library browsing with customizable tabs
- `detail/` - Album, artist, genre, and playlist detail views
- `search/` - Music search functionality
- `list/` - Shared list components with sorting/filtering
- `ui/` - Custom UI components, theming, animations
#### UI Layer Structure
```
app/src/main/java/org/oxycblt/auxio/
├── MainActivity.kt # Single activity host
├── MainFragment.kt # Main container with bottom sheets
├── home/ # Home screen tabs (songs, albums, artists, etc.)
├── detail/ # Detail screens for albums/artists
├── playback/ # Playback UI and controls
├── search/ # Search functionality
├── settings/ # Preferences screens
├── list/ # Reusable list components
└── music/ # Music data models and repository
```
#### Native Music Library (`musikr/`)
- **Pipeline-based indexing** - Multi-stage scanning (Explore → Extract → Evaluate)
- **TagLib integration** - Native C++ metadata extraction
- **File system caching** - Device storage access optimization
- **Cover art management** - Embedded and external cover support
#### State Management
- StateFlow/MutableStateFlow for reactive state
- Shared ViewModels between fragments
- Event wrapper pattern for one-time UI events
- Lifecycle-aware observers
### Data Flow
1. musikr scans and indexes music files from device storage
2. MusicRepository manages indexed library and exposes to UI
3. ViewModels provide reactive state for UI components using StateFlow
4. PlaybackService handles audio playback via ExoPlayer
5. UI observes ViewModels and updates reactively
### Navigation Flow
1. `MainActivity` hosts all navigation
2. Two navigation graphs: `inner.xml` (main) and `outer.xml` (onboarding)
3. Bottom sheet for playback UI
4. Dialog destinations for popups
## Code Conventions
### Dependency Injection Setup
- `@HiltAndroidApp` on Auxio application class
- `@AndroidEntryPoint` on activities/fragments
- Modules: `MusicModule`, `PlaybackModule`, `UIModule`
- Scoped with `@Singleton` for app-wide instances
### Language & Libraries
- **Kotlin** - Primary language with coroutines for async operations
- **Hilt/Dagger** - Dependency injection
- **Room** - Local database for persistence
- **Navigation Components** - Fragment navigation
- **ViewBinding** - Type-safe view access
- **StateFlow/LiveData** - Reactive state management
- **Coil** - Image loading for cover art
## Important Development Notes
### Code Style
- Uses Spotless with ktfmt Dropbox style formatting
- License header required (see NOTICE file)
- C++ code uses Eclipse CDT formatting (eclipse-cdt.xml)
- Kotlin code formatted with ktfmt (Dropbox style)
- C++ code uses Eclipse CDT formatting
- Spotless enforces formatting automatically
- License headers required (enforced by Spotless)
## Testing
### Git Workflow
- Default branch: `dev` (development)
- PRs should target `dev` branch
- `master` contains stable releases only
### Test Structure
- Unit tests: `src/test/` directories
- Integration tests: `src/androidTest/` directories
- musikr module includes Robolectric tests
### Architectural Constraints
- Stick to F-Droid inclusion guidelines
- No proprietary dependencies
- Feature additions unlikely to be accepted
- Major UI changes discouraged
### Test Dependencies
- JUnit 4 for unit testing
- MockK for mocking
- Robolectric for Android unit tests
- Espresso for UI tests
### Testing Requirements
- Test all changes thoroughly
- Unit tests for business logic
- Consider edge cases for music metadata
- Test on different Android versions (min SDK 24)
## Key Development Notes
### Key Libraries
- AndroidX Navigation, Room, Media3
- Dagger Hilt for DI
- Kotlin Coroutines for async
- Coil for image loading
- Material Design Components 3
- **Custom Media3**: Uses patched Media3 ExoPlayer for enhanced playback features
- **Native Dependencies**: musikr module builds TagLib from source during compilation
- **Permission Handling**: Requires storage permissions for music file access
- **Background Services**: Foreground service for continuous music playback
- **Widget Support**: Multiple widget layouts with automatic sizing adaptation
- **ReplayGain**: Full support for MP3, FLAC, OGG, OPUS, and MP4 files
### Custom Modifications
- Vendored/patched Media3 in `media/` directory
- Custom patches for ExoPlayer features
- Modified libraries shouldn't be updated directly
+2 -2
View File
@@ -2,8 +2,8 @@
<h1 align="center"><b>Auxio</b></h1>
<h4 align="center">A simple, rational music player for android.</h4>
<p align="center">
<a href="https://github.com/oxygencobalt/Auxio/releases/tag/v4.0.5">
<img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v4.0.5&color=64B5F6&style=flat">
<a href="https://github.com/oxygencobalt/Auxio/releases/tag/v4.0.7">
<img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v4.0.7&color=64B5F6&style=flat">
</a>
<a href="https://github.com/oxygencobalt/Auxio/releases/">
<img alt="Releases" src="https://img.shields.io/github/downloads/OxygenCobalt/Auxio/total.svg?color=4B95DE&style=flat">
+2 -2
View File
@@ -18,8 +18,8 @@ android {
defaultConfig {
applicationId namespace
versionName "4.0.6"
versionCode 65
versionName "4.0.7"
versionCode 66
minSdk min_sdk
targetSdk target_sdk
+3
View File
@@ -2,6 +2,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- Android 13 uses READ_MEDIA_AUDIO instead of READ_EXTERNAL_STORAGE -->
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
@@ -145,4 +145,12 @@ object IntegerTable {
const val COVER_MODE_SAVE_SPACE = 0xA125
/** CoverMode.AsIs */
const val COVER_MODE_AS_IS = 0xA126
/** LocationMode.SAF */
const val LOCATION_MODE_SAF = 0xA127
/** LocationMode.MediaStore */
const val LOCATION_MODE_MEDIA_STORE = 0xA128
/** LocationMode.FileSystem */
const val FILTER_MODE_INCLUDE = 0xA129
/** LocationMode.FileSystem */
const val FILTER_MODE_EXCLUDE = 0xA12A
}
@@ -149,8 +149,10 @@ class ArtistDetailFragment : DetailFragment<Artist, Music>() {
// In the case that this header used to he configured to have no songs,
// we want to reset the visibility of all information that was hidden.
binding.detailPlayButton?.isVisible = true
binding.detailShuffleButton?.isVisible = true
binding.detailPlayButton?.isEnabled = true
binding.detailShuffleButton?.isEnabled = true
binding.detailToolbarPlay.isEnabled = true
binding.detailToolbarShuffle.isEnabled = true
} else {
// The artist does not have any songs, so hide functionality that makes no sense.
// ex. Play and Shuffle, Song Counts, and Genre Information.
@@ -159,6 +161,8 @@ class ArtistDetailFragment : DetailFragment<Artist, Music>() {
binding.detailSubhead.isVisible = false
binding.detailPlayButton?.isEnabled = false
binding.detailShuffleButton?.isEnabled = false
binding.detailToolbarPlay.isEnabled = false
binding.detailToolbarShuffle.isEnabled = false
}
binding.detailPlayButton?.setOnClickListener {
@@ -471,7 +471,7 @@ constructor(
fun applyPlaylistSongSort(sort: Sort) {
val playlist = _currentPlaylist.value ?: return
_editedPlaylist.value = sort.songs(_editedPlaylist.value ?: return)
refreshPlaylist(playlist.uid, UpdateInstructions.Replace(2))
refreshPlaylist(playlist.uid, UpdateInstructions.Replace(1))
}
/**
@@ -149,7 +149,7 @@ class PlaylistListFragment :
} else {
binding.homeNoMusicAction.isVisible =
indexingState == null || (empty && indexingState is IndexingState.Completed)
binding.homeNoMusicAction.text = getString(R.string.lbl_music_sources)
binding.homeNoMusicAction.text = getString(R.string.set_locations)
binding.homeNoMusicAction.setOnClickListener { homeModel.startChooseMusicLocations() }
}
}
@@ -22,13 +22,13 @@ import org.oxycblt.musikr.covers.Cover
import org.oxycblt.musikr.covers.CoverResult
import org.oxycblt.musikr.covers.MutableCovers
import org.oxycblt.musikr.covers.stored.CoverStorage
import org.oxycblt.musikr.fs.device.DeviceFile
import org.oxycblt.musikr.fs.File
import org.oxycblt.musikr.metadata.Metadata
class NullCovers(private val storage: CoverStorage) : MutableCovers<NullCover> {
override suspend fun obtain(id: String) = CoverResult.Hit(NullCover)
override suspend fun create(file: DeviceFile, metadata: Metadata) = CoverResult.Hit(NullCover)
override suspend fun create(file: File, metadata: Metadata) = CoverResult.Hit(NullCover)
override suspend fun cleanup(excluding: Collection<Cover>) {
storage.ls(setOf()).map { storage.rm(it) }
@@ -29,9 +29,9 @@ import kotlinx.coroutines.withContext
import kotlinx.coroutines.yield
import org.oxycblt.auxio.image.covers.SettingCovers
import org.oxycblt.auxio.music.MusicRepository.IndexingWorker
import org.oxycblt.auxio.music.shim.NoOpFileTreeCache
import org.oxycblt.auxio.music.shim.WriteOnlyFileTreeCache
import org.oxycblt.auxio.music.locations.LocationMode
import org.oxycblt.auxio.music.shim.WriteOnlyMutableCache
import org.oxycblt.musikr.Config
import org.oxycblt.musikr.IndexingProgress
import org.oxycblt.musikr.Interpretation
import org.oxycblt.musikr.Library
@@ -39,11 +39,11 @@ import org.oxycblt.musikr.Music
import org.oxycblt.musikr.Musikr
import org.oxycblt.musikr.MutableLibrary
import org.oxycblt.musikr.Playlist
import org.oxycblt.musikr.Query
import org.oxycblt.musikr.Song
import org.oxycblt.musikr.Storage
import org.oxycblt.musikr.cache.MutableCache
import org.oxycblt.musikr.fs.device.FileTreeCache
import org.oxycblt.musikr.fs.mediastore.MediaStore
import org.oxycblt.musikr.fs.saf.SAF
import org.oxycblt.musikr.playlist.db.StoredPlaylists
import org.oxycblt.musikr.tag.interpret.Naming
import org.oxycblt.musikr.tag.interpret.Separators
@@ -388,25 +388,20 @@ constructor(
} else {
Naming.simple()
}
val locations = musicSettings.musicLocations
val excludedLocations = musicSettings.excludedLocations
val withHidden = musicSettings.withHidden
val currentRevision = musicSettings.revision
val newRevision = currentRevision?.takeIf { withCache } ?: UUID.randomUUID()
val cache = if (withCache) cache else WriteOnlyMutableCache(cache)
val covers = settingCovers.mutate(context, newRevision)
val fileTreeCache =
if (musicSettings.useFileTreeCache) {
if (withCache) FileTreeCache.from(context)
else WriteOnlyFileTreeCache(FileTreeCache.from(context))
} else {
NoOpFileTreeCache()
val fs =
when (musicSettings.locationMode) {
LocationMode.SAF -> SAF.from(context, musicSettings.safQuery)
LocationMode.MEDIA_STORE -> MediaStore.from(context, musicSettings.mediaStoreQuery)
}
val query = Query(source = locations, exclude = excludedLocations)
val storage = Storage(cache, covers, storedPlaylists, fileTreeCache)
val interpretation = Interpretation(nameFactory, separators, withHidden)
val result = Musikr.new(context, storage, interpretation).run(query, ::emitIndexingProgress)
val storage = Storage(cache, covers, storedPlaylists)
val interpretation = Interpretation(nameFactory, separators)
val config = Config(fs, storage, interpretation)
val result = Musikr.new(context, config).run(::emitIndexingProgress)
// Music loading completed, update the revision right now so we re-use this work
// later.
musicSettings.revision = newRevision
@@ -24,9 +24,14 @@ import androidx.core.net.toUri
import dagger.hilt.android.qualifiers.ApplicationContext
import java.util.UUID
import javax.inject.Inject
import org.oxycblt.auxio.IntegerTable
import org.oxycblt.auxio.R
import org.oxycblt.auxio.music.locations.LocationMode
import org.oxycblt.auxio.settings.Settings
import org.oxycblt.auxio.util.unlikelyToBeNull
import org.oxycblt.musikr.fs.Location
import org.oxycblt.musikr.fs.mediastore.MediaStore
import org.oxycblt.musikr.fs.saf.SAF
import timber.log.Timber as L
/**
@@ -37,28 +42,37 @@ import timber.log.Timber as L
interface MusicSettings : Settings<MusicSettings.Listener> {
/** The current library revision. */
var revision: UUID?
/** The locations of music to load. */
var musicLocations: List<Location.Opened>
/** The locations to exclude from music loading. */
var excludedLocations: List<Location.Unopened>
/** Whether to exclude non-music audio files from the music library. */
val excludeNonMusic: Boolean
/** Whether to ignore hidden files and directories during music loading. */
val withHidden: Boolean
/** The mode for loading music locations (SAF or System database). */
var locationMode: LocationMode
/** The currently configured SAF query (if any) * */
var safQuery: SAF.Query
/** The currently configured MediaStore query (if any) * */
var mediaStoreQuery: MediaStore.Query
/** Whether to be actively watching for changes in the music library. */
val shouldBeObserving: Boolean
/** A [String] of characters representing the desired characters to denote multi-value tags. */
var separators: String
/** Whether to enable more advanced sorting by articles and numbers. */
val intelligentSorting: Boolean
/** Whether to use the file-system cache for improved loading times. */
val useFileTreeCache: Boolean
fun forceLocationUpdate()
interface Listener {
/** Called when the current music locations changed. */
fun onMusicLocationsChanged() {}
/** Called when a setting controlling how music is loaded has changed. */
fun onIndexingSettingChanged() {}
/** Called when the [shouldBeObserving] configuration has changed. */
fun onObservingChanged() {}
}
@@ -79,45 +93,6 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont
}
}
override var musicLocations: List<Location.Opened>
get() {
val locations =
sharedPreferences.getString(getString(R.string.set_key_music_locations), null)
?: return emptyList()
return locations.toOpenedLocations()
}
set(value) {
sharedPreferences.edit {
putString(getString(R.string.set_key_music_locations), value.stringify())
commit()
// Sometimes changing this setting just won't actually trigger the listener.
// Only this one. No idea why.
listener?.onMusicLocationsChanged()
}
}
override var excludedLocations: List<Location.Unopened>
get() {
val locations =
sharedPreferences.getString(getString(R.string.set_key_excluded_locations), null)
?: return emptyList()
return locations.toUnopenedLocations()
}
set(value) {
sharedPreferences.edit {
putString(
getString(R.string.set_key_excluded_locations), value.stringifyLocations())
commit()
listener?.onMusicLocationsChanged()
}
}
override val excludeNonMusic: Boolean
get() = sharedPreferences.getBoolean(getString(R.string.set_key_exclude_non_music), true)
override val withHidden: Boolean
get() = sharedPreferences.getBoolean(getString(R.string.set_key_with_hidden), false)
override val shouldBeObserving: Boolean
get() = sharedPreferences.getBoolean(getString(R.string.set_key_observing), false)
@@ -138,20 +113,109 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont
override val useFileTreeCache: Boolean
get() = sharedPreferences.getBoolean(getString(R.string.set_key_fs_cache), false)
override var locationMode: LocationMode
get() {
val mode =
sharedPreferences.getInt(
getString(R.string.set_key_locations_mode), IntegerTable.LOCATION_MODE_SAF)
return LocationMode.fromInt(mode) ?: LocationMode.SAF
}
set(value) {
sharedPreferences.edit {
putInt(getString(R.string.set_key_locations_mode), value.intCode)
apply()
}
}
override var safQuery: SAF.Query
get() {
val locations =
unlikelyToBeNull(
sharedPreferences.getString(
getString(R.string.set_key_music_locations), ""))
.toOpenedLocations()
val excludedLocations =
unlikelyToBeNull(
sharedPreferences.getString(
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)
}
set(value) {
sharedPreferences.edit {
putString(getString(R.string.set_key_music_locations), value.source.stringify())
putString(getString(R.string.set_key_excluded_locations), value.exclude.stringify())
putBoolean(getString(R.string.set_key_with_hidden), value.withHidden)
apply()
}
}
override var mediaStoreQuery: MediaStore.Query
get() {
val filterMode =
sharedPreferences.getInt(
getString(R.string.set_key_filter_mode), IntegerTable.FILTER_MODE_EXCLUDE)
val filteredLocations =
unlikelyToBeNull(
sharedPreferences.getString(
getString(R.string.set_key_filtered_locations), ""))
.toUnopenedLocations()
val excludeNonMusic =
sharedPreferences.getBoolean(getString(R.string.set_key_exclude_non_music), true)
return MediaStore.Query(
mode =
when (filterMode) {
IntegerTable.FILTER_MODE_INCLUDE -> MediaStore.FilterMode.INCLUDE
IntegerTable.FILTER_MODE_EXCLUDE -> MediaStore.FilterMode.EXCLUDE
else -> MediaStore.FilterMode.EXCLUDE
},
filtered = filteredLocations,
excludeNonMusic = excludeNonMusic)
}
set(value) {
sharedPreferences.edit {
val filterMode =
when (value.mode) {
MediaStore.FilterMode.INCLUDE -> IntegerTable.FILTER_MODE_INCLUDE
MediaStore.FilterMode.EXCLUDE -> IntegerTable.FILTER_MODE_EXCLUDE
}
putInt(getString(R.string.set_key_filter_mode), filterMode)
putString(
getString(R.string.set_key_filtered_locations), value.filtered.stringify())
putBoolean(getString(R.string.set_key_exclude_non_music), value.excludeNonMusic)
apply()
}
}
override fun forceLocationUpdate() {
// TODO: Temporary!!! This is really dumb, just need to ship a workaround for this rn
val cur = sharedPreferences.getInt(getString(R.string.set_key_locations_mode), 0)
sharedPreferences.edit {
putInt(getString(R.string.set_key_force_reload_workaround), cur + 1)
apply()
}
}
override fun onSettingChanged(key: String, listener: MusicSettings.Listener) {
// TODO: Differentiate "hard reloads" (Need the cache) and "Soft reloads"
// (just need to manipulate data)
when (key) {
getString(R.string.set_key_locations_mode),
getString(R.string.set_key_music_locations),
getString(R.string.set_key_excluded_locations) -> {
getString(R.string.set_key_force_reload_workaround) -> {
L.d("Dispatching music locations change")
listener.onMusicLocationsChanged()
}
getString(R.string.set_key_separators),
getString(R.string.set_key_auto_sort_names),
getString(R.string.set_key_excluded_locations),
getString(R.string.set_key_with_hidden),
getString(R.string.set_key_filter_mode),
getString(R.string.set_key_filtered_locations),
getString(R.string.set_key_exclude_non_music),
getString(R.string.set_key_fs_cache) -> {
getString(R.string.set_key_separators),
getString(R.string.set_key_auto_sort_names), -> {
L.d("Dispatching indexing setting change for $key")
listener.onIndexingSettingChanged()
}
@@ -162,16 +226,13 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont
}
}
private fun List<Location.Opened>.stringify(): String =
private fun List<Location>.stringify(): String =
joinToString(separator = ";") { it.uri.toString().replace(";", "\\;") }
private fun String.toOpenedLocations(): List<Location.Opened> =
splitEscaped { it == ';' }
.mapNotNull { Location.Unopened.from(context, it.toUri())?.open(context) }
private fun List<Location>.stringifyLocations(): String =
joinToString(separator = ";") { it.uri.toString().replace(";", "\\;") }
private fun String.toUnopenedLocations(): List<Location.Unopened> =
splitEscaped { it == ';' }.mapNotNull { Location.Unopened.from(context, it.toUri()) }
@@ -1,57 +0,0 @@
/*
* Copyright (c) 2021 Auxio Project
* ExcludedLocationAdapter.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 <https://www.gnu.org/licenses/>.
*/
package org.oxycblt.auxio.music.locations
import android.view.ViewGroup
import org.oxycblt.auxio.databinding.ItemMusicLocationBinding
import org.oxycblt.auxio.util.inflater
import org.oxycblt.musikr.fs.Location
/**
* [LocationAdapter] that manages a list of [Location.Unopened] excluded directory instances.
*
* @param listener A [LocationAdapter.Listener] to bind interactions to.
* @author Alexander Capehart (OxygenCobalt)
*/
class ExcludedLocationAdapter(listener: LocationAdapter.Listener<Location.Unopened>) :
LocationAdapter<Location.Unopened>(listener) {
override fun createViewHolder(parent: ViewGroup): LocationViewHolder<Location.Unopened> =
ExcludedLocationViewHolder.from(parent)
}
/**
* A [LocationViewHolder] that displays a [Location.Unopened]. Use [from] to create an instance.
*
* @author Alexander Capehart (OxygenCobalt)
*/
class ExcludedLocationViewHolder private constructor(binding: ItemMusicLocationBinding) :
LocationViewHolder<Location.Unopened>(binding) {
companion object {
/**
* Create a new instance.
*
* @param parent The parent to inflate this instance from.
* @return A new instance.
*/
fun from(parent: ViewGroup) =
ExcludedLocationViewHolder(
ItemMusicLocationBinding.inflate(parent.context.inflater, parent, false))
}
}
@@ -1,63 +0,0 @@
/*
* Copyright (c) 2021 Auxio Project
* ExcludedLocationsDialog.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 <https://www.gnu.org/licenses/>.
*/
package org.oxycblt.auxio.music.locations
import android.content.Context
import android.net.Uri
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject
import org.oxycblt.auxio.BuildConfig
import org.oxycblt.auxio.R
import org.oxycblt.auxio.music.MusicSettings
import org.oxycblt.musikr.fs.Location
/**
* Dialog that manages the excluded locations setting.
*
* @author Alexander Capehart (OxygenCobalt)
*/
@AndroidEntryPoint
class ExcludedLocationsDialog : LocationsDialog<Location.Unopened>() {
override val locationAdapter = ExcludedLocationAdapter(this)
@Inject override lateinit var musicSettings: MusicSettings
override fun getDialogTitle(): Int = R.string.set_excluded_locations
override fun getCurrentLocations(): List<Location.Unopened> = musicSettings.excludedLocations
override fun saveLocations(locations: List<Location.Unopened>) {
musicSettings.excludedLocations = locations
}
override fun getPendingLocationsKey(): String = KEY_PENDING_EXCLUDED_LOCATIONS
override fun convertUriToLocation(uri: Uri): Location.Unopened? {
return Location.Unopened.from(requireContext(), uri)
}
override fun createLocationFromUri(context: Context, uri: Uri): Location.Unopened? {
return Location.Unopened.from(context, uri)
}
private companion object {
const val KEY_PENDING_EXCLUDED_LOCATIONS =
BuildConfig.APPLICATION_ID + ".key.PENDING_EXCLUDED_LOCATIONS"
}
}
@@ -20,57 +20,140 @@ package org.oxycblt.auxio.music.locations
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import org.oxycblt.auxio.R
import org.oxycblt.auxio.databinding.ItemMusicLocationBinding
import org.oxycblt.auxio.databinding.ItemNoLocationsBinding
import org.oxycblt.auxio.list.recycler.DialogRecyclerView
import org.oxycblt.auxio.util.context
import org.oxycblt.auxio.util.inflater
import org.oxycblt.musikr.fs.Location
import timber.log.Timber as L
abstract class LocationAdapter<T : Location>(private val listener: Listener<T>) :
RecyclerView.Adapter<LocationViewHolder<T>>() {
class LocationAdapter<T : Location>(private val listener: Listener) :
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
private val _locations = mutableListOf<T>()
val locations: List<T> = _locations
override fun getItemCount() = locations.size
override fun getItemCount() = if (locations.isEmpty()) 1 else locations.size
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(parent)
override fun getItemViewType(position: Int): Int {
return if (locations.isEmpty()) VIEW_TYPE_EMPTY else VIEW_TYPE_LOCATION
}
override fun onBindViewHolder(holder: LocationViewHolder<T>, position: Int) =
holder.bind(locations[position], listener)
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
return when (viewType) {
VIEW_TYPE_EMPTY -> EmptyLocationViewHolder.from(parent)
VIEW_TYPE_LOCATION -> LocationViewHolder.from<T>(parent)
else -> throw IllegalArgumentException("Unknown view type: $viewType")
}
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
when (holder) {
is LocationViewHolder<*> -> {
@Suppress("UNCHECKED_CAST")
(holder as LocationViewHolder<T>).bind(locations[position], listener)
}
is EmptyLocationViewHolder -> holder.bind()
}
}
fun add(location: T) {
if (_locations.contains(location)) return
L.d("Adding $location")
val wasEmpty = _locations.isEmpty()
_locations.add(location)
notifyItemInserted(_locations.lastIndex)
if (wasEmpty) {
notifyItemChanged(0)
} else {
notifyItemInserted(_locations.lastIndex)
}
}
fun addAll(locations: List<T>) {
L.d("Adding ${locations.size} locations")
val wasEmpty = _locations.isEmpty()
val oldSize = _locations.size
_locations.addAll(locations)
notifyItemRangeInserted(oldSize, locations.size)
if (wasEmpty && locations.isNotEmpty()) {
notifyItemChanged(0)
} else if (locations.isNotEmpty()) {
notifyItemRangeInserted(oldSize, locations.size)
}
}
fun remove(location: T) {
L.d("Removing $location")
val idx = _locations.indexOf(location)
_locations.removeAt(idx)
notifyItemRemoved(idx)
if (_locations.isEmpty()) {
notifyItemChanged(0)
} else {
notifyItemRemoved(idx)
}
}
protected abstract fun createViewHolder(parent: ViewGroup): LocationViewHolder<T>
fun clear() {
L.d("Clearing all locations")
val wasEmpty = _locations.isEmpty()
val oldSize = _locations.size
_locations.clear()
if (!wasEmpty) {
if (oldSize == 1) {
notifyItemChanged(0)
} else {
notifyDataSetChanged()
}
}
}
interface Listener<T : Location> {
fun onRemoveLocation(location: T)
interface Listener {
fun onRemoveLocation(location: Location)
}
companion object {
private const val VIEW_TYPE_EMPTY = 0
private const val VIEW_TYPE_LOCATION = 1
}
}
abstract class LocationViewHolder<T : Location>(protected val binding: ItemMusicLocationBinding) :
class LocationViewHolder<T : Location>(private val binding: ItemMusicLocationBinding) :
DialogRecyclerView.ViewHolder(binding.root) {
fun bind(location: T, listener: LocationAdapter.Listener<T>) {
fun bind(location: T, listener: LocationAdapter.Listener) {
binding.locationPath.text = location.path.resolve(binding.context)
binding.locationDelete.setOnClickListener { listener.onRemoveLocation(location) }
}
companion object {
/**
* Create a new instance.
*
* @param parent The parent to inflate this instance from.
* @return A new instance.
*/
fun <T : Location> from(parent: ViewGroup) =
LocationViewHolder<T>(
ItemMusicLocationBinding.inflate(parent.context.inflater, parent, false))
}
}
class EmptyLocationViewHolder(private val binding: ItemNoLocationsBinding) :
DialogRecyclerView.ViewHolder(binding.root) {
fun bind() {
binding.locationPath.text = binding.context.getString(R.string.lbl_no_folders)
}
companion object {
/**
* Create a new instance.
*
* @param parent The parent to inflate this instance from.
* @return A new instance.
*/
fun from(parent: ViewGroup) =
EmptyLocationViewHolder(
ItemNoLocationsBinding.inflate(parent.context.inflater, parent, false))
}
}
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2025 Auxio Project
* LocationMode.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 <https://www.gnu.org/licenses/>.
*/
package org.oxycblt.auxio.music.locations
import org.oxycblt.auxio.IntegerTable
/** Represents the mode for loading music locations. */
enum class LocationMode {
/** Use Storage Access Framework (file picker) to select specific folders */
SAF,
/** Use system MediaStore database to load all music */
MEDIA_STORE;
val intCode: Int
get() =
when (this) {
SAF -> IntegerTable.LOCATION_MODE_SAF
MEDIA_STORE -> IntegerTable.LOCATION_MODE_MEDIA_STORE
}
companion object {
fun fromInt(int: Int): LocationMode? {
return when (int) {
IntegerTable.LOCATION_MODE_SAF -> SAF
IntegerTable.LOCATION_MODE_MEDIA_STORE -> MEDIA_STORE
else -> null
}
}
}
}
@@ -18,43 +18,84 @@
package org.oxycblt.auxio.music.locations
import android.Manifest
import android.content.ActivityNotFoundException
import android.content.pm.PackageManager
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.view.LayoutInflater
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AlertDialog
import androidx.core.net.toUri
import androidx.recyclerview.widget.ConcatAdapter
import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import com.google.android.material.R as MR
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject
import org.oxycblt.auxio.R
import org.oxycblt.auxio.databinding.DialogMusicLocationsBinding
import org.oxycblt.auxio.music.MusicSettings
import org.oxycblt.auxio.ui.ViewBindingMaterialDialogFragment
import org.oxycblt.auxio.util.getAttrColorCompat
import org.oxycblt.auxio.util.showToast
import org.oxycblt.musikr.fs.Location
import org.oxycblt.musikr.fs.mediastore.MediaStore
import org.oxycblt.musikr.fs.saf.SAF
import timber.log.Timber as L
abstract class LocationsDialog<T : Location> :
ViewBindingMaterialDialogFragment<DialogMusicLocationsBinding>(),
LocationAdapter.Listener<T>,
NewLocationFooterAdapter.Listener {
protected abstract val locationAdapter: LocationAdapter<T>
private val locationFooterAdapter = NewLocationFooterAdapter(this)
@AndroidEntryPoint
class LocationsDialog : ViewBindingMaterialDialogFragment<DialogMusicLocationsBinding>() {
private val includeLocationListener =
object : LocationAdapter.Listener {
override fun onRemoveLocation(location: Location) {
includeLocationAdapter.remove(location as Location.Opened)
updateSaveButtonState()
}
}
private val excludeLocationListener =
object : LocationAdapter.Listener {
override fun onRemoveLocation(location: Location) {
excludeLocationAdapter.remove(location as Location.Unopened)
updateSaveButtonState()
}
}
private val filterLocationListener =
object : LocationAdapter.Listener {
override fun onRemoveLocation(location: Location) {
filterLocationAdapter.remove(location as Location.Unopened)
updateSaveButtonState()
}
}
private val includeLocationAdapter: LocationAdapter<Location.Opened> =
LocationAdapter(includeLocationListener)
private val excludeLocationAdapter: LocationAdapter<Location.Unopened> =
LocationAdapter(excludeLocationListener)
private val filterLocationAdapter: LocationAdapter<Location.Unopened> =
LocationAdapter(filterLocationListener)
private var openDocumentTreeLauncher: ActivityResultLauncher<Uri?>? = null
abstract val musicSettings: MusicSettings
private var storagePermissionLauncher: ActivityResultLauncher<String>? = null
@Inject lateinit var musicSettings: MusicSettings
private var isFilePickerMode = true
private var isIncludeMode = true
private var hasStoragePermission = false
private var isExtrasExpanded = false
private var pendingLocationCallback: ((Location.Unopened) -> Unit)? = null
private var permissionGrantedInSession = false
override fun onCreateBinding(inflater: LayoutInflater) =
DialogMusicLocationsBinding.inflate(inflater)
override fun onConfigDialog(builder: AlertDialog.Builder) {
builder
.setTitle(getDialogTitle())
.setTitle(R.string.set_locations)
.setNegativeButton(R.string.lbl_cancel, null)
.setPositiveButton(R.string.lbl_save) { _, _ ->
val newDirs = locationAdapter.locations
saveLocations(newDirs)
}
.setPositiveButton(R.string.lbl_save) { _, _ -> saveChanges() }
}
override fun onBindingCreated(
@@ -62,36 +103,185 @@ abstract class LocationsDialog<T : Location> :
savedInstanceState: Bundle?
) {
openDocumentTreeLauncher =
registerForActivityResult(
ActivityResultContracts.OpenDocumentTree(), ::addDocumentTreeUriToDirs)
registerForActivityResult(ActivityResultContracts.OpenDocumentTree()) { uri ->
addDocumentTreeUriToDirs(uri)
}
binding.locationsRecycler.apply {
adapter = ConcatAdapter(locationAdapter, locationFooterAdapter)
storagePermissionLauncher =
registerForActivityResult(ActivityResultContracts.RequestPermission()) { isGranted ->
L.d("Storage permission granted: $isGranted")
hasStoragePermission = isGranted
if (isGranted && !permissionGrantedInSession) {
permissionGrantedInSession = true
}
updateModeUI(binding)
updateSaveButtonState()
}
binding.locationsIncludeRecycler.apply {
adapter = includeLocationAdapter
itemAnimator = null
}
val locations =
savedInstanceState?.getStringArrayList(getPendingLocationsKey())?.mapNotNull {
convertUriToLocation(it.toUri())
} ?: getCurrentLocations()
binding.locationsExcludeRecycler.apply {
adapter = excludeLocationAdapter
itemAnimator = null
}
locationAdapter.addAll(locations)
binding.locationsFilterRecycler.apply {
adapter = filterLocationAdapter
itemAnimator = null
}
// Load initial state from MusicSettings
loadInitialState(binding)
// Set up string resources
binding.locationsModeHeader.setText(R.string.set_load_from)
binding.locationsModeExclude.setText(R.string.set_file_picker)
binding.locationsModeInclude.setText(R.string.set_system_database)
binding.locationsExcludeModeHeader.setText(R.string.set_filter_mode)
binding.locationsExcludeModeExclude.setText(R.string.set_include)
binding.locationsExcludeModeInclude.setText(R.string.set_exclude)
binding.locationsIncludeListHeader.setText(R.string.set_folders_to_load)
binding.locationsIncludeAdd.contentDescription = getString(R.string.desc_add_folder)
binding.locationsExcludeAdd.contentDescription = getString(R.string.desc_add_folder)
binding.locationsFilterAdd.contentDescription = getString(R.string.desc_add_folder)
binding.locationsExtrasDropdown.setText(R.string.set_extra_settings)
// Set up extras dropdown click listener
binding.locationsExtrasDropdown.setOnClickListener {
isExtrasExpanded = !isExtrasExpanded
updateExtrasVisibility(binding)
}
// Set up mode toggle listener
binding.folderModeGroup.addOnButtonCheckedListener { group, checkedId, isChecked ->
if (!isChecked) return@addOnButtonCheckedListener
when (checkedId) {
R.id.locations_mode_exclude -> {
isFilePickerMode = true
updateModeUI(binding)
updateSaveButtonState()
}
R.id.locations_mode_include -> {
isFilePickerMode = false
updateModeUI(binding)
updateSaveButtonState()
}
}
}
// Set up exclude/include mode toggle listener for System Database mode
binding.locationsExcludeModeGroup.addOnButtonCheckedListener { group, checkedId, isChecked
->
if (!isChecked) return@addOnButtonCheckedListener
when (checkedId) {
R.id.locations_exclude_mode_exclude -> {
isIncludeMode = true
updateExcludeModeUI(binding)
}
R.id.locations_exclude_mode_include -> {
isIncludeMode = false
updateExcludeModeUI(binding)
}
}
}
// Set up add folder buttons
binding.locationsIncludeAdd.setOnClickListener {
pendingLocationCallback = { location ->
location.open(requireContext())?.let { opened ->
includeLocationAdapter.add(opened)
updateSaveButtonState()
}
}
onNewLocation()
}
binding.locationsExcludeAdd.setOnClickListener {
pendingLocationCallback = { location ->
excludeLocationAdapter.add(location)
updateSaveButtonState()
}
onNewLocation()
}
binding.locationsFilterAdd.setOnClickListener {
pendingLocationCallback = { location ->
filterLocationAdapter.add(location)
updateSaveButtonState()
}
onNewLocation()
}
// Set up grant permission card click
binding.locationsPermsCard.setOnClickListener { requestStoragePermission() }
// Initialize UI state
updateModeUI(binding)
updateExtrasVisibility(binding)
updateSaveButtonState()
}
private fun loadInitialState(binding: DialogMusicLocationsBinding) {
// Determine mode based on the locationMode setting
isFilePickerMode = musicSettings.locationMode == LocationMode.SAF
// Load data for the initial mode
loadModeData(binding)
// Set the initial toggle button selection
if (isFilePickerMode) {
binding.folderModeGroup.check(R.id.locations_mode_exclude)
} else {
binding.folderModeGroup.check(R.id.locations_mode_include)
}
// Check storage permission status
hasStoragePermission = checkStoragePermission()
}
private fun loadModeData(binding: DialogMusicLocationsBinding) {
// Load SAF data
musicSettings.safQuery.let { query ->
includeLocationAdapter.addAll(query.source)
excludeLocationAdapter.addAll(query.exclude)
binding.locationsWithHiddenSwitch.isChecked = query.withHidden
}
// Load MediaStore data
musicSettings.mediaStoreQuery.let { query ->
filterLocationAdapter.addAll(query.filtered)
binding.locationsExcludeNonMusicSwitch.isChecked = query.excludeNonMusic
isIncludeMode = query.mode == MediaStore.FilterMode.INCLUDE
binding.locationsExcludeModeGroup.check(
if (isIncludeMode) R.id.locations_exclude_mode_exclude
else R.id.locations_exclude_mode_include)
}
}
override fun onStart() {
super.onStart()
// Update save button state after dialog is shown
updateSaveButtonState()
}
override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
outState.putStringArrayList(
getPendingLocationsKey(),
ArrayList(locationAdapter.locations.map { it.uri.toString() }))
// TODO
}
override fun onDestroyBinding(binding: DialogMusicLocationsBinding) {
super.onDestroyBinding(binding)
openDocumentTreeLauncher = null
binding.locationsRecycler.adapter = null
storagePermissionLauncher = null
binding.locationsIncludeRecycler.adapter = null
binding.locationsExcludeRecycler.adapter = null
binding.locationsFilterRecycler.adapter = null
}
override fun onNewLocation() {
private fun onNewLocation() {
L.d("Opening launcher")
val launcher =
requireNotNull(openDocumentTreeLauncher) { "Document tree launcher was not available" }
@@ -106,31 +296,324 @@ abstract class LocationsDialog<T : Location> :
private fun addDocumentTreeUriToDirs(uri: Uri?) {
if (uri == null) {
L.d("No URI given (user closed the dialog)")
pendingLocationCallback = null
return
}
val context = requireContext()
val location = createLocationFromUri(context, uri)
val location = Location.Unopened.from(context, uri)
if (location != null) {
locationAdapter.add(location)
pendingLocationCallback?.invoke(location)
} else {
requireContext().showToast(R.string.err_bad_location)
}
pendingLocationCallback = null
}
override fun onRemoveLocation(location: T) {
locationAdapter.remove(location)
private fun updateModeUI(binding: DialogMusicLocationsBinding) {
with(binding) {
if (isFilePickerMode) {
// File Picker mode
locationsModeDesc.setText(R.string.lng_file_picker)
// Update permission section
locationsPermsDesc.setText(R.string.set_grant_storage_anyway)
locationsPermsSubtitle.setText(R.string.lng_grant_storage_anyway)
// File Picker mode - no need to update switch text as it's set in XML
} else {
// System Database mode
locationsModeDesc.setText(R.string.lng_system_database)
// Update permission section
locationsPermsDesc.setText(R.string.set_grant_storage)
locationsPermsSubtitle.setText(R.string.lng_grant_storage_required)
// Update exclude mode description based on selection
updateExcludeModeUI(binding)
// System Database mode - no need to update switch text as it's set in XML
}
// Update enabled state based on permission
updatePermissionDependentUI(binding)
// Update card colors based on mode and permission
updatePermissionCardColors(binding)
// Update permission card visibility
updatePermissionCardVisibility(binding)
// Update extras visibility based on current state
updateExtrasVisibility(binding)
}
}
protected abstract fun getDialogTitle(): Int
private fun updateExcludeModeUI(binding: DialogMusicLocationsBinding) {
with(binding) {
if (isIncludeMode) {
locationsExcludeModeDesc.setText(R.string.lng_include_folders)
} else {
locationsExcludeModeDesc.setText(R.string.lng_exclude_folders)
}
}
}
protected abstract fun getCurrentLocations(): List<T>
private fun updatePermissionDependentUI(binding: DialogMusicLocationsBinding) {
with(binding) {
// Only disable views in System Database mode when permission not granted
// File Picker mode doesn't require storage permission
val isEnabled = isFilePickerMode || hasStoragePermission
protected abstract fun saveLocations(locations: List<T>)
locationsIncludeListHeader.isEnabled = isEnabled
locationsIncludeAdd.isEnabled = isEnabled
locationsIncludeRecycler.isEnabled = isEnabled
protected abstract fun getPendingLocationsKey(): String
locationsExcludeModeHeader.isEnabled = isEnabled
locationsExcludeModeGroup.isEnabled = isEnabled
locationsExcludeModeDesc.isEnabled = isEnabled
locationsExcludeModeExclude.isEnabled = isEnabled
locationsExcludeModeInclude.isEnabled = isEnabled
protected abstract fun convertUriToLocation(uri: Uri): T?
locationsExcludeListHeader.isEnabled = isEnabled
locationsExcludeAdd.isEnabled = isEnabled
locationsExcludeRecycler.isEnabled = isEnabled
protected abstract fun createLocationFromUri(context: android.content.Context, uri: Uri): T?
locationsFilterListHeader.isEnabled = isEnabled
locationsFilterAdd.isEnabled = isEnabled
locationsFilterRecycler.isEnabled = isEnabled
locationsWithHiddenTitle.isEnabled = isEnabled
locationsWithHiddenDesc.isEnabled = isEnabled
locationsWithHidden.isEnabled = isEnabled
locationsExcludeNonMusicTitle.isEnabled = isEnabled
locationsExcludeNonMusicDesc.isEnabled = isEnabled
locationsExcludeNonMusic.isEnabled = isEnabled
}
}
private fun updatePermissionCardColors(binding: DialogMusicLocationsBinding) {
val context = requireContext()
with(binding.locationsPermsCard) {
if (isFilePickerMode) {
// File Picker mode - use secondary colors
setCardBackgroundColor(context.getAttrColorCompat(MR.attr.colorSecondaryContainer))
binding.locationsPermsDesc.setTextColor(
context.getAttrColorCompat(MR.attr.colorOnSecondaryContainer))
binding.locationsPermsSubtitle.setTextColor(
context.getAttrColorCompat(MR.attr.colorSecondary))
binding.locationsPermsOpen.imageTintList =
context.getAttrColorCompat(MR.attr.colorOnSecondaryContainer)
} else {
// System Database mode - use error colors if no permission, secondary colors if
// granted
if (hasStoragePermission) {
// Has permission - use secondary colors
setCardBackgroundColor(
context.getAttrColorCompat(MR.attr.colorSecondaryContainer))
binding.locationsPermsDesc.setTextColor(
context.getAttrColorCompat(MR.attr.colorOnSecondaryContainer))
binding.locationsPermsSubtitle.setTextColor(
context.getAttrColorCompat(MR.attr.colorSecondary))
binding.locationsPermsOpen.imageTintList =
context.getAttrColorCompat(MR.attr.colorOnSecondaryContainer)
} else {
setCardBackgroundColor(context.getAttrColorCompat(MR.attr.colorErrorContainer))
binding.locationsPermsDesc.setTextColor(
context.getAttrColorCompat(MR.attr.colorOnErrorContainer))
binding.locationsPermsSubtitle.setTextColor(
context.getAttrColorCompat(MR.attr.colorError))
binding.locationsPermsOpen.imageTintList =
context.getAttrColorCompat(MR.attr.colorOnErrorContainer)
}
}
}
}
private fun updatePermissionCardVisibility(binding: DialogMusicLocationsBinding) {
with(binding) {
// Hide the permission card when permissions are granted
locationsPermsCard.isVisible = !hasStoragePermission
}
}
private fun updateExtrasVisibility(binding: DialogMusicLocationsBinding) {
with(binding) {
// Update dropdown icon rotation
locationsExtrasDropdownIcon.rotation = if (isExtrasExpanded) 180f else 0f
if (isFilePickerMode) {
// File Picker mode - show include/exclude lists when expanded
// Include section
locationsIncludeListHeaderDivider.isVisible = true
locationsIncludeListHeader.isVisible = true
locationsIncludeAdd.isVisible = true
locationsIncludeRecycler.isVisible = true
// Show dividers and exclude section only when expanded
locationsExcludeListHeader.isVisible = isExtrasExpanded
locationsExcludeAdd.isVisible = isExtrasExpanded
locationsExcludeRecycler.isVisible = isExtrasExpanded
// Hide filter mode section completely
locationsExcludeModeHeader.isVisible = false
locationsExcludeModeGroup.isVisible = false
locationsExcludeModeDesc.isVisible = false
locationsFilterModeDivider.isVisible = false
locationsFilterListHeader.isVisible = false
locationsFilterAdd.isVisible = false
locationsFilterRecycler.isVisible = false
locationsExcludeListDivider.isVisible = false
// Config section
configDivider.isVisible = isExtrasExpanded
locationsWithHiddenTitle.isVisible = isExtrasExpanded
locationsWithHiddenDesc.isVisible = isExtrasExpanded
locationsWithHidden.isVisible = isExtrasExpanded
locationsExcludeNonMusicTitle.isVisible = false
locationsExcludeNonMusicDesc.isVisible = false
locationsExcludeNonMusic.isVisible = false
} else {
// System Database mode - show filter mode when expanded
// Hide include section
locationsIncludeListHeaderDivider.isVisible = false
locationsIncludeListHeader.isVisible = false
locationsIncludeAdd.isVisible = false
locationsIncludeRecycler.isVisible = false
// Hide exclude section (at bottom)
locationsExcludeListDivider.isVisible = false
locationsExcludeListHeader.isVisible = false
locationsExcludeAdd.isVisible = false
locationsExcludeRecycler.isVisible = false
// Show filter mode section only when expanded
locationsExcludeModeHeader.isVisible = isExtrasExpanded
locationsExcludeModeGroup.isVisible = isExtrasExpanded
locationsExcludeModeDesc.isVisible = isExtrasExpanded
locationsFilterModeDivider.isVisible = isExtrasExpanded
locationsFilterListHeader.isVisible = isExtrasExpanded
locationsFilterAdd.isVisible = isExtrasExpanded
locationsFilterRecycler.isVisible = isExtrasExpanded
// Config section
configDivider.isVisible = isExtrasExpanded
locationsWithHiddenTitle.isVisible = false
locationsWithHiddenDesc.isVisible = false
locationsWithHidden.isVisible = false
locationsExcludeNonMusicTitle.isVisible = isExtrasExpanded
locationsExcludeNonMusicDesc.isVisible = isExtrasExpanded
locationsExcludeNonMusic.isVisible = isExtrasExpanded
}
}
}
private fun saveChanges() {
val binding = requireBinding()
// Check if configuration has actually changed
val currentMode = musicSettings.locationMode
val modeChanged =
currentMode != (if (isFilePickerMode) LocationMode.SAF else LocationMode.MEDIA_STORE)
var configChanged = modeChanged
if (isFilePickerMode) {
// Check if SAF query changed
val currentSafQuery = musicSettings.safQuery
val newSafQuery =
SAF.Query(
source = includeLocationAdapter.locations,
exclude = excludeLocationAdapter.locations,
withHidden = binding.locationsWithHiddenSwitch.isChecked)
if (!modeChanged && currentMode == LocationMode.SAF) {
configChanged = currentSafQuery != newSafQuery
}
// Save the new SAF query
musicSettings.safQuery = newSafQuery
} else {
// Check if MediaStore query changed
val currentMediaStoreQuery = musicSettings.mediaStoreQuery
val filterMode =
if (isIncludeMode) {
MediaStore.FilterMode.INCLUDE
} else {
MediaStore.FilterMode.EXCLUDE
}
val newMediaStoreQuery =
MediaStore.Query(
mode = filterMode,
filtered = filterLocationAdapter.locations,
excludeNonMusic = binding.locationsExcludeNonMusicSwitch.isChecked)
if (!modeChanged && currentMode == LocationMode.MEDIA_STORE) {
configChanged = currentMediaStoreQuery != newMediaStoreQuery
}
// Save the new MediaStore query
musicSettings.mediaStoreQuery = newMediaStoreQuery
}
// Save the mode setting
musicSettings.locationMode =
if (isFilePickerMode) LocationMode.SAF else LocationMode.MEDIA_STORE
// If no configuration changed but permission was granted in this session,
// force a location update
if (!configChanged && permissionGrantedInSession) {
L.d("No config changes detected, but permission was granted - forcing location update")
musicSettings.forceLocationUpdate()
}
}
private fun checkStoragePermission(): Boolean {
val permission =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
Manifest.permission.READ_MEDIA_AUDIO
} else {
Manifest.permission.READ_EXTERNAL_STORAGE
}
return ContextCompat.checkSelfPermission(requireContext(), permission) ==
PackageManager.PERMISSION_GRANTED
}
private fun requestStoragePermission() {
val permission =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
Manifest.permission.READ_MEDIA_AUDIO
} else {
Manifest.permission.READ_EXTERNAL_STORAGE
}
val launcher =
requireNotNull(storagePermissionLauncher) {
"Storage permission launcher was not available"
}
try {
L.d("Requesting storage permission: $permission")
launcher.launch(permission)
} catch (e: Exception) {
L.e("Failed to request storage permission")
L.e(e.stackTraceToString())
requireContext().showToast(R.string.err_no_app)
}
}
private fun updateSaveButtonState() {
val dialog = dialog as? AlertDialog ?: return
val isEnabled =
if (isFilePickerMode) {
// File Picker mode: Enable save only if there's at least one folder
includeLocationAdapter.locations.isNotEmpty()
} else {
// System mode: Enable save only if permission is granted
hasStoragePermission
}
dialog.getButton(AlertDialog.BUTTON_POSITIVE)?.isEnabled = isEnabled
}
}
@@ -1,57 +0,0 @@
/*
* Copyright (c) 2021 Auxio Project
* MusicLocationAdapter.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 <https://www.gnu.org/licenses/>.
*/
package org.oxycblt.auxio.music.locations
import android.view.ViewGroup
import org.oxycblt.auxio.databinding.ItemMusicLocationBinding
import org.oxycblt.auxio.util.inflater
import org.oxycblt.musikr.fs.Location
/**
* [LocationAdapter] that manages a list of [Location.Opened] music directory instances.
*
* @param listener A [LocationAdapter.Listener] to bind interactions to.
* @author Alexander Capehart (OxygenCobalt)
*/
class MusicLocationAdapter(listener: LocationAdapter.Listener<Location.Opened>) :
LocationAdapter<Location.Opened>(listener) {
override fun createViewHolder(parent: ViewGroup): LocationViewHolder<Location.Opened> =
MusicLocationViewHolder.from(parent)
}
/**
* A [LocationViewHolder] that displays a [Location.Opened]. Use [from] to create an instance.
*
* @author Alexander Capehart (OxygenCobalt)
*/
class MusicLocationViewHolder private constructor(binding: ItemMusicLocationBinding) :
LocationViewHolder<Location.Opened>(binding) {
companion object {
/**
* Create a new instance.
*
* @param parent The parent to inflate this instance from.
* @return A new instance.
*/
fun from(parent: ViewGroup) =
MusicLocationViewHolder(
ItemMusicLocationBinding.inflate(parent.context.inflater, parent, false))
}
}
@@ -1,63 +0,0 @@
/*
* Copyright (c) 2021 Auxio Project
* MusicLocationsDialog.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 <https://www.gnu.org/licenses/>.
*/
package org.oxycblt.auxio.music.locations
import android.content.Context
import android.net.Uri
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject
import org.oxycblt.auxio.BuildConfig
import org.oxycblt.auxio.R
import org.oxycblt.auxio.music.MusicSettings
import org.oxycblt.musikr.fs.Location
/**
* Dialog that manages the music locations setting.
*
* @author Alexander Capehart (OxygenCobalt)
*/
@AndroidEntryPoint
class MusicLocationsDialog : LocationsDialog<Location.Opened>() {
override val locationAdapter = MusicLocationAdapter(this)
@Inject override lateinit var musicSettings: MusicSettings
override fun getDialogTitle(): Int = R.string.set_locations
override fun getCurrentLocations(): List<Location.Opened> = musicSettings.musicLocations
override fun saveLocations(locations: List<Location.Opened>) {
musicSettings.musicLocations = locations
}
override fun getPendingLocationsKey(): String = KEY_PENDING_LOCATIONS
override fun convertUriToLocation(uri: Uri): Location.Opened? {
val context = requireContext()
return Location.Unopened.from(context, uri)?.open(context)
}
override fun createLocationFromUri(context: Context, uri: Uri): Location.Opened? {
return Location.Unopened.from(context, uri)?.open(context)
}
private companion object {
const val KEY_PENDING_LOCATIONS = BuildConfig.APPLICATION_ID + ".key.PENDING_LOCATIONS"
}
}
@@ -1,82 +0,0 @@
/*
* Copyright (c) 2024 Auxio Project
* NewLocationFooterAdapter.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 <https://www.gnu.org/licenses/>.
*/
package org.oxycblt.auxio.music.locations
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import org.oxycblt.auxio.databinding.ItemNewMusicLocationBinding
import org.oxycblt.auxio.list.recycler.DialogRecyclerView
import org.oxycblt.auxio.music.decision.AddToPlaylistDialog
import org.oxycblt.auxio.util.inflater
/**
* A purely-visual [RecyclerView.Adapter] that acts as a footer providing a "New Playlist" choice in
* [AddToPlaylistDialog].
*
* @author Alexander Capehart (OxygenCobalt)
*/
class NewLocationFooterAdapter(private val listener: Listener) :
RecyclerView.Adapter<NewLocationFooterViewHolder>() {
override fun getItemCount() = 1
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) =
NewLocationFooterViewHolder.from(parent)
override fun onBindViewHolder(holder: NewLocationFooterViewHolder, position: Int) {
holder.bind(listener)
}
/** A listener for [NewLocationFooterAdapter] interactions. */
interface Listener {
/** Called when the footer has been pressed, requesting to create a new location. */
fun onNewLocation()
}
}
/**
* A [RecyclerView.ViewHolder] that displays a "New Playlist" choice in [NewLocationFooterAdapter].
* Use [from] to create an instance.
*
* @author Alexander Capehart (OxygenCobalt)
*/
class NewLocationFooterViewHolder
private constructor(private val binding: ItemNewMusicLocationBinding) :
DialogRecyclerView.ViewHolder(binding.root) {
/**
* Bind new data to this instance.
*
* @param listener A [NewLocationFooterAdapter.Listener] to bind interactions to.
*/
fun bind(listener: NewLocationFooterAdapter.Listener) {
binding.root.setOnClickListener { listener.onNewLocation() }
}
companion object {
/**
* Create a new instance.
*
* @param parent The parent to inflate this instance from.
* @return A new instance.
*/
fun from(parent: View) =
NewLocationFooterViewHolder(
ItemNewMusicLocationBinding.inflate(parent.context.inflater))
}
}
@@ -32,47 +32,38 @@ import org.oxycblt.auxio.ForegroundServiceNotification
import org.oxycblt.auxio.music.IndexingState
import org.oxycblt.auxio.music.MusicRepository
import org.oxycblt.auxio.music.MusicSettings
import org.oxycblt.auxio.music.shim.UpdateTrackerFactory
import org.oxycblt.auxio.music.locations.LocationMode
import org.oxycblt.auxio.playback.state.PlaybackStateManager
import org.oxycblt.auxio.util.getSystemServiceCompat
import org.oxycblt.musikr.MusicParent
import org.oxycblt.musikr.fs.Location
import org.oxycblt.musikr.track.UpdateTracker
import org.oxycblt.musikr.fs.mediastore.MediaStore
import org.oxycblt.musikr.fs.saf.SAF
import timber.log.Timber as L
class IndexingHolder
private constructor(
workerContext: Context,
private val workerContext: Context,
private val foregroundListener: ForegroundListener,
private val playbackManager: PlaybackStateManager,
private val musicRepository: MusicRepository,
private val musicSettings: MusicSettings,
private val imageLoader: ImageLoader,
updateTrackerFactory: UpdateTrackerFactory
private val imageLoader: ImageLoader
) :
MusicRepository.IndexingWorker,
MusicRepository.IndexingListener,
MusicRepository.UpdateListener,
MusicSettings.Listener,
UpdateTracker.Callback {
MusicSettings.Listener {
class Factory
@Inject
constructor(
private val playbackManager: PlaybackStateManager,
private val musicRepository: MusicRepository,
private val musicSettings: MusicSettings,
private val imageLoader: ImageLoader,
private val updateTrackerFactory: UpdateTrackerFactory
private val imageLoader: ImageLoader
) {
fun create(context: Context, listener: ForegroundListener) =
IndexingHolder(
context,
listener,
playbackManager,
musicRepository,
musicSettings,
imageLoader,
updateTrackerFactory)
context, listener, playbackManager, musicRepository, musicSettings, imageLoader)
}
private val indexJob = Job()
@@ -85,18 +76,18 @@ private constructor(
.getSystemServiceCompat(PowerManager::class)
.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK, BuildConfig.APPLICATION_ID + ":IndexingComponent")
private val updateTracker = updateTrackerFactory.create(this)
private var trackingJob: Job? = null
fun attach() {
musicSettings.registerListener(this)
musicRepository.addUpdateListener(this)
musicRepository.addIndexingListener(this)
musicRepository.registerWorker(this)
updateTracker.track(musicSettings.musicLocations)
startTracking()
}
fun release() {
updateTracker.release()
stopTracking()
musicRepository.unregisterWorker(this)
musicRepository.removeIndexingListener(this)
musicRepository.removeUpdateListener(this)
@@ -168,15 +159,25 @@ private constructor(
}
}
override fun onUpdate(location: Location.Opened) {
if (musicSettings.shouldBeObserving) {
musicRepository.requestIndex(true)
}
private fun startTracking() {
stopTracking()
val fs =
when (musicSettings.locationMode) {
LocationMode.MEDIA_STORE ->
MediaStore.from(workerContext, musicSettings.mediaStoreQuery)
LocationMode.SAF -> SAF.from(workerContext, musicSettings.safQuery)
}
trackingJob = indexScope.launch { fs.track().collect { requestIndex(true) } }
}
private fun stopTracking() {
trackingJob?.cancel()
trackingJob = null
}
override fun onMusicLocationsChanged() {
super.onMusicLocationsChanged()
updateTracker.track(musicSettings.musicLocations)
startTracking()
musicRepository.requestIndex(true)
}
@@ -39,8 +39,4 @@ class MusikrShimModule {
@Singleton
@Provides
fun storedPlaylists(@ApplicationContext context: Context) = StoredPlaylists.from(context)
@Provides
fun updateTrackerFactory(@ApplicationContext context: Context): UpdateTrackerFactory =
UpdateTrackerFactoryImpl(context)
}
@@ -1,61 +0,0 @@
/*
* Copyright (c) 2025 Auxio Project
* NoOpFileTreeCache.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 <https://www.gnu.org/licenses/>.
*/
package org.oxycblt.auxio.music.shim
import android.net.Uri
import org.oxycblt.musikr.fs.device.CachedDirectory
import org.oxycblt.musikr.fs.device.CachedFile
import org.oxycblt.musikr.fs.device.FileTree
import org.oxycblt.musikr.fs.device.FileTreeCache
/**
* A no-op implementation of [FileTreeCache] that doesn't cache anything. This implementation always
* returns cache misses and discards all updates.
*/
class NoOpFileTreeCache : FileTreeCache {
override fun read(): FileTree = NoOpFileTree()
}
/**
* A no-op implementation of [FileTree] that doesn't cache anything. All queries return null (cache
* miss) and all updates are discarded.
*/
class NoOpFileTree : FileTree {
override suspend fun queryDirectory(uri: Uri): CachedDirectory? {
// Always return null to simulate a cache miss
return null
}
override suspend fun updateDirectory(uri: Uri, directory: CachedDirectory) {
// Do nothing - discard the update
}
override suspend fun queryFile(uri: Uri): CachedFile? {
// Always return null to simulate a cache miss
return null
}
override suspend fun updateFile(uri: Uri, file: CachedFile) {
// Do nothing - discard the update
}
override suspend fun write() {
// Do nothing - no cache to write
}
}
@@ -1,30 +0,0 @@
/*
* Copyright (c) 2025 Auxio Project
* UpdateTrackerFactory.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 <https://www.gnu.org/licenses/>.
*/
package org.oxycblt.auxio.music.shim
import android.content.Context
import org.oxycblt.musikr.track.UpdateTracker
interface UpdateTrackerFactory {
fun create(callback: UpdateTracker.Callback): UpdateTracker
}
class UpdateTrackerFactoryImpl(private val context: Context) : UpdateTrackerFactory {
override fun create(callback: UpdateTracker.Callback) = UpdateTracker.from(context, callback)
}
@@ -1,59 +0,0 @@
/*
* Copyright (c) 2025 Auxio Project
* WriteOnlyFileTreeCache.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 <https://www.gnu.org/licenses/>.
*/
package org.oxycblt.auxio.music.shim
import android.net.Uri
import org.oxycblt.musikr.fs.device.CachedDirectory
import org.oxycblt.musikr.fs.device.CachedFile
import org.oxycblt.musikr.fs.device.FileTree
import org.oxycblt.musikr.fs.device.FileTreeCache
class WriteOnlyFileTreeCache(private val inner: FileTreeCache) : FileTreeCache {
override fun read(): FileTree {
val innerTree = inner.read()
return WriteOnlyFileTree(innerTree)
}
}
class WriteOnlyFileTree(private val innerTree: FileTree) : FileTree {
override suspend fun queryDirectory(uri: Uri): CachedDirectory? {
// Always return null to simulate a cache miss
return null
}
override suspend fun updateDirectory(uri: Uri, directory: CachedDirectory) {
// Forward update operations to the inner tree
innerTree.updateDirectory(uri, directory)
}
override suspend fun queryFile(uri: Uri): CachedFile? {
// Always return null to simulate a cache miss
return null
}
override suspend fun updateFile(uri: Uri, file: CachedFile) {
// Forward update operations to the inner tree
innerTree.updateFile(uri, file)
}
override suspend fun write() {
// Forward write operations to the inner tree
innerTree.write()
}
}
@@ -21,10 +21,10 @@ package org.oxycblt.auxio.music.shim
import org.oxycblt.musikr.cache.CacheResult
import org.oxycblt.musikr.cache.CachedSong
import org.oxycblt.musikr.cache.MutableCache
import org.oxycblt.musikr.fs.device.DeviceFile
import org.oxycblt.musikr.fs.File
class WriteOnlyMutableCache(private val inner: MutableCache) : MutableCache {
override suspend fun read(file: DeviceFile): CacheResult {
override suspend fun read(file: File): CacheResult {
return when (val result = inner.read(file)) {
is CacheResult.Hit -> CacheResult.Stale(file, result.song.addedMs)
else -> result
@@ -56,10 +56,6 @@ class RootPreferenceFragment : BasePreferenceFragment(R.xml.preferences_root) {
findNavController()
.navigateSafe(RootPreferenceFragmentDirections.musicLocationsSettings())
}
getString(R.string.set_key_excluded_dirs) -> {
findNavController()
.navigateSafe(RootPreferenceFragmentDirections.excludedLocationsSettings())
}
}
}
@@ -63,3 +63,48 @@ fun lazyReflectedMethod(clazz: KClass<*>, method: String, vararg params: KClass<
it.isAccessible = true
}
}
/**
* Split a [String] by the given selector, automatically handling escaped characters that satisfy
* the selector.
*
* @param selector A block that determines if the string should be split at a given character.
* @return One or more [String]s split by the selector.
*/
internal fun String.splitEscaped(selector: Char): List<String> {
val split = mutableListOf<String>()
var currentString = ""
var i = 0
while (i < length) {
val a = get(i)
val b = getOrNull(i + 1)
if (a == selector) {
// Non-escaped separator, split the string here, making sure any stray whitespace
// is removed.
split.add(currentString)
currentString = ""
i++
continue
}
if (b != null && a == '\\' && a == selector) {
// Is an escaped character, add the non-escaped variant and skip two
// characters to move on to the next one.
currentString += b
i += 2
} else {
// Non-escaped, increment normally.
currentString += a
i++
}
}
if (currentString.isNotEmpty()) {
// Had an in-progress split string that is now terminated, add it.
split.add(currentString)
}
return split
}
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M480,600L280,400L680,400L480,600Z"/>
</vector>
+10
View File
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M280,560L480,360L680,560L280,560Z"/>
</vector>
+11
View File
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M256,720L200,664L584,280L240,280L240,200L720,200L720,680L640,680L640,336L256,720Z"/>
</vector>
@@ -1,20 +1,471 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
style="@style/Widget.Auxio.Dialog.NestedScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<org.oxycblt.auxio.list.recycler.DialogRecyclerView
android:id="@+id/locations_recycler"
style="@style/Widget.Auxio.RecyclerView.Linear"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:clipToPadding="false"
android:overScrollMode="never"
app:layout_constraintTop_toBottomOf="@+id/locations_list_header"
tools:listitem="@layout/item_music_location" />
android:layout_height="match_parent">
</FrameLayout>
<TextView
android:id="@+id/locations_mode_header"
style="@style/Widget.Auxio.TextView.Header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/spacing_large"
android:paddingEnd="@dimen/spacing_large"
tools:text="Load From"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/folder_mode_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginTop="@dimen/spacing_tiny"
android:layout_marginEnd="@dimen/spacing_large"
android:gravity="center"
app:checkedButton="@+id/locations_mode_exclude"
app:layout_constraintTop_toBottomOf="@+id/locations_mode_header"
app:selectionRequired="true"
app:singleSelection="true">
<org.oxycblt.auxio.ui.RippleFixMaterialButton
android:id="@+id/locations_mode_exclude"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
tools:text="File Picker"
tools:icon="@drawable/ic_check_24" />
<org.oxycblt.auxio.ui.RippleFixMaterialButton
android:id="@+id/locations_mode_include"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
tools:text="System" />
</com.google.android.material.button.MaterialButtonToggleGroup>
<TextView
android:id="@+id/locations_mode_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginTop="@dimen/spacing_tiny"
android:layout_marginEnd="@dimen/spacing_large"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Auxio.BodySmall"
app:layout_constraintTop_toBottomOf="@+id/folder_mode_group"
tools:text="More reliable, but slower. Requires the vanilla Android file picker." />
<FrameLayout
android:id="@+id/locations_perms_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/spacing_large"
android:paddingTop="@dimen/spacing_medium"
android:paddingEnd="@dimen/spacing_large"
app:layout_constraintBottom_toTopOf="@+id/locations_include_list_header_divider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/locations_mode_desc">
<com.google.android.material.card.MaterialCardView
android:id="@+id/locations_perms_card"
style="@style/Widget.Material3.CardView.Filled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:layout_marginBottom="@dimen/spacing_medium"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
app:cardBackgroundColor="?attr/colorSecondaryContainer">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/spacing_medium">
<TextView
android:id="@+id/locations_perms_desc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAlignment="viewStart"
android:layout_marginEnd="@dimen/spacing_tiny"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
android:textColor="?attr/colorOnSecondaryContainer"
app:layout_constraintBottom_toTopOf="@+id/locations_perms_subtitle"
app:layout_constraintEnd_toStartOf="@+id/locations_perms_open"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Storage Access Recommended" />
<TextView
android:id="@+id/locations_perms_subtitle"
style="@style/Widget.Auxio.TextView.Secondary.Compact"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:maxLines="2"
android:textAlignment="viewStart"
android:textColor="?attr/colorSecondary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/locations_perms_desc"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/locations_perms_desc"
tools:text="Can fix loading on some devices" />
<ImageView
android:id="@+id/locations_perms_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_open_20"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorOnSecondaryContainer" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</FrameLayout>
<com.google.android.material.divider.MaterialDivider
android:id="@+id/locations_include_list_header_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/locations_perms_container" />
<TextView
android:id="@+id/locations_include_list_header"
style="@style/Widget.Auxio.TextView.Header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/spacing_large"
android:paddingEnd="@dimen/spacing_large"
android:text="@string/set_folders_to_load"
tools:text="Folders to Load"
app:layout_constraintTop_toBottomOf="@+id/locations_include_list_header_divider" />
<org.oxycblt.auxio.ui.RippleFixMaterialButton
android:id="@+id/locations_include_add"
style="@style/Widget.Auxio.Button.Icon.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacing_mid_large"
android:contentDescription="Add Folder"
app:icon="@drawable/ic_add_24"
app:layout_constraintEnd_toEndOf="@+id/locations_include_list_header"
app:layout_constraintTop_toBottomOf="@+id/locations_include_list_header_divider" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/locations_include_recycler"
style="@style/Widget.Auxio.RecyclerView.Linear"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1"
android:clipToPadding="false"
android:overScrollMode="never"
app:layout_constraintTop_toBottomOf="@+id/locations_include_list_header"
tools:itemCount="1"
tools:listitem="@layout/item_music_location" />
<com.google.android.material.divider.MaterialDivider
android:id="@+id/locations_exclude_list_header_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/locations_include_recycler" />
<TextView
android:id="@+id/locations_extras_dropdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/spacing_large"
android:background="@drawable/ui_item_ripple"
android:paddingEnd="@dimen/spacing_large"
android:paddingVertical="@dimen/spacing_medium"
android:textAppearance="@style/TextAppearance.Auxio.TitleSmall"
tools:text="Extra Settings"
app:layout_constraintTop_toBottomOf="@+id/locations_exclude_list_header_divider" />
<ImageView
android:id="@+id/locations_extras_dropdown_icon"
android:layout_width="@dimen/size_touchable_small"
android:layout_height="@dimen/size_touchable_small"
android:layout_marginEnd="@dimen/spacing_mid_large"
android:scaleType="center"
android:src="@drawable/ic_down_24"
app:tint="?attr/colorOnSurfaceVariant"
app:layout_constraintBottom_toBottomOf="@+id/locations_extras_dropdown"
app:layout_constraintEnd_toEndOf="@+id/locations_extras_dropdown"
app:layout_constraintTop_toBottomOf="@+id/locations_exclude_list_header_divider" />
<TextView
android:id="@+id/locations_exclude_mode_header"
style="@style/Widget.Auxio.TextView.Header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/spacing_large"
android:paddingEnd="@dimen/spacing_large"
app:layout_constraintTop_toBottomOf="@+id/locations_extras_dropdown"
tools:text="Filter Mode" />
<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/locations_exclude_mode_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginTop="@dimen/spacing_tiny"
android:layout_marginEnd="@dimen/spacing_large"
android:gravity="center"
app:checkedButton="@+id/locations_exclude_mode_exclude"
app:layout_constraintTop_toBottomOf="@+id/locations_exclude_mode_header"
app:selectionRequired="true"
app:singleSelection="true">
<org.oxycblt.auxio.ui.RippleFixMaterialButton
android:id="@+id/locations_exclude_mode_exclude"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
tools:text="Include"
tools:icon="@drawable/ic_check_24" />
<org.oxycblt.auxio.ui.RippleFixMaterialButton
android:id="@+id/locations_exclude_mode_include"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
tools:text="Exclude" />
</com.google.android.material.button.MaterialButtonToggleGroup>
<TextView
android:id="@+id/locations_exclude_mode_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginTop="@dimen/spacing_tiny"
android:layout_marginEnd="@dimen/spacing_large"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Auxio.BodySmall"
app:layout_constraintTop_toBottomOf="@+id/locations_exclude_mode_group"
tools:text="Audio files outside of the selected folders will be ignored." />
<com.google.android.material.divider.MaterialDivider
android:id="@+id/locations_filter_mode_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
app:layout_constraintTop_toBottomOf="@+id/locations_exclude_mode_desc" />
<TextView
android:id="@+id/locations_filter_list_header"
style="@style/Widget.Auxio.TextView.Header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/spacing_large"
android:paddingEnd="@dimen/spacing_large"
android:text="@string/set_filtered_folders"
app:layout_constraintTop_toBottomOf="@+id/locations_filter_mode_divider" />
<org.oxycblt.auxio.ui.RippleFixMaterialButton
android:id="@+id/locations_filter_add"
style="@style/Widget.Auxio.Button.Icon.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacing_mid_large"
android:contentDescription="@string/desc_add_folder"
app:icon="@drawable/ic_add_24"
app:layout_constraintEnd_toEndOf="@+id/locations_filter_list_header"
app:layout_constraintTop_toBottomOf="@+id/locations_filter_mode_divider" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/locations_filter_recycler"
style="@style/Widget.Auxio.RecyclerView.Linear"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1"
android:clipToPadding="false"
android:overScrollMode="never"
tools:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/locations_filter_list_header"
tools:itemCount="1"
tools:listitem="@layout/item_music_location" />
<com.google.android.material.divider.MaterialDivider
android:id="@+id/locations_exclude_list_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/locations_filter_recycler" />
<TextView
android:id="@+id/locations_exclude_list_header"
style="@style/Widget.Auxio.TextView.Header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/spacing_large"
android:paddingEnd="@dimen/spacing_large"
android:text="@string/set_folders_to_ignore"
tools:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/locations_exclude_list_divider" />
<org.oxycblt.auxio.ui.RippleFixMaterialButton
android:id="@+id/locations_exclude_add"
style="@style/Widget.Auxio.Button.Icon.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacing_mid_large"
android:contentDescription="@string/desc_add_folder"
app:icon="@drawable/ic_add_24"
tools:visibility="gone"
app:layout_constraintEnd_toEndOf="@+id/locations_exclude_list_header"
app:layout_constraintTop_toBottomOf="@+id/locations_exclude_list_divider" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/locations_exclude_recycler"
style="@style/Widget.Auxio.RecyclerView.Linear"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1"
android:clipToPadding="false"
android:overScrollMode="never"
tools:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/locations_exclude_list_header"
tools:itemCount="1"
tools:listitem="@layout/item_music_location" />
<com.google.android.material.divider.MaterialDivider
android:id="@+id/config_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/locations_exclude_recycler" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/locations_with_hidden"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/spacing_large"
android:layout_marginVertical="@dimen/spacing_medium"
app:layout_constraintTop_toBottomOf="@+id/config_divider"
tools:layout_editor_absoluteX="24dp">
<TextView
android:id="@+id/locations_with_hidden_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/set_with_hidden"
android:layout_marginEnd="@dimen/spacing_medium"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
app:layout_constraintBottom_toTopOf="@+id/locations_with_hidden_desc"
app:layout_constraintEnd_toStartOf="@+id/locations_with_hidden_switch"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/locations_with_hidden_desc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/set_with_hidden_desc"
android:textAppearance="@style/TextAppearance.Auxio.BodyMedium"
android:textColor="?attr/colorOnSurfaceVariant"
android:layout_marginEnd="@dimen/spacing_medium"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/locations_with_hidden_switch"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/locations_with_hidden_title" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/locations_with_hidden_switch"
style="@style/Widget.Auxio.RecyclerView.Linear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:clipToPadding="false"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:itemCount="1"
tools:listitem="@layout/item_music_location" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/locations_exclude_non_music"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/spacing_large"
android:layout_marginVertical="@dimen/spacing_medium"
app:layout_constraintTop_toBottomOf="@+id/locations_with_hidden"
tools:layout_editor_absoluteX="24dp">
<TextView
android:id="@+id/locations_exclude_non_music_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacing_medium"
android:text="@string/set_exclude_non_music"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
app:layout_constraintBottom_toTopOf="@+id/locations_exclude_non_music_desc"
app:layout_constraintEnd_toStartOf="@+id/locations_exclude_non_music_switch"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/locations_exclude_non_music_desc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacing_medium"
android:text="@string/set_exclude_non_music_desc"
android:textAppearance="@style/TextAppearance.Auxio.BodyMedium"
android:textColor="?attr/colorOnSurfaceVariant"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/locations_exclude_non_music_switch"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/locations_exclude_non_music_title" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/locations_exclude_non_music_switch"
style="@style/Widget.Auxio.RecyclerView.Linear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:clipToPadding="false"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:itemCount="1"
tools:listitem="@layout/item_music_location" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
@@ -50,7 +50,7 @@
android:id="@+id/home_no_music_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lbl_music_sources" />
android:text="@string/set_locations" />
</LinearLayout>
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/new_location_label"
style="@style/Widget.Auxio.TextView.Icon.Clickable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/set_locations_new"
android:paddingTop="@dimen/spacing_mid_large"
android:paddingBottom="@dimen/spacing_mid_large"
android:paddingStart="@dimen/spacing_mid_large"
android:paddingEnd="@dimen/spacing_large"
app:drawableStartCompat="@drawable/ic_add_24"
app:layout_constraintBottom_toTopOf="@+id/about_wiki"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/about_version" />
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:paddingTop="@dimen/spacing_small"
android:minHeight="@dimen/size_touchable_large"
android:paddingBottom="@dimen/spacing_small">
<TextView
android:id="@+id/location_path"
style="@style/Widget.Auxio.TextView.Secondary.Base"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_large"
android:layout_weight="1"
android:gravity="center"
android:maxLines="@null"
android:textAlignment="center"
tools:text="No Folders" />
</LinearLayout>
+1 -1
View File
@@ -570,7 +570,7 @@
<dialog
android:id="@+id/music_locations_dialog"
android:name="org.oxycblt.auxio.music.locations.MusicLocationsDialog"
android:name="org.oxycblt.auxio.music.locations.LocationsDialog"
android:label="music_locations_dialog"
tools:layout="@layout/dialog_music_locations" />
</navigation>
+1 -9
View File
@@ -36,9 +36,6 @@
<action
android:id="@+id/music_locations_settings"
app:destination="@id/music_locations_dialog" />
<action
android:id="@+id/excluded_locations_settings"
app:destination="@id/excluded_locations_dialog" />
</fragment>
<fragment
@@ -94,7 +91,7 @@
tools:layout="@layout/dialog_pre_amp" />
<dialog
android:id="@+id/music_locations_dialog"
android:name="org.oxycblt.auxio.music.locations.MusicLocationsDialog"
android:name="org.oxycblt.auxio.music.locations.LocationsDialog"
android:label="music_locations_dialog"
tools:layout="@layout/dialog_music_locations" />
<dialog
@@ -102,11 +99,6 @@
android:name="org.oxycblt.auxio.music.interpret.SeparatorsDialog"
android:label="separators_dialog"
tools:layout="@layout/dialog_separators" />
<dialog
android:id="@+id/excluded_locations_dialog"
android:name="org.oxycblt.auxio.music.locations.ExcludedLocationsDialog"
android:label="excluded_locations_dialog"
tools:layout="@layout/dialog_music_locations" />
<fragment
android:id="@+id/about_fragment"
+43 -1
View File
@@ -201,7 +201,6 @@
<string name="lng_playlist_renamed">تم إعادة تسمية قائمة التشغيل</string>
<string name="lbl_rename_playlist">إعادة تسمية قائمة التشغيل</string>
<string name="lbl_appears_on">يظهر على</string>
<string name="lbl_music_sources">إختيار المجلد</string>
<string name="lbl_demos">مقاطع تجريبية</string>
<string name="lbl_import">استيراد</string>
<string name="lbl_export">تصدير</string>
@@ -259,4 +258,47 @@
<string name="lng_empty_genres">الفئات الخاصة بك ستضهر هنا.</string>
<string name="set_observing_desc">اعادة تحميل مكتبة الموسيقى عند حصول تغيير(يتطلب تنبيه ثابت)</string>
<string name="set_separators_warning">تحذير: استخدام هذا الاعداد قد ينتج عنه ان يتم تفسير بعض العلامات بشكل خاطئ مثل ان تحتوي على قيم متعددة. يمكن ان يتم حل هذا بتقديم الفواصل الغير مرغوبةبالشارحة الخلفية(\\).</string>
<string name="set_remember_pause">تذكر الايقاف</string>
<string name="set_headset_autoplay">تشغيل تلقائي لسماعة الرأس</string>
<string name="set_square_covers">اجبار استخدام غلاف البوم مربع</string>
<string name="set_audio_desc">تحديد الصوت وسلوك العرض</string>
<string name="set_images">صور</string>
<string name="set_hide_collaborators_desc">اظهر فقط الفنانينالذين ذكرو مباشرة في الالبوم(يعمل بشكل افضل على المكتبات التي تم اضافة العلامات لها بشكل جيد)</string>
<string name="set_square_covers_desc">قص غلاف البوم بنسبة ١:١</string>
<string name="set_playback">التشغيل</string>
<string name="set_pre_amp_warning">تحذير: تغيير التضخيم المسبق الى ايجابي عالي قد ينتج عنه قمم في بعض الملفات الصوتية</string>
<string name="desc_playlist_image">صور قائمة التشغيل %s</string>
<string name="desc_selection_image">اختيار الصور</string>
<string name="set_reindex">تحديث الموسيقى</string>
<string name="set_cover_mode">غلاف الالبوم</string>
<string name="def_album">البوم غير معروف</string>
<string name="set_cover_mode_off">اطفاء</string>
<string name="set_pre_amp_with">تعديل مع الاشارات</string>
<string name="set_replay_gain">تسوية الصوت</string>
<string name="set_excluded_locations">مجلد مستثنى</string>
<string name="set_excluded_locations_desc">تحكم بالمجلدات المستثناة من تحميل الموسيقى</string>
<string name="set_reindex_desc">اعادة تحميل المزسيقى باستخدام الاشارات المخزونة عند الامكان</string>
<string name="set_rescan_desc">حذف خزن الاشارات و اعادة تحميل مكتقة الموسيقى بشكل كامل(ابطا، ولكن اكثر كمالا)</string>
<string name="err_export_failed">لا يمكن تصدير قائمة التشغيل الى هذا الملف</string>
<string name="set_hide_collaborators">اخفاء المتعاونين</string>
<string name="set_with_hidden">اظهار الملفات المخفية</string>
<string name="set_with_hidden_desc">اظهار الملفات المخفية</string>
<string name="set_intelligent_sorting_desc">تحديد ترتيب ذكي تنازلي</string>
<string name="set_cover_mode_as_is">على وضعه</string>
<string name="set_headset_autoplay_desc">دائما ابدا التشغيل بشكل تلقائي عند ربط سماعة الرأس(قد لا يعمل مع كل الاجهزة)</string>
<string name="set_library">مكتبة</string>
<string name="set_replay_gain_mode_off">ايقاف</string>
<string name="set_pre_amp_without">تغيير مع الاشارات</string>
<string name="set_locations_desc">تحكم بالمكان الذي يجب ان تحمل منه الموسيقى</string>
<string name="set_rescan">اعادة البحث للموسيقى</string>
<string name="err_import_failed">لا يمكن استيراد قائمة التشغيل من الملف</string>
<string name="def_disc">لا يوجد قرص</string>
<string name="def_track">لا يوجد مسار</string>
<string name="set_cover_mode_high_quality">جودة عالية</string>
<string name="set_cover_mode_save_space">توفير مساحه</string>
<string name="set_cover_mode_balanced">متوازن</string>
<string name="set_locations">مجلد موسيقى</string>
<string name="set_remember_pause_desc">استمر بالتشغيل/الايقاف عند تخطي او تعديل الطابور</string>
<string name="desc_exit">ايقاف التشغيل</string>
<string name="desc_queue_bar">فتح الطابور</string>
</resources>
+12 -10
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="info_app_desc">مشغّل موسيقى بسيط ومعقول للأندرويد.</string>
<string name="info_app_desc">مشغّل موسيقى بسيط ومنطقي للأندرويد.</string>
<string name="lbl_observing">مراقبة مكتبة الموسيقى</string>
<string name="lbl_retry">إعادة المحاولة</string>
<string name="lbl_albums">الألبومات</string>
@@ -82,8 +82,8 @@
<string name="def_genre">نوع غير معروف</string>
<string name="def_disc">لا قرص</string>
<string name="cdc_mp4">صوت MPEG-4</string>
<string name="cdc_ogg">أوغ الصوت</string>
<string name="cdc_flac">برنامج ترميز الصوت المجاني بدون فقدان البيانات (FLAC)</string>
<string name="cdc_ogg">أوغ (Ogg) الصوت</string>
<string name="cdc_flac">برنامج ترميز الصوت المجاني دون فقدان البيانات (FLAC)</string>
<string name="clr_indigo">نيلي</string>
<string name="clr_blue">أزرق</string>
<string name="clr_deep_green">أخضر عميق</string>
@@ -177,7 +177,7 @@
<string name="set_observing">إعادة التحميل التلقائي</string>
<string name="set_separators_desc">ضبط الأحرف التي تشير إلى قيم علامات متعددة</string>
<string name="set_headset_autoplay_desc">البدء التلقائي في التشغيل عند توصيل سماعة الرأس (قد لا يعمل على جميع الأجهزة)</string>
<string name="lbl_soundtracks">اصوات تصويرية</string>
<string name="lbl_soundtracks">موسيقى تصويرية</string>
<string name="set_content_desc">التحكم في كيفية تحميل الموسيقى والصور</string>
<string name="set_keep_shuffle_desc">حافظ على خاصية الخلط عند تشغيل أغنية جديدة</string>
<string name="set_headset_autoplay">سماعة الرأس تشغيل تلقائي</string>
@@ -185,7 +185,7 @@
<string name="set_repeat_pause">إيقاف مؤقت عند التكرار</string>
<string name="set_repeat_pause_desc">إيقاف مؤقت عند تكرار الأغنية</string>
<string name="desc_track_number">المسار %d</string>
<string name="lbl_compilation_remix">البوم اغاني ريميكس</string>
<string name="lbl_compilation_remix">تجميعة ريميكس</string>
<string name="def_album_count">لا توجد ألبومات</string>
<string name="set_rescan">إعادة فحص الموسيقى</string>
<string name="desc_album_cover">غلاف الألبوم لـ %s</string>
@@ -205,7 +205,7 @@
<string name="set_separators">فواصل القيم المتعددة</string>
<string name="set_observing_desc">أعد تحميل مكتبة الموسيقى عندما تتغير (يتطلب إشعار دائم)</string>
<string name="set_exclude_non_music">استثناء غير الموسيقى</string>
<string name="set_separators_and">امبارساند (&amp;)</string>
<string name="set_separators_and">اشارة مع (&amp;)</string>
<string name="set_separators_comma">الفاصلة (،)</string>
<string name="set_separators_slash">شرطة مائلة (/)</string>
<string name="set_cover_mode">أغطية الألبومات</string>
@@ -268,7 +268,6 @@
<string name="lng_playlist_added">تمت إضافته إلى قائمة التشغيل</string>
<string name="set_root_title">إعدادات</string>
<string name="set_separators_semicolon">الفاصلة المنقوطة (؛)</string>
<string name="lbl_music_sources">اختر المجلدات</string>
<string name="lbl_import">استورد</string>
<string name="lbl_export">صدّر</string>
<string name="lbl_export_playlist">صدّر قائمة التشغيل</string>
@@ -283,7 +282,7 @@
<string name="lbl_path_style_relative">نسبي</string>
<string name="lbl_path_style_absolute">مطلق</string>
<string name="cdc_unknown">غير معروف</string>
<string name="lbl_imported_playlist">قائمة التشغيل استوردت</string>
<string name="lbl_imported_playlist">قائمة تشغيل مستوردة</string>
<string name="def_album">ألبوم غير معروف</string>
<string name="lbl_sort_mode">افرز حسب</string>
<string name="lbl_sort_direction">الاتجاه</string>
@@ -307,7 +306,6 @@
<string name="lbl_author">المؤلف</string>
<string name="lbl_import_playlist">استورد قائمة التشغيل</string>
<string name="lbl_path">المسار</string>
<string name="set_locations_new">مجلد جديد</string>
<string name="lbl_start_playback">بدء التشغيل</string>
<string name="lbl_error_info">معلومات الخطأ</string>
<string name="lbl_copied">نُسخت</string>
@@ -324,8 +322,12 @@
<item quantity="other">%d ألبوم</item>
</plurals>
<string name="cnt_mp4">MPEG-4 تحتوي على %s</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="cdc_alac">ترميز Apple صوتي دون خسارة (ALAC)</string>
<string name="set_cover_mode_as_is">كما هي</string>
<string name="set_with_hidden_desc">ضمّن ملفات الصوت المخفية (مثال: ذاكرة التخزين المؤقت)</string>
<string name="set_with_hidden">ضمّن الملفات المخفية</string>
<string name="set_excluded_locations_desc">تحديد المجلدات التي لا تُحمّل منها الموسيقى</string>
<string name="set_excluded_locations">المجلدات المستثناة</string>
<string name="set_fs_cache">استخدم ذاكرة التخزين المؤقت لنظام الملفات</string>
<string name="set_fs_cache_desc">يحسن أوقات التحميل، ولكنه قد يمنع إضافة صوت جديد</string>
</resources>
-1
View File
@@ -121,7 +121,6 @@
<string name="lbl_feedback">Rəy bildir</string>
<string name="lbl_email">E-poçt göndər</string>
<string name="lbl_github">GitHub-da problem yarat</string>
<string name="lbl_music_sources">Qovluqları seç</string>
<string name="lng_playlist_exported">Pleylist ixrac edildi</string>
<string name="lng_playlist_added">Pleylistə əlavə edildi</string>
<string name="lng_playlist_renamed">Pleylist adı dəyişdirildi</string>
+1 -3
View File
@@ -306,12 +306,10 @@
\n
\nПапярэджанне: будзьце асцярожныя пры кіраванні гэтай службай, калі вы закрыеце яе, а затым паспрабуеце выкарыстоўваць зноў, вы, верагодна, прывядзеце да збою прыкладання.</string>
<string name="lbl_more">Больш</string>
<string name="lbl_music_sources">Абярыце тэчкі</string>
<string name="cnt_mp4">MPEG-4, які змяшчае %s</string>
<string name="def_album">Невядомы альбом</string>
<string name="lng_empty_albums">Вашыя альбомы будуць адлюстроўвацца тут.</string>
<string name="lng_empty_genres">Тут будуць адлюстроўвацца вашыя жанры.</string>
<string name="set_locations_new">Новая тэчка</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="cdc_unknown">Невядомы</string>
<string name="lbl_email">Адправіць электронны ліст</string>
@@ -321,4 +319,4 @@
<string name="lng_empty_playlists">Тут будуць адлюстроўвацца вашыя плэйлісты.</string>
<string name="set_cover_mode_save_space">Эканомія месца</string>
<string name="lbl_github">Паведаміць аб праблеме на GitHub</string>
</resources>
</resources>
+52 -50
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="lbl_indexer">Зареждане на музика</string>
<string name="lbl_observing">Мониторинг на музикална библиотека</string>
<string name="lbl_indexer">Музиката се зарежда</string>
<string name="lbl_observing">Наблюдение на музикална библиотека</string>
<string name="lbl_retry">Опитайте отново</string>
<string name="lbl_songs">Песни</string>
<string name="lbl_song">Песен</string>
@@ -24,7 +24,7 @@
<string name="lbl_demos">Демонстрации</string>
<string name="lbl_mixes">DJ миксове</string>
<string name="lbl_live_group">На живо</string>
<string name="lbl_remix_group">Ремикси</string>
<string name="lbl_remix_group">Ремиксове</string>
<string name="lbl_appears_on">Появява се на</string>
<string name="lbl_artist">Изпълнител</string>
<string name="lbl_artists">Изпълнители</string>
@@ -37,10 +37,10 @@
<string name="lbl_import">Внасяне</string>
<string name="lbl_import_playlist">Внасяне на плейлист</string>
<string name="lbl_export_playlist">Изнасяне на плейлист</string>
<string name="lbl_rename">Преименувай</string>
<string name="lbl_delete">Изтрий</string>
<string name="lbl_confirm_delete_playlist">Изтрий плейлист?</string>
<string name="lbl_edit">Редактирай</string>
<string name="lbl_rename">Преименуване</string>
<string name="lbl_delete">Изтриване</string>
<string name="lbl_confirm_delete_playlist">Изтриване на плейлист?</string>
<string name="lbl_edit">Редактиране</string>
<string name="lbl_search">Търсене</string>
<string name="lbl_filter">Филтър</string>
<string name="lbl_filter_all">Всички</string>
@@ -56,7 +56,7 @@
<string name="lbl_playlist_add">Добави към плейлист</string>
<string name="lbl_artist_details">Отиди на изпълнител</string>
<string name="lbl_album_details">Отиди на албум</string>
<string name="lbl_song_detail">Виж свойства</string>
<string name="lbl_song_detail">Преглед на свойства</string>
<string name="lbl_parent_detail">Преглед</string>
<string name="lbl_share">Сподели</string>
<string name="lbl_props">Свойства на песента</string>
@@ -65,36 +65,36 @@
<string name="lbl_size">Размер</string>
<string name="lbl_bitrate">Битрейт</string>
<string name="lbl_sample_rate">Честота на дискретизация</string>
<string name="lbl_replaygain_album">ReplayGain Регулиране на албума</string>
<string name="lbl_shuffle_shortcut_short">Разбъркано</string>
<string name="lbl_replaygain_album">ReplayGain Регулиране на албум</string>
<string name="lbl_shuffle_shortcut_short">Разбъркай</string>
<string name="lbl_ok">Добре</string>
<string name="lbl_cancel">Отказ</string>
<string name="lbl_save">Запази</string>
<string name="lbl_reset">Нулирай</string>
<string name="lbl_path_style">Стил на пътя</string>
<string name="lbl_path_style_relative">Относително</string>
<string name="lbl_windows_paths">Използвай съвместими с Windows пътища</string>
<string name="lbl_windows_paths">Използване на съвместими с Windows пътища</string>
<string name="info_app_desc">Прост, рационален музикален плейър за android.</string>
<string name="lbl_indexing">Зарежда се музика</string>
<string name="lbl_indexing">Зареждане на музика</string>
<string name="lbl_albums">Албуми</string>
<string name="lbl_ep_live">EP на живо</string>
<string name="lbl_single_live">Сингъл наживо</string>
<string name="lbl_single_live">Сингъл на живо</string>
<string name="lbl_imported_playlist">Внесен плейлист</string>
<string name="lbl_rename_playlist">Преименувай плейлист</string>
<string name="lbl_rename_playlist">Преименуване на плейлист</string>
<string name="lbl_song_count">Брой песни</string>
<string name="lbl_date_added">Датата е добавена</string>
<string name="lbl_date_added">Дата на добавяне</string>
<string name="lbl_sort">Вид</string>
<string name="lbl_mix">DJ микс</string>
<string name="lbl_track">Писта</string>
<string name="lbl_track">Песен</string>
<string name="lbl_sort_mode">Сортирай по</string>
<string name="lbl_equalizer">Еквалайзер</string>
<string name="lbl_demo">Демонстрация</string>
<string name="lbl_sort_direction">Посока</string>
<string name="lbl_playlists">Плейлисти</string>
<string name="lbl_sort_asc">Възходящ</string>
<string name="lbl_sort_dsc">Низходящ</string>
<string name="lbl_sort_asc">Възходящо</string>
<string name="lbl_sort_dsc">Низходящо</string>
<string name="lbl_playback">Сега се изпълнява</string>
<string name="lbl_replaygain_track">ReplayGain Регулиране на песента</string>
<string name="lbl_replaygain_track">ReplayGain Регулиране на песен</string>
<string name="lbl_shuffle_shortcut_long">Разбъркай всички</string>
<string name="lbl_about">Относно</string>
<string name="lbl_path_style_absolute">Абсолютно</string>
@@ -104,7 +104,7 @@
<string name="lbl_code">Програмен код</string>
<string name="lbl_wiki">Уики</string>
<string name="lbl_licenses">Лицензи</string>
<string name="lbl_library_counts">Библиотечна статистика</string>
<string name="lbl_library_counts">Статистика на библиотеката</string>
<string name="lbl_selection">Избор</string>
<string name="lbl_error_info">Информация за грешка</string>
<string name="lbl_copied">Копирано</string>
@@ -115,7 +115,7 @@
<string name="lbl_supporters">Поддръжници</string>
<string name="lng_widget">Преглед и контрол на възпроизвеждането на музика</string>
<string name="lng_indexing">Вашата музикална библиотека се зарежда…</string>
<string name="lng_observing">Наблюдение на музикалната ви библиотека за промени…</string>
<string name="lng_observing">Наблюдение на вашата музикална библиотека за промени…</string>
<string name="lng_queue_added">Добави към опашката</string>
<string name="lng_playlist_created">Създаден плейлист</string>
<string name="lng_playlist_imported">Внесен плейлист</string>
@@ -132,11 +132,11 @@
<string name="set_theme_night">Тъмна</string>
<string name="set_accent">Цветова схема</string>
<string name="set_black_mode">Черна тема</string>
<string name="set_black_mode_desc">Използвай чисто черна тъмна тема</string>
<string name="set_black_mode_desc">Използване на чисто черна тъмна тема</string>
<string name="set_round_mode">Кръгъл режим</string>
<string name="set_round_mode_desc">Активирай заоблените ъгли на допълнителните елементи на потребителския интерфейс (изисква обложките на албумите да са заоблени)</string>
<string name="set_personalize">Персонализирайте</string>
<string name="set_personalize_desc">Персонализирайте контролите и поведението на потребителския интерфейс</string>
<string name="set_round_mode_desc">Активиране на заоблени ъгли на допълнителни елементи от потребителския интерфейс (изисква се кориците на албумите да са заоблени)</string>
<string name="set_personalize">Персонализиране</string>
<string name="set_personalize_desc">Персонализиране на контролите и поведението на потребителския интерфейс</string>
<string name="set_display">Дисплей</string>
<string name="set_lib_tabs">Раздели на библиотеката</string>
<string name="set_lib_tabs_desc">Промени видимостта и реда на разделите на библиотеката</string>
@@ -151,20 +151,20 @@
<string name="set_play_song_from_genre">Изпълни от жанр</string>
<string name="set_play_song_by_itself">Изпълни песен сама по себе си</string>
<string name="set_keep_shuffle">Запомни разбъркване</string>
<string name="set_keep_shuffle_desc">Запази функцията разбъркване при изпълнение на нова песен</string>
<string name="set_keep_shuffle_desc">Запазване на функцията разбъркване при изпълнение на нова песен</string>
<string name="set_content">Съдържание</string>
<string name="set_content_desc">Контролирай как да се зареждат музика и изображение</string>
<string name="set_content_desc">Контролирайте как се зареждат музика и изображения</string>
<string name="set_music">Музика</string>
<string name="set_observing">Автоматично презареждане</string>
<string name="set_observing_desc">Презаредете музикалната библиотека, когато се промени (изисква постоянно известие)</string>
<string name="set_exclude_non_music">Изключи не-музика</string>
<string name="set_separators">Разделители с множество стойности</string>
<string name="set_separators_desc">Конфигурирай знаци, които обозначават множество стойности на тагове</string>
<string name="set_separators_desc">Конфигуриране на символи, които обозначават множество стойности на етикети</string>
<string name="set_separators_comma">Запетая (,)</string>
<string name="set_separators_semicolon">Точка и запетая (;)</string>
<string name="set_separators_slash">Наклонена черта (/)</string>
<string name="set_separators_plus">Плюс (+)</string>
<string name="set_separators_and">Амперсанд (&amp;)</string>
<string name="set_separators_and">Ampersand (&amp;)</string>
<string name="set_intelligent_sorting">Интелигентно сортиране</string>
<string name="set_cover_mode">Обложки на албум</string>
<string name="set_cover_mode_off">Изключено</string>
@@ -173,14 +173,14 @@
<string name="set_square_covers">Функция квадратни обложки на албум</string>
<string name="set_square_covers_desc">Изрежи всички корици на албуми до съотношение 1:1</string>
<string name="set_audio">Аудио</string>
<string name="set_audio_desc">Конфигурирай поведението на звука и възпроизвеждане</string>
<string name="set_audio_desc">Конфигуриране на звука и поведението при възпроизвеждане</string>
<string name="set_playback">Възпроизвеждане</string>
<string name="set_headset_autoplay">Автоматично пускане на слушалки</string>
<string name="set_headset_autoplay_desc">Винаги започва да възпроизвежда, когато са свързани слушалки (може да не работи на всички устройства)</string>
<string name="set_headset_autoplay_desc">Винаги започвайте да възпроизвеждате, когато са свързани слушалки (може да не работи на всички устройства)</string>
<string name="set_rewind_prev">Превъртете преди да преминете назад</string>
<string name="set_rewind_prev_desc">Превъртете преди да преминете към предишната песен</string>
<string name="set_repeat_pause">Пауза при повторение</string>
<string name="set_remember_pause">Запомни пауза</string>
<string name="set_remember_pause">Запомнете паузата</string>
<string name="set_replay_gain">Нормализация на звука</string>
<string name="set_replay_gain_mode">ReplayGain стратегия</string>
<string name="set_replay_gain_mode_off">Изключено</string>
@@ -189,11 +189,11 @@
<string name="set_bar_action">Персонализирано действие на лентата за възпроизвеждане</string>
<string name="set_play_song_none">Изпълни от показания елемент</string>
<string name="set_play_song_from_all">Изпълни от всички песни</string>
<string name="set_exclude_non_music_desc">Игнорирай аудио файлове, които не са музика, като подкасти</string>
<string name="set_separators_warning">Предупреждение: Използването на тази настройка може да доведе до неправилно тълкуване на някои тагове като имащи множество стойности. Можете да разрешите това, като поставите пред нежеланите разделителни знаци обратна наклонена черта (\\).</string>
<string name="set_exclude_non_music_desc">Игнорирайте аудио файлове, които не са музика, като например подкасти</string>
<string name="set_separators_warning">Предупреждение: Използването на тази настройка може да доведе до неправилно тълкуване на някои етикети като имащи множество стойности. Можете да разрешите това, като поставите пред нежеланите разделителни знаци обратна наклонена черта (\\).</string>
<string name="set_intelligent_sorting_desc">Правилно сортиране на имена, които започват с цифри или думи като \"the\" (работи най-добре с музика на английски)</string>
<string name="set_hide_collaborators">Скриване на сътрудниците</string>
<string name="set_hide_collaborators_desc">Показвай само изпълнители, които са директно посочени в албум (работи най-добре при добре маркирани библиотеки)</string>
<string name="set_hide_collaborators">Скриване на сътрудници</string>
<string name="set_hide_collaborators_desc">Показване само на изпълнители, които са директно посочени в албума (работи най-добре в добре етикетирани библиотеки)</string>
<string name="set_images">Изображения</string>
<string name="set_repeat_pause_desc">Пауза когато песента се повтаря</string>
<string name="set_remember_pause_desc">Останете в режим на изпълнение/пауза, когато прескачате или редактирате опашка</string>
@@ -201,15 +201,15 @@
<string name="set_replay_gain_mode_album">Предпочитам албум</string>
<string name="set_replay_gain_mode_dynamic">Предпочитам албум, ако се пуска такъв</string>
<string name="set_pre_amp">ReplayGain предусилвател</string>
<string name="set_pre_amp_desc">Предварителният усилвател се прилага към съществуващата настройка по време на възпроизвеждане</string>
<string name="set_pre_amp_desc">Предусилвателят се прилага към съществуващата настройка по време на възпроизвеждане</string>
<string name="set_pre_amp_with">Регулиране с етикети</string>
<string name="set_pre_amp_without">Корекция без етикети</string>
<string name="set_pre_amp_without">Регулиране без етикети</string>
<string name="set_library">Библиотека</string>
<string name="set_locations">Музикални папки</string>
<string name="set_locations_desc">Управлявайте откъде да се зарежда музиката</string>
<string name="set_locations_desc">Управление откъде да се зарежда музиката</string>
<string name="set_reindex">Обновяване на музика</string>
<string name="err_index_failed">Неуспешно зареждане на музика</string>
<string name="err_export_failed">Плейлиста не може да се изнесе в този файл</string>
<string name="err_export_failed">Не може да се изнесе плейлист в този файл</string>
<string name="err_no_app">Няма намерено приложение, което да може да се справи с тази задача</string>
<string name="desc_play_pause">Изпълни или пауза</string>
<string name="desc_skip_next">Премини към следваща песен</string>
@@ -220,9 +220,9 @@
<string name="desc_remove_song">Премахни тази песен</string>
<string name="desc_song_handle">Премести тази песен</string>
<string name="desc_queue_bar">Отвори опашката</string>
<string name="desc_selection_image">Избери изображение</string>
<string name="desc_selection_image">Избор на изображение</string>
<string name="desc_tab_handle">Премести този раздел</string>
<string name="set_pre_amp_warning">Предупреждение: Промяната на пред усилвателя на висока положителна стойност може да доведе до пикове на някои аудио записи.</string>
<string name="set_pre_amp_warning">Предупреждение: Промяната на предусилвателя на висока положителна стойност може да доведе до пикове на звука в някои аудио записи.</string>
<string name="desc_clear_search">Изчисти заявката за търсене</string>
<string name="desc_music_location_delete">Премахни папка</string>
<string name="err_import_failed">Не може да се внесе плейлист от този файл</string>
@@ -231,12 +231,12 @@
<string name="desc_no_cover">Обложка на албум</string>
<string name="desc_album_cover">Обложка на албум за %s</string>
<string name="desc_artist_image">Изображение на изпълнител за %s</string>
<string name="set_reindex_desc">Презареди музикалната библиотека, като използвате кеширани етикети, когато е възможно</string>
<string name="desc_genre_image">Жанрово изображение за %s</string>
<string name="set_reindex_desc">Презаредете музикалната библиотека, като използвате кеширани етикети, когато е възможно</string>
<string name="desc_genre_image">Изображение на жанр за %s</string>
<string name="set_rescan">Повторно сканиране на музика</string>
<string name="desc_track_number">Песен %d</string>
<string name="desc_playlist_image">Изображение на плейлист за %s</string>
<string name="set_rescan_desc">Изчисти кеша на етикета и пълно презареждане на музикалната библиотека (по-бавно, но по-пълно)</string>
<string name="set_rescan_desc">Изчистете кеша на етикетите и презаредете напълно музикалната библиотека (по-бавно, но по-пълно)</string>
<string name="def_artist">Неизвестен изпълнител</string>
<string name="def_date">Няма дата</string>
<string name="def_disc">Няма диск</string>
@@ -277,7 +277,7 @@
<string name="clr_brown">Кафяво</string>
<string name="fmt_selected">%d Избрано</string>
<string name="fmt_indexing">Вашата музикална библиотека се зарежда… (%1$d/%2$d)</string>
<string name="fmt_deletion_info">Изтрий %s? Това не може да бъде отменено.</string>
<string name="fmt_deletion_info">Изтриване %s? Това не може да бъде отменено.</string>
<plurals name="fmt_song_count">
<item quantity="one">%d песен</item>
<item quantity="other">%d песени</item>
@@ -301,19 +301,21 @@
<string name="lbl_feedback">Обратна връзка</string>
<string name="lbl_github">Създайте проблем в GitHub</string>
<string name="lbl_email">Изпратете имейл</string>
<string name="lbl_music_sources">Изберете папки</string>
<string name="cnt_mp4">MPEG-4, съдържащ %s</string>
<string name="lng_empty_songs">Вашите песни ще се показват тук.</string>
<string name="lng_empty_albums">Вашите албуми ще се показват тук.</string>
<string name="lng_empty_playlists">Вашите плейлисти ще се показват тук.</string>
<string name="lng_empty_artists">Вашите артисти ще се показват тук.</string>
<string name="lng_empty_artists">Вашите изпълнители ще се появят тук.</string>
<string name="lng_empty_genres">Вашите жанрове ще се показват тук.</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="def_album">Неизвестен албум</string>
<string name="cdc_unknown">Неизвестен</string>
<string name="set_with_hidden">Включете скрити файлове</string>
<string name="set_with_hidden">Включи скрити файлове</string>
<string name="set_with_hidden_desc">Включете аудио файлове, които са скрити (напр. .cache)</string>
<string name="set_cover_mode_save_space">Спестете място</string>
<string name="set_cover_mode_as_is">Както е</string>
<string name="set_locations_new">Нова папка</string>
<string name="set_excluded_locations">Изключени папки</string>
<string name="set_excluded_locations_desc">Управление на папки, които да се изключат от зареждането на музика</string>
<string name="set_fs_cache">Използване на кеш на файловата система</string>
<string name="set_fs_cache_desc">Подобрява времето за зареждане, но може да попречи на добавянето на нова музика</string>
</resources>
-1
View File
@@ -2,7 +2,6 @@
<resources>
<string name="lbl_observing">واجۊری کۊلیکسیون آرنگ</string>
<string name="lbl_retry">قپ ریت دوواره</string>
<string name="lbl_music_sources">دوبلگه یل ن پسند کۊنین</string>
<string name="lbl_songs">آرنگا</string>
<string name="lbl_song">آرنگ</string>
<string name="lbl_all_songs">پوی آرنگا</string>
+2 -2
View File
@@ -320,12 +320,10 @@
<string name="lbl_feedback">Zpětná vazba</string>
<string name="lbl_github">Vytvořit problém na GitHubu</string>
<string name="lbl_email">Poslat e-mail</string>
<string name="lbl_music_sources">Vybrat složky</string>
<string name="def_album">Neznámé album</string>
<string name="cnt_mp4">MPEG-4 obsahující %s</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="cdc_unknown">Neznámý</string>
<string name="set_locations_new">Nová složka</string>
<string name="set_cover_mode_save_space">Úspora místa</string>
<string name="lng_empty_songs">Vaše skladby se zobrazí zde.</string>
<string name="lng_empty_albums">Vaše alba se zobrazí zde.</string>
@@ -337,4 +335,6 @@
<string name="set_cover_mode_as_is">Původní</string>
<string name="set_excluded_locations_desc">Spravovat složky, ze kterých ze hudba nemá načítat</string>
<string name="set_excluded_locations">Vyloučené složky</string>
<string name="set_fs_cache">Použít mezipaměť v souborovém systému</string>
<string name="set_fs_cache_desc">Zlepší dobu načítání, ale může zabránit přidání nové hudby</string>
</resources>
+16 -4
View File
@@ -132,11 +132,11 @@
<string name="lbl_search">Chwilio</string>
<string name="lbl_filter">Hidlo</string>
<string name="lbl_sort_dsc">Disgynnol</string>
<string name="lbl_playback">Yn chwarae nawr</string>
<string name="lbl_playback">Yn chwarae rŵan</string>
<string name="lbl_equalizer">Gosodiadau sain</string>
<string name="lbl_play">Chwarae</string>
<string name="lbl_shuffle">Chwarae ar hap</string>
<string name="lbl_queue">Ciwio</string>
<string name="lbl_queue">Ciw</string>
<string name="lbl_sort_asc">Esgynnol</string>
<string name="lbl_play_next">Chwarae nesaf</string>
<string name="lbl_queue_add">Ychwanegu i\'r ciw</string>
@@ -311,7 +311,6 @@
<string name="set_separators_desc">Ffurfweddu llythrennau sydd yn dynodi mwy nag un gwerth tag</string>
<string name="set_separators_and">Ampersand (&amp;)</string>
<string name="set_audio_desc">Ffurfweddu sain ac ymarweddiad chwarae</string>
<string name="lbl_music_sources">Dewis ffolderi</string>
<string name="lbl_feedback">Adborth</string>
<string name="lbl_github">Creu issue ar GitHub</string>
<string name="lbl_email">Anfon ebost</string>
@@ -320,4 +319,17 @@
<string name="cdc_unknown">Anhysbys</string>
<string name="cnt_mp4">MPEG-4 gan gynnwys %s</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
</resources>
<string name="lng_empty_artists">Bydd eich artistiaid yn ymddangos yma.</string>
<string name="lng_empty_songs">Bydd eich caneuon yn ymddangos yma.</string>
<string name="lng_empty_albums">Bydd eich albymau yn ymddangos yma.</string>
<string name="lng_empty_playlists">Bydd eich rhestri chwarae yn ymddangos yma.</string>
<string name="set_with_hidden">Cynnwys ffeiliau cudd</string>
<string name="set_excluded_locations">Ffolderi wedi\'u eithrio</string>
<string name="set_excluded_locations_desc">Rheoli ffolderi i\'w heithrio rhag llwytho cerddoriaeth</string>
<string name="lng_empty_genres">Bydd eich genres yn ymddangos yma.</string>
<string name="set_cover_mode_as_is">Paid â newid</string>
<string name="set_with_hidden_desc">Cynnwys ffeiliau sain cudd (e.e. .cache)</string>
<string name="set_cover_mode_save_space">Cadw lle storfa</string>
<string name="set_fs_cache">Defnyddio cof dros dro y system</string>
<string name="set_fs_cache_desc">Yn gwella amseroedd llwytho, ond gall atal cerddoriaeth newydd rhag cael ei hychwanegu</string>
</resources>
+2 -2
View File
@@ -311,12 +311,10 @@
<string name="lbl_github">Ein Issue auf GitHub erstellen</string>
<string name="lbl_feedback">Rückmeldung</string>
<string name="lbl_email">Eine E-Mail senden</string>
<string name="lbl_music_sources">Ordner auswählen</string>
<string name="cnt_mp4">MPEG-4, enthält %s</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="cdc_unknown">Unbekannt</string>
<string name="def_album">Unbekanntes Album</string>
<string name="set_locations_new">Neuer Ordner</string>
<string name="set_cover_mode_save_space">Speicherplatz sparen</string>
<string name="lng_empty_albums">Deine Alben werden hier angezeigt.</string>
<string name="lng_empty_playlists">Deine Wiedergabelisten werden hier angezeigt.</string>
@@ -328,4 +326,6 @@
<string name="set_with_hidden">Versteckte Dateien einbeziehen</string>
<string name="set_excluded_locations">Ausgeschlossene Ordner</string>
<string name="set_excluded_locations_desc">Ordner verwalten, aus denen keine Musik geladen wird</string>
<string name="set_fs_cache">Dateisystem-Cache benutzen</string>
<string name="set_fs_cache_desc">Verbessert Ladezeiten, kann aber verhindern, dass neue Musik hinzugefügt wird</string>
</resources>
+2 -2
View File
@@ -315,7 +315,6 @@
<string name="lbl_github">Crear una incidencia en GitHub</string>
<string name="lbl_email">Enviar un correo electrónico</string>
<string name="lbl_feedback">Retroalimentación</string>
<string name="lbl_music_sources">Seleccionar carpetas</string>
<string name="def_album">Álbum desconocido</string>
<string name="cdc_unknown">Desconocido</string>
<string name="cnt_mp4">El MPEG-4 contiene %s</string>
@@ -323,7 +322,6 @@
<string name="lng_empty_albums">Sus álbumes aparecerán aquí.</string>
<string name="lng_empty_artists">Sus artistas aparecerán aquí.</string>
<string name="lng_empty_genres">Sus géneros aparecerán aquí.</string>
<string name="set_locations_new">Nueva carpeta</string>
<string name="lng_empty_playlists">Sus listas de reproducción aparecerán aquí.</string>
<string name="lng_empty_songs">Sus canciones aparecerán aquí.</string>
<string name="set_cover_mode_save_space">Ahorra espacio</string>
@@ -332,4 +330,6 @@
<string name="set_with_hidden">Incluir ficheros ocultos</string>
<string name="set_excluded_locations">Directorios excluidos</string>
<string name="set_excluded_locations_desc">Administrar exclusión de directorios</string>
<string name="set_fs_cache_desc">Mejora los tiempos de carga, pero puede impedir que se agregue nueva música</string>
<string name="set_fs_cache">Usar la caché del sistema de archivos</string>
</resources>
+4 -2
View File
@@ -303,12 +303,10 @@
<string name="lbl_feedback">Tagasiside</string>
<string name="lbl_github">Koosta GitHubis veateade või ettepanek</string>
<string name="lbl_email">Saada e-kiri</string>
<string name="lbl_music_sources">Vali kaustad</string>
<string name="def_album">Tundmatu album</string>
<string name="cnt_mp4">MPEG-4 %s koodekiga</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="cdc_unknown">Teadmata</string>
<string name="set_locations_new">Uus kaust</string>
<string name="set_cover_mode_save_space">Säästa ruumi</string>
<string name="lng_empty_songs">Sinu muusikapalad saavad olema nähtavad siin.</string>
<string name="lng_empty_artists">Sinu esitajad saavad olema nähtavad siin.</string>
@@ -318,4 +316,8 @@
<string name="set_with_hidden">Kaasa peidetud failid</string>
<string name="set_with_hidden_desc">Kaasa peidetud helifailid (nt. .cache)</string>
<string name="set_cover_mode_as_is">Sellisena, nagu ta on</string>
<string name="set_excluded_locations">Välistatud kaustad</string>
<string name="set_excluded_locations_desc">Halda kaustu, kust muusikat ei otsita</string>
<string name="set_fs_cache">Kasuta failisüsteemipõhist puhverdamist</string>
<string name="set_fs_cache_desc">Kiirendab meedia laadimise aega, kuid võib takistada uue muusika lisamist</string>
</resources>
-2
View File
@@ -293,7 +293,6 @@
<string name="set_remember_pause_desc">Pysy toisto/keskeytystilassa ohittaessa kappaleita tai muokatessa jonoa</string>
<string name="set_separators_desc">Valitse merkit, jotka erottavat tagiarvot toisistaan</string>
<string name="set_pre_amp_warning">Varoitus: Esivahvistuksen asettaminen korkeaan positiiviseen arvoon saattaa johtaa säröilyyn joissain kappaleissa.</string>
<string name="lbl_music_sources">Valitse kansiot</string>
<string name="lbl_github">Ilmoita viasta GitHubissa</string>
<string name="lbl_email">Lähetä sähköpostia</string>
<string name="lbl_more">Lisää</string>
@@ -303,7 +302,6 @@
<string name="set_pre_amp_desc">Esivahvistinta käytetään olemassa olevaan säätöön toiston aikana</string>
<string name="set_pre_amp_with">Säätö tunnisteilla</string>
<string name="def_album">Tuntematon albumi</string>
<string name="set_locations_new">Uusi kansio</string>
<string name="cnt_mp4">MPEG-4 sisältäen %s</string>
<string name="cdc_unknown">Tuntematon</string>
<string name="lng_empty_songs">Kappaleesi tulevat näkymään tässä.</string>
+2 -2
View File
@@ -311,7 +311,6 @@
<string name="lbl_feedback">Avis</string>
<string name="lbl_github">Faire un ticket sur GitHub</string>
<string name="lbl_email">Envoyer un courriel</string>
<string name="lbl_music_sources">Choisir des dossiers</string>
<string name="cdc_unknown">Inconnu</string>
<string name="cnt_mp4">MPEG-4 contenant %s</string>
<string name="lng_empty_songs">Vos chansons s\'afficheront ici.</string>
@@ -321,9 +320,10 @@
<string name="lng_empty_albums">Vos albums vont s\'afficher ici.</string>
<string name="lng_empty_artists">Vos artistes vont s\'afficher ici.</string>
<string name="set_with_hidden">Inclure les fichiers cachés</string>
<string name="set_locations_new">Nouveau dossier</string>
<string name="set_cover_mode_save_space">Économiser de l\'espace</string>
<string name="def_album">Album inconnu</string>
<string name="cdc_alac">Codec audio sans perte Apple (ALAC)</string>
<string name="set_cover_mode_as_is">Telle quelle</string>
<string name="set_excluded_locations">Dossiers exclus</string>
<string name="set_excluded_locations_desc">Gérer les dossiers pour exclure du chargement de musique</string>
</resources>
-2
View File
@@ -306,13 +306,11 @@
<string name="lbl_feedback">Povratne informacije</string>
<string name="lbl_github">Prijavi problem na GitHubu</string>
<string name="lbl_email">Pošalji e-mail</string>
<string name="lbl_music_sources">Odaberi mape</string>
<string name="cdc_alac">Appleov kodek zvuka bez gubitaka (ALAC)</string>
<string name="def_album">Nepoznat album</string>
<string name="cdc_unknown">Nepoznato</string>
<string name="cnt_mp4">MPEG-4 sadrži %s</string>
<string name="set_cover_mode_save_space">Niža kvaliteta</string>
<string name="set_locations_new">Nova mapa</string>
<string name="lng_empty_songs">Tvoje pjesme će se ovdje prikazati.</string>
<string name="lng_empty_albums">Tvoji albumi će se ovdje prikazati.</string>
<string name="lng_empty_artists">Tvoji izvođači će se ovdje prikazati.</string>
+2 -2
View File
@@ -302,8 +302,6 @@
<string name="lng_playlist_imported">Lejátszási lista importálva</string>
<string name="err_import_failed">Nem sikerült importálni a lejátszási listát ebből a fájlból</string>
<string name="err_export_failed">Nem sikerült exportálni a lejátszási listát ebbe a fájlba</string>
<string name="lbl_music_sources">Válassz mappákat</string>
<string name="set_locations_new">Új mappa</string>
<string name="def_album">Ismeretlen album</string>
<string name="lng_empty_songs">Itt fognak megjelenni a számaid.</string>
<string name="set_with_hidden">Rejtett fájlok megjelenítése</string>
@@ -323,4 +321,6 @@
<string name="cdc_unknown">Ismeretlen</string>
<string name="lbl_feedback">Visszajelzés</string>
<string name="lbl_github">Hozz létre egy hibajegyet a GitHubon</string>
<string name="set_excluded_locations">Kizárt mappák</string>
<string name="set_excluded_locations_desc">Mappák kihagyása a zenevizsgálatból</string>
</resources>
-1
View File
@@ -298,7 +298,6 @@
<string name="lbl_path_style_relative">Relatif</string>
<string name="lbl_error_info">Informasi kesalahan</string>
<string name="set_intelligent_sorting_desc">Sortir nama yang dimulai dengan nomor atau kata seperti \"the\" dengan benar (bekerja paling baik dengan lagu berbahasa Inggris)</string>
<string name="lbl_music_sources">Pilih folder</string>
<string name="lbl_more">Lebih banyak</string>
<string name="lng_empty_songs">Lagu-lagu Anda akan muncul di sini.</string>
<string name="lbl_start_playback">Mulai pemutaran</string>
+1 -3
View File
@@ -309,9 +309,8 @@
<string name="set_remember_pause_desc">Mantiene riproduzione/pausa durante il cambio di brano e la modifica della coda di riproduzione</string>
<string name="lbl_start_playback">Avvia la riproduzione</string>
<string name="lng_tasker_start">Avvia Auxio utilizzando le ultime impostazioni di riproduzione salvate. Se non è disponibile alcuna impostazione di riproduzione, i brani verranno riprodotti in ordine casuale. La riproduzione inizierà immediatamente.\n\nAttenzione: fai attenzione a controllare questa impostazione; se lo chiudi e poi provi a usarlo di nuovo, è probabile che l\'app si blocchi.</string>
<string name="lbl_music_sources">Scegli le cartelle</string>
<string name="lbl_feedback">Feedback</string>
<string name="lbl_email">Invia un\'email</string>
<string name="lbl_email">Invia un\'e-mail</string>
<string name="lbl_github">Apri un\'issue su GitHub</string>
<string name="def_album">Album sconosciuto</string>
<string name="lng_empty_genres">I tuoi generi appariranno qui.</string>
@@ -320,7 +319,6 @@
<string name="lng_empty_albums">I tuoi album appariranno qui.</string>
<string name="lng_empty_playlists">Le tue playlist appariranno qui.</string>
<string name="lbl_more">Espandi</string>
<string name="set_locations_new">Nuova cartella</string>
<string name="set_cover_mode_save_space">Bassa qualità</string>
<string name="cnt_mp4">MPEG-4 contenente %s</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
-2
View File
@@ -289,7 +289,6 @@
<string name="lng_playlist_exported">רשימת השמעה יוצאה</string>
<string name="lbl_export_playlist">יצא רשימת השמעה</string>
<string name="err_export_failed">אין יכולת לייצא רשימת השמעה מהקובץ הנ”ל</string>
<string name="lbl_music_sources">בחר תיקיות</string>
<string name="lbl_start_playback">התחל השמעה</string>
<string name="set_remember_pause">זכור השהיה</string>
<string name="set_replay_gain_mode_off">כבוי</string>
@@ -301,7 +300,6 @@
<string name="lbl_replaygain_track">תיקון רצועות ReplayGain</string>
<string name="lbl_replaygain_album">תיקון אלבומים ReplayGain</string>
<string name="lbl_author">יוצר</string>
<string name="set_locations_new">תיקיה חדשה</string>
<string name="lng_supporters_promo">תרמו לפרויקט כדי להוסיף את שמכם כאן!</string>
<string name="lng_tasker_start">מפעיל Auxio במצב שנשמר קודם לכן. אם אין מצב שמור זמין, כל השירים יתערבבו. השמעה תתחיל מידית.\n\nאזהרה: היזהר בשליטה בשירות זה, אם תסגרו אותו ואחר כך תנסו להשתמש בו שוב, ייתכן שתקרסו את האפליקציה.</string>
<string name="set_remember_pause_desc">הישאר בניגון/בהשהיה בעת דילוג או עריכה של התור</string>
-2
View File
@@ -279,9 +279,7 @@
<string name="set_replay_gain_mode_off">オフ</string>
<string name="err_import_failed">このファイルからプレイリストをインポートできません</string>
<string name="err_export_failed">このファイルにプレイリストをエクスポートできません</string>
<string name="lbl_music_sources">フォルダを選択</string>
<string name="set_cover_mode_as_is">そのまま</string>
<string name="set_locations_new">新しいフォルダー</string>
<string name="def_album">不明なアルバム</string>
<string name="cnt_mp4">%sを含むMPEG-4</string>
<string name="set_play_song_by_itself">曲を単独で再生</string>
-2
View File
@@ -12,7 +12,6 @@
<string name="lbl_eps">EP-ები</string>
<string name="lbl_all_songs">ყველა სიმღერა</string>
<string name="lbl_album">ალბომი</string>
<string name="lbl_music_sources">შეარჩიე საქაღალდეები</string>
<string name="lbl_indexer">მუსიკის ჩატვირთვა</string>
<string name="lbl_ep_live">პირდაპირი EP</string>
<string name="lbl_singles">სინგლები</string>
@@ -99,7 +98,6 @@
<string name="set_observing">ავტომატური ჩატვირთვა</string>
<string name="set_images">სურათები</string>
<string name="set_locations">მუსიკის საქაღალდე</string>
<string name="set_locations_new">ახალი საქაღალდე</string>
<string name="desc_skip_prev">ბოლო სიმღერაზე გადასვლა</string>
<string name="lbl_library_counts">სტატისტიკა</string>
<string name="lbl_licenses">ლიცენზიები</string>
+1 -2
View File
@@ -308,8 +308,7 @@
\n
\n경고: 이 서비스는 주의하여 사용하세요. 서비스를 닫은 뒤 다시 사용하려고 할 경우 앱이 충돌할 수 있습니다.</string>
<string name="lbl_more">더 보기</string>
<string name="lbl_music_sources">폴더 선택</string>
<string name="lbl_email">전자우편을 전송합니다</string>
<string name="lbl_github">깃허브에 문제를 제기합니다</string>
<string name="lbl_feedback">응답</string>
</resources>
</resources>
+3 -3
View File
@@ -124,7 +124,7 @@
<string name="desc_skip_next">Praleisti į sekančią dainą</string>
<string name="desc_skip_prev">Praleisti į paskutinę dainą</string>
<string name="lbl_mixtape">Mikso juosta</string>
<string name="lbl_mixtapes">Misko juostos</string>
<string name="lbl_mixtapes">Mikso juostos</string>
<string name="set_lib_tabs">Bibliotekos skirtukai</string>
<string name="set_lib_tabs_desc">Keisk bibliotekos skirtukų matomumą ir tvarką.</string>
<string name="set_replay_gain_mode_album">Pageidauti albumą</string>
@@ -315,13 +315,13 @@
<string name="lng_empty_artists">Čia bus rodomi jūsų atlikėjai.</string>
<string name="lng_empty_playlists">Čia bus rodomi jūsų grojaraščiai.</string>
<string name="lng_empty_genres">Čia bus rodomi jūsų žanrai.</string>
<string name="lbl_music_sources">Pasirinkti aplankus</string>
<string name="lbl_email">Siųsti el. laišką</string>
<string name="set_locations_new">Naujas aplankas</string>
<string name="cdc_alac">„Apple“ nenuostolingas garso kodekas (ALAC)</string>
<string name="cdc_unknown">Nežinomas</string>
<string name="set_cover_mode_save_space">Išsaugoti vietos</string>
<string name="set_cover_mode_as_is">Kaip yra</string>
<string name="set_with_hidden">Įtraukti paslėptus failus</string>
<string name="set_with_hidden_desc">Įtraukite garso failus, kurie paslėpti (pvz., .cache)</string>
<string name="set_excluded_locations">Neįtraukti aplankai</string>
<string name="set_excluded_locations_desc">Tvarkykite aplankus, kuriuos norite neįtraukti iš muzikos įkėlimo.</string>
</resources>
+1 -2
View File
@@ -301,5 +301,4 @@
<string name="lbl_github">Opprett en sak på GitHub</string>
<string name="lbl_feedback">Gi tilbakemelding</string>
<string name="lbl_email">Send en e-post</string>
<string name="lbl_music_sources">Velg mapper</string>
</resources>
</resources>
-1
View File
@@ -19,7 +19,6 @@
<string name="lbl_album">एल्बम</string>
<string name="lbl_indexing">गीतहरु लोड गर्दै</string>
<string name="lbl_observing">सङ्गीत लाइब्रेरी निगरानी गर्दै</string>
<string name="lbl_music_sources">फोल्डर छान्नुहोस्</string>
<string name="lbl_songs">गीतहरु</string>
<string name="lbl_song">गीत</string>
<string name="lbl_all_songs">सबै गीत</string>
-2
View File
@@ -304,7 +304,6 @@
<string name="lbl_windows_paths">Gebruik Windows-compatibele paden</string>
<string name="lbl_report">Rapporteer</string>
<string name="lng_playlist_exported">Afspeellijst geëxporteerd</string>
<string name="lbl_music_sources">Kies mappen</string>
<string name="set_cover_mode_as_is">Zoals</string>
<string name="lbl_more">Meer</string>
<string name="lng_tasker_start">Begint Auxio met de vorige redde staat. Als er geen gerede staat beschikbaar is, worden alle liedjes geschud. Playback zal onmiddellijk beginnen.\n\nWees voorzichtig met het controleren van deze dienst, als je het sluit en het weer probeert te gebruiken, zal je waarschijnlijk de app crashen.</string>
@@ -321,7 +320,6 @@
<string name="def_album">Onbekend album</string>
<string name="cnt_mp4">MPEG-4 bevat %s</string>
<string name="set_cover_mode_save_space">Ruimte besparen</string>
<string name="set_locations_new">Nieuwe map</string>
<string name="lbl_feedback">Feedback</string>
<string name="lbl_start_playback">Afspelen</string>
<string name="set_with_hidden_desc">Inclusief audiobestanden die verborgen zijn (excl. .cache)</string>
-1
View File
@@ -301,5 +301,4 @@
<string name="fmt_sample_rate">%d Hz</string>
<string name="fmt_lib_album_count">Innlasta album: %d</string>
<string name="fmt_lib_total_duration">Total lengd: %s</string>
<string name="lbl_music_sources">Vel mapper</string>
</resources>
-2
View File
@@ -314,11 +314,9 @@
<string name="lbl_email">Wyślij e-maila</string>
<string name="lbl_feedback">Informacja zwrotna</string>
<string name="lbl_github">Zgłoś problem na GitHubie</string>
<string name="lbl_music_sources">Wybierz foldery</string>
<string name="cnt_mp4">MPEG-4 zawierający %s</string>
<string name="cdc_unknown">Nieznany</string>
<string name="def_album">Nieznany album</string>
<string name="set_locations_new">Nowy folder</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="set_cover_mode_save_space">Oszczędzanie miejsca</string>
<string name="lng_empty_songs">Tutaj pojawią się dodane utwory.</string>
+5 -3
View File
@@ -211,7 +211,7 @@
<string name="set_separators_desc">Define caracteres que indiquem mais de um valor nos metadados</string>
<string name="set_exclude_non_music_desc">Ignora arquivos de áudio que não sejam música, como podcasts</string>
<string name="set_separators_warning">Aviso: Usar essa configuração pode resultar em alguns metadados serem interpretadas incorretamente como tendo múltiplos valores. Você pode resolver isso pré-definindo caracteres de separador indesejados com uma barra invertida (\\).</string>
<string name="set_exclude_non_music">Ignorar arquivos que não sejam músicas</string>
<string name="set_exclude_non_music">Ignorar os arquivos que não sejam músicas</string>
<string name="set_cover_mode">Qualidade das capas de álbuns</string>
<string name="set_cover_mode_off">Desativado</string>
<string name="set_cover_mode_balanced">Equilibrado</string>
@@ -312,7 +312,6 @@
<string name="lbl_more">Mais</string>
<string name="lbl_email">Envie um e-mail</string>
<string name="lbl_github">Crie uma issue no GitHub</string>
<string name="lbl_music_sources">Escolher pastas</string>
<string name="cnt_mp4">MPEG-4 contendo %s</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="cdc_unknown">Desconhecido</string>
@@ -324,10 +323,13 @@
<string name="lng_empty_playlists">As suas playlists aparecerão aqui.</string>
<string name="lng_empty_genres">Os seus gêneros aparecerão aqui.</string>
<string name="set_cover_mode_save_space">Economizar espaço</string>
<string name="set_locations_new">Nova pasta</string>
<string name="set_cover_mode_as_is">Qualidade original</string>
<string name="set_with_hidden_desc">Ignorar arquivos e pastas que estão ocultos (por exemplo, .cache)</string>
<string name="set_with_hidden">Ignorar arquivos ocultos</string>
<string name="set_excluded_locations_desc">Gerencie as pastas a serem ignoradas no carregamento de músicas</string>
<string name="set_excluded_locations">Pastas ignoradas</string>
<string name="set_fs_cache">Usar o cache do sistema de arquivos</string>
<string name="set_fs_cache_desc">Melhora o tempo de carregamento, mas pode impedir que novas músicas sejam adicionadas</string>
<string name="desc_add_folder">Adicionar pasta</string>
<string name="lbl_no_folders">Sem pastas</string>
</resources>
@@ -307,9 +307,7 @@
<string name="lbl_windows_paths">Usar caminhos compatíveis com Windows</string>
<string name="lng_tasker_start">Inicia o Auxio usando o estado gravado anteriormente. Se nenhum estado gravado estiver disponível, todas as músicas serão baralhadas. A reprodução começará imediatamente.\n\nAVISO: Tenha cuidado ao controlar este serviço, se fechá-lo e tentar usá-lo novamente, provavelmente irá travar a app.</string>
<string name="lbl_start_playback">Iniciar reprodução</string>
<string name="lbl_music_sources">Escolha pastas</string>
<string name="def_album">Álbum desconhecido</string>
<string name="set_locations_new">Nova pasta</string>
<string name="lbl_feedback">Opinião</string>
<string name="set_with_hidden">Ignorar ficheiros ocultos</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
+2 -2
View File
@@ -304,18 +304,18 @@
<string name="lbl_feedback">Opinião</string>
<string name="lbl_github">Crie um problema no GitHub</string>
<string name="lbl_email">Envie um e-mail</string>
<string name="lbl_music_sources">Escolha pastas</string>
<string name="lng_empty_artists">Os seus artistas aparecerão aqui.</string>
<string name="def_album">Álbum desconhecido</string>
<string name="lng_empty_songs">As suas músicas aparecerão aqui.</string>
<string name="lng_empty_albums">Os seus álbuns aparecerão aqui.</string>
<string name="lng_empty_playlists">As suas listas de reprodução aparecerão aqui.</string>
<string name="lng_empty_genres">Os seus gêneros aparecerão aqui.</string>
<string name="set_locations_new">Nova pasta</string>
<string name="set_cover_mode_save_space">Salvar espaco</string>
<string name="cnt_mp4">MPEG-4 contendo %s</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="cdc_unknown">Desconhecido</string>
<string name="set_with_hidden_desc">Ignorar ficheiros e pastas que estão ocultos (por exemplo, .cache)</string>
<string name="set_with_hidden">Ignorar ficheiros ocultos</string>
<string name="set_excluded_locations">Pastas excluídas</string>
<string name="set_excluded_locations_desc">Gerir pastas para excluir do carregamento de música</string>
</resources>
-2
View File
@@ -317,11 +317,9 @@
<string name="lbl_more">Больше</string>
<string name="lbl_feedback">Отзывы</string>
<string name="lbl_email">Отправить электронное письмо</string>
<string name="lbl_music_sources">Выберите папки</string>
<string name="cnt_mp4">MPEG-4, содержащий %s</string>
<string name="def_album">Неизвестный альбом</string>
<string name="lng_empty_artists">Здесь появятся ваши исполнители.</string>
<string name="set_locations_new">Новая папка</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="cdc_unknown">Неизвестный</string>
<string name="lng_empty_playlists">Здесь будут отображаться ваши плейлисты.</string>
-2
View File
@@ -301,14 +301,12 @@
<string name="fmt_lib_total_duration">Kohëzgjatja totale: %s</string>
<string name="fmt_deletion_info">A dëshironi të fshini %s? Kjo nuk mund të anulohet.</string>
<string name="clr_indigo">Lejla</string>
<string name="lbl_music_sources">Zgjidh dosjet</string>
<string name="def_album">Album i panjohur</string>
<string name="lng_empty_songs">Këngët e tua do të shfaqen këtu.</string>
<string name="lng_empty_albums">Albumet tuaja do të shfaqen këtu.</string>
<string name="lng_empty_artists">Artistët e tu do të shfaqen këtu.</string>
<string name="lng_empty_playlists">Listat tuaja për luajtje do të shfaqen këtu.</string>
<string name="lng_empty_genres">Zhanret tuaja do të shfaqen këtu.</string>
<string name="set_locations_new">Dosje e re</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="cdc_unknown">E panjohur</string>
<string name="set_cover_mode_save_space">Kurseni hapësirë</string>
-2
View File
@@ -295,11 +295,9 @@
<string name="lbl_windows_paths">Använd Windowskompatibla sökvägar</string>
<string name="def_album_count">Inga album</string>
<string name="set_replay_gain_mode_off">Av</string>
<string name="lbl_music_sources">Välj mappar</string>
<string name="lbl_github">Skapa ett ärende på GitHub</string>
<string name="lbl_more">Mer</string>
<string name="def_album">Okänt album</string>
<string name="set_locations_new">Ny mapp</string>
<string name="cdc_unknown">Okänt</string>
<string name="lbl_email">Skicka ett mejl</string>
<string name="lbl_feedback">Feedback</string>
+16 -3
View File
@@ -18,7 +18,7 @@
<string name="set_action_mode_repeat">மீண்டும் பயன்முறை</string>
<string name="set_separators">பல மதிப்பு பிரிப்பான்கள்</string>
<string name="set_separators_plus">பிளச் (+)</string>
<string name="set_separators_and">ஆம்பர்சண்ட் (&amp;)</string>
<string name="set_separators_and">உம்மைக் குறி (&amp;)</string>
<string name="set_hide_collaborators">ஒத்துழைப்பாளர்களை மறைக்கவும்</string>
<string name="set_images">படங்கள்</string>
<string name="set_audio">ஆடியோ</string>
@@ -51,7 +51,6 @@
<string name="lbl_indexing">இசையை ஏற்றுகிறது</string>
<string name="lbl_observing">கண்காணிப்பு இசை நூலகம்</string>
<string name="lbl_retry">மீண்டும் முயற்சிக்கவும்</string>
<string name="lbl_music_sources">கோப்புறைகளைத் தேர்ந்தெடுங்கள்</string>
<string name="lbl_songs">பாடல்கள்</string>
<string name="lbl_song">பாடல்</string>
<string name="lbl_all_songs">அனைத்து பாடல்களும்</string>
@@ -302,4 +301,18 @@
</plurals>
<string name="lbl_ep_live">நிகழ்நிலை ஈபி</string>
<string name="fmt_db_neg">-%.1f டெசிபெல்</string>
</resources>
<string name="set_cover_mode_as_is">மாறாமல்</string>
<string name="cnt_mp4">%s கொண்ட MPEG-4</string>
<string name="def_album">தெரியாத ஆல்பம்</string>
<string name="lng_empty_albums">உங்களுடைய ஆல்பங்கள் இங்கே காணப்படும்.</string>
<string name="lng_empty_playlists">உங்களுடைய இசைப் பட்டியல்கள் இங்கே காணப்படும்.</string>
<string name="set_excluded_locations">மறுக்கப்பட்ட கோப்புறைகள்</string>
<string name="set_excluded_locations_desc">இசை ஏற்றத்தில் இருந்து விலக்க வேண்டிய கோப்புறைகளை நிர்வகிக்கவும்</string>
<string name="cdc_unknown">தெரியாதவை</string>
<string name="set_with_hidden">மறைக்கப்பட்ட கோப்புகளை உட்படுத்து</string>
<string name="set_with_hidden_desc">மறைக்கப்பட்ட ஒலி கோப்புகளை உட்படுத்தவும் (உதா. .cache)</string>
<string name="set_cover_mode_save_space">இடத்தை சேமிக்கவும்</string>
<string name="lng_empty_songs">உங்களுடைய பாடல்கள் இங்கே காணப்படும்.</string>
<string name="lng_empty_genres">உங்களுடைய இசை வகைகள் இங்கே காணப்படும்.</string>
<string name="lng_empty_artists">உங்களுடைய கலைஞர்கள் இங்கே காணப்படும்.</string>
</resources>
+3 -3
View File
@@ -66,7 +66,7 @@
<string name="lbl_bitrate">Bit hızı</string>
<string name="lbl_sample_rate">Örnek hızı</string>
<string name="lng_widget">Müzik çalmayı görüntüle ve kontrol et</string>
<string name="info_app_desc">Android için basit, rasyonel bir müzik çalar.</string>
<string name="info_app_desc">Android için basit, akıllı bir müzik çalar.</string>
<string name="lbl_indexer">Müzik yükleniyor</string>
<string name="lng_indexing">Müzik kitaplığınız yükleniyor…</string>
<string name="lbl_name">Ad</string>
@@ -275,7 +275,6 @@
<string name="fmt_deletion_info">%s silinsin mi\? Geri alınamaz.</string>
<string name="lbl_appears_on">Üzerinde görünür</string>
<string name="def_album_count">Albüm yok</string>
<string name="lbl_music_sources">Klasör şeç</string>
<string name="lbl_export_playlist">Oynatma listesini dışa aktar</string>
<string name="lbl_demos">Denemeler</string>
<string name="lbl_replaygain_album">ReplayGain albüm ayarlaması</string>
@@ -303,7 +302,6 @@
<string name="lbl_import_playlist">Oynatma listesi aktar</string>
<string name="lbl_empty_playlist">Boş oynatma listesi</string>
<string name="lbl_path">Dosya yolu</string>
<string name="set_locations_new">Yeni klasör</string>
<string name="lbl_export">Dışa aktar</string>
<string name="lbl_import">İçe aktar</string>
<string name="lbl_more">Daha fazla</string>
@@ -322,4 +320,6 @@
<string name="set_with_hidden">Gizli dosyaları içer</string>
<string name="set_with_hidden_desc">Gizli olan ses dosyalarını içer (örn. .cache)</string>
<string name="set_cover_mode_as_is">Olduğu gibi</string>
<string name="set_excluded_locations_desc">Müzik yüklemesinde sayılmayacak klasörleri yönet</string>
<string name="set_excluded_locations">Sayılmayan klasörler</string>
</resources>
+4 -2
View File
@@ -312,7 +312,6 @@
\n
\nПопередження: будьте обережні при керуванні цією службою, якщо ви закриєте її, а потім спробуєте використовувати знову, ви, ймовірно, призведе до збою застосунка.</string>
<string name="lbl_more">Більше</string>
<string name="lbl_music_sources">Виберіть папки</string>
<string name="lbl_feedback">Зворотній зв\'язок</string>
<string name="lbl_github">Зробіть випуск на GitHub</string>
<string name="lbl_email">Надіслати електронний лист</string>
@@ -320,7 +319,6 @@
<string name="cnt_mp4">MPEG-4, що містить %s</string>
<string name="cdc_unknown">Невідомий</string>
<string name="cdc_alac">Аудіокодек Apple без втрат (ALAC)</string>
<string name="set_locations_new">Нова папка</string>
<string name="set_cover_mode_save_space">Економія місця</string>
<string name="lng_empty_songs">Ваші пісні відображатимуться тут.</string>
<string name="lng_empty_albums">Ваші альбоми відображатимуться тут.</string>
@@ -332,4 +330,8 @@
<string name="set_with_hidden_desc">Включати приховані аудіофайли (наприклад, .cache)</string>
<string name="set_excluded_locations">Виключені папки</string>
<string name="set_excluded_locations_desc">Керування папками, які потрібно виключити із завантаження музики</string>
<string name="set_fs_cache">Використовуйте кеш-систему файлів</string>
<string name="set_fs_cache_desc">Покращує час завантаження, але може запобігти додаванню нової музики</string>
<string name="desc_add_folder">Додати папку</string>
<string name="lbl_no_folders">Немає папок</string>
</resources>
+2 -2
View File
@@ -309,12 +309,10 @@
<string name="lbl_github">在 GithHub 上开 issue</string>
<string name="lbl_email">发送电子邮件</string>
<string name="lbl_feedback">反馈</string>
<string name="lbl_music_sources">选择文件夹</string>
<string name="def_album">未知专辑</string>
<string name="cnt_mp4">含 %s 的 MPEG-4</string>
<string name="cdc_alac">Apple 无损音频编解码器(ALAC)</string>
<string name="cdc_unknown">未知</string>
<string name="set_locations_new">新文件夹</string>
<string name="set_cover_mode_save_space">节省空间</string>
<string name="lng_empty_songs">歌曲会出现在此处。</string>
<string name="lng_empty_artists">艺术家会出现在此处。</string>
@@ -326,4 +324,6 @@
<string name="set_with_hidden_desc">包括隐藏的音频文件(排除 .cache)</string>
<string name="set_excluded_locations_desc">管理要排除在音乐加载以外的文件夹</string>
<string name="set_excluded_locations">排除的文件夹</string>
<string name="set_fs_cache">使用文件系统缓存</string>
<string name="set_fs_cache_desc">改进加载时间,但可能阻止添加新音乐</string>
</resources>
+15 -13
View File
@@ -41,7 +41,7 @@
<string name="desc_track_number">音軌 %d</string>
<string name="desc_play_pause">播放 / 暫停</string>
<!-- Hint Namespace | EditText Hints -->
<string name="lng_search_library">正在搜尋媒體…</string>
<string name="lng_search_library">搜尋您的媒體…</string>
<!-- Format Namespace | Value formatting/plurals -->
<plurals name="fmt_song_count">
<item quantity="other">%d 首歌曲</item>
@@ -69,7 +69,7 @@
<string name="lbl_album">專輯</string>
<string name="lbl_singles">單曲</string>
<string name="lbl_single">單曲</string>
<string name="set_round_mode_desc">更多介面元素套用圓角(專輯封面需另外啟用)</string>
<string name="set_round_mode_desc">更多介面元素套用圓角(專輯封面需另外啟用)</string>
<string name="lbl_artist">演出者</string>
<string name="lbl_new_playlist">新的播放清單</string>
<string name="lbl_import_playlist">匯入播放清單</string>
@@ -95,7 +95,7 @@
<string name="lbl_playlist">播放清單</string>
<string name="lbl_playlists">播放清單</string>
<string name="lbl_delete">刪除</string>
<string name="lbl_song_count">歌曲計數</string>
<string name="lbl_song_count">歌曲數量</string>
<string name="lbl_mix">DJ 混音</string>
<string name="lbl_confirm_delete_playlist">刪除播放清單?</string>
<string name="lbl_sort_dsc">降序</string>
@@ -160,7 +160,6 @@
<string name="set_remember_pause">記憶暫停</string>
<string name="set_lib_tabs">管理分頁</string>
<string name="set_ui_desc">變更主題與色彩</string>
<string name="lbl_music_sources">選擇資料夾</string>
<string name="set_action_mode_repeat">循環模式</string>
<string name="set_action_mode_next">移至下一首</string>
<string name="set_play_song_from_all">播放所有曲目</string>
@@ -199,20 +198,20 @@
<string name="set_keep_shuffle_desc">播放新曲目時保留隨機播放</string>
<string name="set_content">內容</string>
<string name="set_separators_desc">配置符號時表示多個標籤數值</string>
<string name="set_observing_desc">隨時掃描媒體資料變化(需要啟用持續性通知)</string>
<string name="set_observing_desc">隨時掃描媒體資料變化(需要啟用持續性通知)</string>
<string name="set_separators_semicolon">分號 (;)</string>
<string name="set_separators_comma">逗號 (,)</string>
<string name="set_separators_slash">斜線號 (/)</string>
<string name="set_hide_collaborators_desc">專輯封面僅顯示單一演出者(對標籤完善的媒體庫效果最佳)</string>
<string name="set_hide_collaborators_desc">專輯封面僅顯示單一演出者(對標籤完善的媒體庫效果最佳)</string>
<string name="set_square_covers_desc">將所有專輯封面裁剪為 1:1</string>
<string name="set_headset_autoplay_desc">連接耳機時立即播放音樂 (可能不適用所有裝置)</string>
<string name="set_headset_autoplay_desc">連接耳機時立即播放音樂(可能不適用所有裝置)</string>
<string name="set_remember_pause_desc">編輯或略過清單時保留播放狀態</string>
<string name="set_replay_gain_mode">重播增益模式</string>
<string name="set_replay_gain_mode_album">偏好專輯</string>
<string name="set_pre_amp">重播增益前級擴大</string>
<string name="set_pre_amp_desc">播放期間為現有調整套用前級擴大</string>
<string name="set_pre_amp_with">調整標籤</string>
<string name="set_rescan_desc">清除所有標籤快取並重新載入媒體 (完整但速度較慢)</string>
<string name="set_rescan_desc">清除所有標籤快取並重新載入媒體(完整但速度較慢)</string>
<string name="err_no_app">找不到可處理這項操作的應用程式</string>
<string name="desc_remove_song">刪除歌曲</string>
<string name="desc_auxio_icon">Auxio 圖示</string>
@@ -257,16 +256,15 @@
<string name="cdc_mp4">MPEG-4</string>
<string name="clr_purple">紫色</string>
<string name="desc_change_repeat">變更循環播放模式</string>
<string name="set_intelligent_sorting_desc">準確排序以單字或數字為首的名稱(例如 The,對英文效果最佳)</string>
<string name="set_intelligent_sorting_desc">準確排序以單字或數字為首的名稱(例如 The,對英文效果最佳)</string>
<string name="lbl_appears_on">登場</string>
<string name="set_play_song_from_album">播放專輯</string>
<string name="set_separators_and">與號 (&amp;)</string>
<string name="set_play_song_by_itself">播放單曲</string>
<string name="set_locations_new">新資料夾</string>
<string name="desc_music_location_delete">刪除資料夾</string>
<string name="lbl_compilations">合輯</string>
<string name="lbl_ok">確定</string>
<string name="lbl_wiki">維基百科</string>
<string name="lbl_wiki">線上百科</string>
<string name="lbl_selection">選取項目</string>
<string name="lbl_github">在 GitHub 張貼問題</string>
<string name="lbl_donate">贊助</string>
@@ -278,7 +276,7 @@
<string name="set_cover_mode_balanced">平衡</string>
<string name="set_cover_mode_high_quality">高畫質</string>
<string name="desc_shuffle">啟用 / 停用隨機播放</string>
<string name="def_date">沒有日期</string>
<string name="def_date">無日期</string>
<string name="desc_selection_image">選取影像</string>
<string name="set_separators_warning">警告:啟用可能會誤判某些符號具有多重數值。您可在不需要的分隔符號前插入後斜線 (\\)。</string>
<string name="lbl_compilation_remix">混音合輯</string>
@@ -291,7 +289,7 @@
<string name="lbl_author_name">由 Alexander Capehart 開發</string>
<string name="set_play_song_from_artist">播放演出者</string>
<string name="set_play_song_from_genre">播放類型</string>
<string name="set_with_hidden_desc">讀取隱藏音訊檔案 (例如 .cache)</string>
<string name="set_with_hidden_desc">讀取隱藏音訊檔案(例如 .cache)</string>
<string name="set_cover_mode_as_is">原始</string>
<string name="set_repeat_pause_desc">重播單曲時暫停</string>
<string name="set_pre_amp_without">不調整標籤</string>
@@ -319,4 +317,8 @@
<string name="fmt_db_neg">-%.1f dB</string>
<string name="cdc_flac">自由無損音訊編碼 (FLAC)</string>
<string name="cdc_alac">Apple 無損音訊編碼 (ALAC)</string>
<string name="set_excluded_locations">排除資料夾</string>
<string name="set_excluded_locations_desc">管理不需讀取音樂的資料夾</string>
<string name="set_fs_cache">使用檔案系統快取</string>
<string name="set_fs_cache_desc">改善讀取時間,但會阻擋音樂新增</string>
</resources>
+5
View File
@@ -22,8 +22,11 @@
<string name="set_key_with_hidden" translatable="false">auxio_with_hidden</string>
<string name="set_key_music_locations" translatable="false">auxio_music_locations2</string>
<string name="set_key_excluded_locations" translatable="false">auxio_excluded_locations</string>
<string name="set_key_filter_mode" translatable="false">auxio_filter_mode</string>
<string name="set_key_filtered_locations" translatable="false">auxio_filtered_locations</string>
<string name="set_key_separators" translatable="false">auxio_separators</string>
<string name="set_key_auto_sort_names" translatable="false">auxio_auto_sort_names</string>
<string name="set_key_locations_mode" translatable="false">auxio_locations_mode</string>
<string name="set_key_headset_autoplay" translatable="false">auxio_headset_autoplay</string>
<string name="set_key_replay_gain" translatable="false">auxio_replay_gain</string>
@@ -58,6 +61,8 @@
<string name="set_key_library_revision" translatable="false">auxio_library_revision</string>
<string name="set_key_force_reload_workaround" translatable="false">auxio_force_reload</string>
<string-array name="entries_theme">
<item>@string/set_theme_auto</item>
<item>@string/set_theme_day</item>
+22 -5
View File
@@ -16,9 +16,6 @@
<string name="lbl_observing">Monitoring music library</string>
<!-- As in to retry loading music -->
<string name="lbl_retry">Retry</string>
<string name="lbl_music_sources">Pick folders</string>
<!-- As in to show additional information about a music loading error -->
<!-- As in grant permission -->
<string name="lbl_songs">Songs</string>
<string name="lbl_song">Song</string>
@@ -217,6 +214,12 @@
<string name="lng_empty_artists">Your artists will show up here.</string>
<string name="lng_empty_genres">Your genres will show up here.</string>
<string name="lng_empty_playlists">Your playlists will show up here.</string>
<string name="lng_file_picker">Load music from the folders that you select. Slower, but more reliable. Requires the vanilla file manager app to be installed.</string>
<string name="lng_system_database">Load music that the Android OS automatically detects. Faster, but less reliable. No support for filesystem-dependent features like cover.jpg.</string>
<string name="lng_grant_storage_anyway">Granting external storage permissions can fix issues on some devices.</string>
<string name="lng_grant_storage_required">Grant external storage permissions to enable this option.</string>
<string name="lng_include_folders">Music outside of the selected folders will be ignored.</string>
<string name="lng_exclude_folders">Music inside the selected folders will be ignored.</string>
<!-- Settings namespace | Settings-related labels -->
<eat-comment />
@@ -312,9 +315,20 @@
<string name="set_pre_amp_warning">Warning: Changing the pre-amp to a high positive value may result in peaking on some audio tracks.</string>
<string name="set_library">Library</string>
<string name="set_locations">Music folders</string>
<string name="set_locations">Music sources</string>
<string name="set_locations_desc">Manage where music should be loaded from</string>
<string name="set_locations_new">New folder</string>
<string name="set_load_from">Load From</string>
<string name="set_file_picker">File picker</string>
<string name="set_system_database">System</string>
<string name="set_grant_storage_anyway">Storage access recommended</string>
<string name="set_grant_storage">Storage access required</string>
<string name="set_folders_to_load">Folders to Load</string>
<string name="set_folders_to_ignore">Folders to Ignore</string>
<string name="set_filtered_folders">Filtered Folders</string>
<string name="set_filter_mode">Filter Mode</string>
<string name="set_include">Include</string>
<string name="set_exclude">Exclude</string>
<string name="set_extra_settings">More settings</string>
<string name="set_fs_cache">Use file-system cache</string>
<string name="set_fs_cache_desc">Improves loading times, but can prevent new music from being added</string>
<string name="set_excluded_locations">Excluded folders</string>
@@ -332,6 +346,7 @@
<string name="err_no_app">No app found that can handle this task</string>
<!-- No folders in the "Music Folders" setting -->
<string name="err_bad_location">This folder is not supported</string>
<string name="lbl_no_folders">No Folders</string>
<!-- Description Namespace | Accessibility Strings -->
@@ -349,6 +364,7 @@
<string name="desc_queue_bar">Open the queue</string>
<string name="desc_tab_handle">Move this tab</string>
<string name="desc_clear_search">Clear search query</string>
<string name="desc_add_folder">Add Folder</string>
<string name="desc_music_location_delete">Remove folder</string>
<string name="desc_auxio_icon">Auxio icon</string>
@@ -359,6 +375,7 @@
<string name="desc_playlist_image">Playlist image for %s</string>
<string name="desc_selection_image">Selection image</string>
<!-- Default Namespace | Placeholder values -->
<eat-comment />
+7
View File
@@ -78,6 +78,13 @@
<item name="android:letterSpacing">-0.01125</item>
</style>
<style name="TextAppearance.Auxio.TitleMediumEmphasis" parent="TextAppearance.Material3.TitleMedium">
<item name="fontFamily">@font/inter_semibold</item>
<item name="android:fontFamily">@font/inter_semibold</item>
<item name="android:textStyle">bold</item>
<item name="android:letterSpacing">-0.01425</item>
</style>
<style name="TextAppearance.Auxio.TitleSmall" parent="TextAppearance.Material3.TitleSmall">
<item name="fontFamily">@font/inter_semibold</item>
<item name="android:fontFamily">@font/inter_semibold</item>
@@ -9,18 +9,6 @@
app:summary="@string/set_observing_desc"
app:title="@string/set_observing" />
<SwitchPreferenceCompat
app:defaultValue="true"
app:key="@string/set_key_exclude_non_music"
app:summary="@string/set_exclude_non_music_desc"
app:title="@string/set_exclude_non_music" />
<SwitchPreferenceCompat
app:defaultValue="false"
app:key="@string/set_key_with_hidden"
app:summary="@string/set_with_hidden_desc"
app:title="@string/set_with_hidden" />
<org.oxycblt.auxio.settings.ui.WrappedDialogPreference
app:key="@string/set_key_separators"
app:summary="@string/set_separators_desc"
-12
View File
@@ -33,18 +33,6 @@
app:summary="@string/set_locations_desc"
app:title="@string/set_locations" />
<org.oxycblt.auxio.settings.ui.WrappedDialogPreference
app:key="@string/set_key_excluded_dirs"
app:summary="@string/set_excluded_locations_desc"
app:title="@string/set_excluded_locations" />
<SwitchPreferenceCompat
app:key="@string/set_key_fs_cache"
app:summary="@string/set_fs_cache_desc"
app:title="@string/set_fs_cache"
app:defaultValue="false" />
<Preference
app:key="@string/set_key_reindex"
app:summary="@string/set_reindex_desc"
-1
View File
@@ -30,7 +30,6 @@ plugins {
//noinspection GradlePluginVersion
id 'com.android.library' version "$agp_version" apply false
id "org.jetbrains.kotlin.android" version "$kotlin_version" apply false
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version" apply false
id "com.google.devtools.ksp" version '2.0.21-1.0.25' 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
@@ -0,0 +1,5 @@
Auxio 4.0.0 completely overhauls the user experience, with a refreshed design based on the latest Material Design specs
and a brand new music loader with signifigant improvements to device and tag support.
This patch reintroduces the faster, but less reliable pre-v4.0.0 music loader for use with large libraries,
enables full date added support, and fixes a variety of UI/UX issues.
For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v4.0.7.
@@ -1,25 +1,24 @@
Auxio è un lettore musicale locale veloce e con un'interfaccia immediata, senza le numerose funzioni inutili presenti in altri lettori musicali. Basato su moderne librerie di riproduzione multimediale, Auxio ha un supporto di libreria e una qualità di ascolto superiore rispetto ad altre applicazioni che utilizzano funzionalità Android obsolete. In breve, <b>riproduce musica</b>.
Auxio è un lettore musicale locale veloce, con un'interfaccia utente intuitiva e privo delle numerose funzioni superflue che caratterizzano altri lettori musicali. Sviluppato su moderne librerie di riproduzione multimediale, Auxio offre un supporto di libreria e una qualità di ascolto superiori rispetto ad altre applicazioni che utilizzano funzionalità Android obsolete. In breve, <b>riproduce musica</b>.
<b>Caratteristiche</b>
- Riproduzione basata su ExoPlayer di Media3
- Interfaccia utente scattante derivata dalle ultime linee guida del Material Design
- Interfaccia utente autorevole che privilegia la facilità d'uso rispetto ai casi limite
- Interfaccia utente reattiva, derivata dalle ultime linee guida del Material Design
- UX ben definita che privilegia la facilità d'uso rispetto a situazioni rare o complesse
- Comportamento personalizzabile
- Supporto per numeri di disco, artisti multipli, tipi di release,
date precise/originali, tag di ordinamento e altro ancora
- Organizzazione di artisti avanzata che unifica gli artisti e gli artisti degli album
- Supporto per numeri di disco, artisti multipli, tipi di rilascio, date precise/originali, tag di ordinamento e altro ancora
- Sistema avanzato di gestione artisti che unifica artisti e artisti degli album
- Gestione delle cartelle consapevole delle schede SD
- Gestione affidabile delle playlist
- Persistenza dello stato di riproduzione
- Riproduzione automatica senza silenzio
- Riproduzione gapless automatica
- Supporto Android Auto
- Supporto completo di ReplayGain (su file MP3, FLAC, OGG, OPUS e MP4)
- Supporto di equalizzatori esterni (es. Wavelet)
- Edge-to-edge
- Supporto delle copertine incorporate
- Supporto di equalizzatori esterni (come Wavelet)
- Visualizzazione edge-to-edge
- Supporto per copertine integrate
- Funzionalità di ricerca
- Riproduzione automatica delle cuffie
- Riproduzione automatica con le cuffie
- Widget eleganti che si adattano automaticamente alle loro dimensioni
- Completamente privato e offline
- Niente copertine arrotondate degli album (comportamento predefinito)
- Nessuna copertura arrotondata degli album (se non desiderato)
@@ -1,25 +1,24 @@
ஆக்சியோ ஒரு உள்ளக இசை வீரர், மற்ற இசை வீரர்களில் பல பயனற்ற நற்பொருத்தங்கள் இல்லாமல் வேகமான, நம்பகமான UI/UX உடன். நவீன மீடியா பிளேபேக் நூலகங்களால் கட்டப்பட்ட ஆக்சியோ, காலாவதியான ஆண்ட்ராய்டு செயல்பாட்டைப் பயன்படுத்தும் பிற பயன்பாடுகளுடன் ஒப்பிடும்போது சிறந்த நூலக உதவி மற்றும் கேட்கும் தரத்தைக் கொண்டுள்ளது. சுருக்கமாக, <b> இது இசையை இயக்குகிறது. </b>
Auxio என்பது ஒரு உள்ளமைக்கப்பட்ட இசை பிளேயராகும், இது வேகமான மற்றும் நம்பகமான UI/UX-ஐ வழங்குகிறது, மற்ற இசை பிளேயர்களில் காணப்படும் பல பயனற்ற அம்சங்களை தவிர்த்து. இது நவீன மீடியா பிளேபேக் நூலகங்களை அடிப்படையாகக் கொண்டு உருவாக்கப்பட்டதால், பழைய Android செயலாக்கங்களைப் பயன்படுத்தும் பயன்பாடுகளுடன் ஒப்பிடும் போது சிறந்த நூலக ஆதரவு மற்றும் கேட்கும் தரத்தை வழங்குகிறது. <b>சுருக்கமாகச் சொன்னால், இது இசையை இயக்குகிறது.</b>
<b> நற்பொருத்தங்கள் </b>
<b>அம்சங்கள்</b>
- மீடியா 3 எக்சோப்ளேயரை அடிப்படையாகக் கொண்ட பிளேபேக்
- அண்மைக் கால பொருள் வடிவமைப்பு வழிகாட்டுதல்களிலிருந்து பெறப்பட்ட ச்னாப்பி இடைமுகம்
- எட்ச் வழக்குகளில் பயன்பாட்டை எளிதாக்கும் கருத்தியல் யுஎக்ச்
- மீடியா 3 எக்சோப்ளேயரை(Media3 ExoPlayer) அடிப்படையாகக் கொண்ட பிளேபேக்
- சமீபத்திய Material Design வழிகாட்டுதல்களிலிருந்து உருவாகிய வேகமான இடைமுகம்(UI)
- எளிமையான பயன்பாட்டை முன்னிலைப்படுத்தும் கட்டுப்பாடான UX
- தனிப்பயனாக்கக்கூடிய நடத்தை
- வட்டு எண்களுக்கான உதவி, பல கலைஞர்கள், வெளியீட்டு வகைகள்,
துல்லியமான/அசல் தேதிகள், வரிசைப்படுத்தப்பட்ட குறிச்சொற்கள் மற்றும் பல
- Disc எண்கள், பல கலைஞர்கள், வெளியீட்டு வகைகள், துல்லியமான/மூல வெளியீட்டு தேதிகள், வரிசை அடையாளங்கள் ஆகியவற்றிற்கான ஆதரவு
- கலைஞர்கள் மற்றும் ஆல்பம் கலைஞர்களை ஒன்றிணைக்கும் மேம்பட்ட கலைஞர் அமைப்பு
- எச்டி கார்டு-விழிப்புணர்வு கோப்புறை மேலாண்மை
- நம்பகமான பிளேலிச்டிங் செயல்பாடு
- பிளேபேக் நிலை விடாமுயற்சி
- ஆண்ட்ராய்டு ஆட்டோ உதவி
- தானியங்கி இடைவெளி பின்னணி
.
- வெளிப்புற சமநிலை உதவி (எ.கா. அலைவரிசை)
-விளிம்பு-க்கு-விளிம்பு
- உட்பொதிக்கப்பட்ட உதவி உதவி
- செயல்பாட்டைத் தேடுங்கள்
- எட்செட் ஆட்டோபிளே
- ச்டைலான விட்செட்டுகள் அவற்றின் அளவிற்கு தானாகவே மாற்றியமைக்கின்றன
- முற்றிலும் தனிப்பட்ட மற்றும் இணைப்பில்லாத
- வட்டமான ஆல்பம் கவர்கள் இல்லை (இயல்பாக)
- SD கார்டு-அறிந்த கோப்புறை மேலாண்மை
- நம்பகமான பிளேலிஸ்ட் செயல்பாடு
- பிளேபேக் நிலை நிரந்தரமாக்கல்
- ஆண்ட்ராய்டு ஆட்டோ(Android Auto) உதவி
- தானியங்கி இடைவெளி பின்னணி.
- முழுமையான சமநிலை(ReplayGain )ஆதரவு (MP3, FLAC, OGG, OPUS மற்றும் MP4 கோப்புகளுக்காக)
- வெளியே உள்ள சமனீகரிப்பு சாதன ஆதரவு (எ.கா. Wavelet)
- முழுமையான திரை ஆதரவு (Edge-to-edge)
- உட்பொதிக்கப்பட்ட அட்டைப்பட ஆதரவு
- தேடல் செயல்பாடு
- ஹெட்செட்டை இணைக்கும்போது தானாக பிளேபேக் தொடங்கும்
- தானாகவே அதன் அளவிற்கு ஏற்றவாறு மாறும் அழகிய விசெட்ஜெட்டுகள்
- முழுமையாக தனிப்பட்ட மற்றும் ஆன்லைனின்றி செயல்படக்கூடியது
- வட்டமான ஆல்பம் அட்டைகள் இல்லை (நீங்கள் வேண்டினால் மட்டும்)
@@ -21,4 +21,4 @@ kesin/orijinal tarihler, sıralama etiketleri ve daha fazlası
- Kulaklık otomatik oynatma
- Boyutlarına otomatik olarak uyum sağlayan şık widget'lar
- Tamamen özel ve çevrimdışı
- Yuvarlak albüm kapakları yok (İstemediğiniz sürece. O zaman yapabilirsiniz.)
- Yuvarlak albüm kapakları yok (isterseniz.)
@@ -1 +1 @@
Basit, makul bir müzik çalar
Basit, akıllı bir müzik çalar
+105 -115
View File
@@ -1,135 +1,125 @@
# Musikr Architecture
# Musikr Architecture Overview
## Overview
Musikr is a highly opinionated, multi-threaded music loading library for Android that bypasses Android's MediaStore and uses the Storage Access Framework (SAF) with TagLib for enhanced music indexing capabilities.
Musikr is a highly opinionated multithreaded music loader that provides advanced music functionality for Auxio. It bypasses Android's MediaStore to directly access music files using the Storage Access Framework (SAF) and [TagLib](https://taglib.org/) for metadata extraction.
## Core Design Principles
## Core Components
1. **Stateless API**: Side-effects are contained within the Storage layer
2. **No Defaults**: All parameters must be explicitly configured
3. **Pipeline Architecture**: Three-step processing pipeline for music loading
4. **Native Integration**: JNI bridge to TagLib for metadata extraction
5. **Coroutine-Based**: Uses Kotlin coroutines for async operations
### Pipeline Architecture
## High-Level Architecture
Musikr uses a three-stage pipeline for music indexing:
1. **Explore Step** - Discovers music files on the device
2. **Extract Step** - Extracts metadata from discovered files
3. **Evaluate Step** - Processes extracted data to build the music library
```mermaid
graph LR
A[Music Locations] --> B[Explore Step]
B --> C[Extract Step]
C --> D[Evaluate Step]
D --> E[Library]
subgraph Pipeline
B
C
D
end
```
┌─────────────────────────────────────────────────────────────┐
│ Application Layer │
│ (Auxio or other apps) │
└───────────────────────────┬─────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Musikr API │
│ (Musikr.kt interface) │
└───────────────────────────┬─────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Pipeline Architecture │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ ExploreStep │ → │ ExtractStep │ → │ EvaluateStep │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
┌───────────┴───────────┐
│ │
▼ ▼
┌──────────────────────┐ ┌──────────────────────────────┐
│ Storage Layer │ │ Native Layer (JNI) │
│ - Cache │ │ - TagLib integration │
│ - Covers │ │ - Metadata extraction │
│ - Playlists │ │ - Format support │
└──────────────────────┘ └──────────────────────────────┘
```
### Key Interfaces
## Pipeline Steps
- **Musikr** - Main entry point for the library
- **Storage** - Manages persistent storage needs
- **Library** - Represents the loaded music collection
- **MutableLibrary** - Modifiable version of the library
### 1. ExploreStep
- **Purpose**: Discover music files on the device
- **Process**:
- Uses FS module to explore file system via SAF
- Filters for audio MIME types and playlists
- Checks cache for previously indexed files
- Manages cover art retrieval
- **Output**: Stream of `Explored` items (songs/playlists to process)
## Module Structure
### 2. ExtractStep
- **Purpose**: Extract metadata from discovered files
- **Process**:
- Uses JNI bridge to TagLib for metadata extraction
- Handles multiple tag formats (ID3v1/v2, MP4, Xiph, etc.)
- Extracts audio properties (bitrate, duration, etc.)
- Manages cover art extraction
- **Output**: Stream of `Extracted` items with full metadata
### 1. File System (`fs` package)
- **Location.Opened** - Represents a location to search for music
- **DeviceFS** - Provides access to device storage
- **FileTreeCache** - Caches filesystem structure for faster indexing
### 3. EvaluateStep
- **Purpose**: Build the music graph from extracted metadata
- **Process**:
- Creates relationships between songs, albums, artists, genres
- Resolves naming conflicts and duplicates
- Applies user interpretation preferences
- Builds final library structure
- **Output**: Complete `MutableLibrary` with all relationships
### 2. Pipeline (`pipeline` package)
- **ExploreStep** - Discovers music files on the device
- **ExtractStep** - Extracts metadata from discovered files
- **EvaluateStep** - Processes extracted data to build the library
- **PipelineItem** - Data items flowing through the pipeline
## Key Components
### 3. Metadata (`metadata` package)
- **Metadata** - Extracted file metadata
- **MetadataExtractor** - Extracts metadata using TagLib
- **TagLibJNI** - JNI bridge to native TagLib library
### Config & Storage
- **Config**: Main configuration container
- `fs`: File system access configuration
- `storage`: Persistent storage components
- `interpretation`: Tag interpretation rules
### 4. Tag Processing (`tag` package)
- **TagParser** - Parses raw tag data into structured format
- **TagInterpreter** - Interprets tags based on user preferences
- **ParsedTags** - Represents parsed metadata tags
- **Storage**: Side-effect laden components
- `cache`: Metadata caching (Room database)
- `covers`: Cover art storage and retrieval
- `storedPlaylists`: User playlist management
### 5. Model (`model` package)
- **LibraryImpl** - Implementation of the music library
- **SongImpl**, **AlbumImpl**, **ArtistImpl**, **GenreImpl** - Music entity implementations
- **LibraryFactory** - Creates library instances from pipeline data
### Data Models
- **Music**: Base interface for all music items
- Uses UID system for unique identification
- Supports MusicBrainz IDs
- **Song**: Individual track with full metadata
- **Album**: Collection of songs (includes EPs, singles, etc.)
- **Artist**: Can have explicit (album artist) and implicit (track artist) albums
- **Genre**: Grouping by musical genre
- **Playlist**: User-created or imported playlists
### 6. Covers (`covers` package)
- **Covers** - Interface for album cover management
- **EmbeddedCovers** - Extracts covers embedded in music files
- **FSCovers** - Discovers cover art in the filesystem
- **StoredCovers** - Manages persistent storage of covers
### File System (FS)
- Abstraction over Android's Storage Access Framework
- Supports multiple storage locations
- Handles permissions and URI management
### 7. Cache (`cache` package)
- **Cache** - Caches processed music data
- **DBCache** - Database implementation of caching
### 8. Playlist (`playlist` package)
- **PlaylistFile** - Represents a playlist file
- **ExternalPlaylistManager** - Manages external playlist files
- **PlaylistInterpreter** - Interprets playlist formats
## Native Component
Musikr includes a native component built with TagLib for fast and accurate metadata extraction:
```mermaid
graph TD
A[TagLibJNI] --> B[JNI Bridge]
B --> C[TagLib Library]
C --> D[Music File Metadata]
```
### Native Files (`cpp` directory)
- **taglib_jni.cpp** - Main JNI implementation
- **JMetadataBuilder** - Builds metadata objects from TagLib
- **JTagMap** - Maps between Java and C++ tag structures
- **JInputStream** - Input stream adapter for TagLib
## Data Flow
```mermaid
sequenceDiagram
participant User
participant Musikr
participant ExploreStep
participant ExtractStep
participant EvaluateStep
participant Storage
User->>Musikr: run(locations)
Musikr->>ExploreStep: explore(locations)
ExploreStep->>Storage: Read cache
ExploreStep-->>Musikr: Explored files
Musikr->>ExtractStep: extract(explored)
ExtractStep->>TagLibJNI: Extract metadata
ExtractStep-->>Musikr: Extracted metadata
Musikr->>EvaluateStep: evaluate(extracted)
EvaluateStep->>Storage: Store processed data
EvaluateStep-->>Musikr: Library
Musikr-->>User: LibraryResult
```
### Native Layer (C++)
- TagLib integration for metadata extraction
- JNI wrappers for Java/Kotlin interop
- Support for various audio formats
- Custom patches for enhanced functionality
## Threading Model
- **Coroutine-based**: All operations use Kotlin coroutines
- **Multi-threaded extraction**: Parallel metadata extraction
- **Buffered channels**: For efficient pipeline communication
- **Dispatcher control**: Explicit IO dispatcher usage
Musikr uses Kotlin Coroutines for concurrent processing:
## Error Handling
- **Pipeline exceptions**: Custom exception types
- **Graceful degradation**: Continue on individual file errors
- **Logging**: Comprehensive error logging
- **Cache invalidation**: Automatic stale cache detection
- Pipeline stages use `flatMapMerge` and `distributedMap` for parallel processing
- Bounded buffer channels manage backpressure
- IO operations are dispatched to `Dispatchers.IO`
## Best Practices for Extension
1. The API is minimized and unstable - be prepared to fork and modify
2. No defaults are provided - carefully consider parameter choices
3. Musikr is stateless except for Storage - manage long-term state yourself
4. When adding functionality, follow the pipeline architecture pattern
## Performance Optimizations
- **Caching**: Aggressive metadata caching
- **Parallel processing**: Multi-threaded file processing
- **Lazy evaluation**: On-demand cover loading
- **Memory efficiency**: Streaming pipeline architecture
+306
View File
@@ -0,0 +1,306 @@
# Musikr Data Flow Diagram
This document illustrates how data flows through the Musikr music loading pipeline from file discovery to final library creation.
## Overview Flow
```
┌─────────────────┐
│ User Request │
│ Musikr.run() │
└────────┬────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ EXPLORE PHASE │
│ │
│ File System ──► SAF APIs ──► Audio Files │
│ │ │ │
│ └──► Cached Files ◄─────────┘ │
│ │ │
│ ▼ │
│ Cover Cache ──► Explored Items │
└─────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ EXTRACT PHASE │
│ │
│ Explored Items ──► JNI Bridge ──► TagLib │
│ │ │ │
│ ▼ ▼ │
│ Native Code Tag Parsing │
│ │ │ │
│ └────────────┘ │
│ │ │
│ ▼ │
│ Metadata Maps │
│ │ │
│ ▼ │
│ Extracted Items │
└─────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ EVALUATE PHASE │
│ │
│ Extracted Items ──► Graph Builder ──► Relationships │
│ │ │ │
│ ▼ ▼ │
│ Name Resolution UID Generation │
│ │ │ │
│ └────────────────┘ │
│ │ │
│ ▼ │
│ MutableLibrary │
└─────────────────────────────────────────────────────────┘
```
## Detailed Phase Flows
### 1. Explore Phase Data Flow
```
START: FS.explore()
│
▼
┌─────────────────┐
│ Storage Access │
│ Framework │
└────────┬────────┘
│ DocumentFile
▼
┌─────────────────┐ ┌─────────────────┐
│ Audio Filter │ │ Playlist Filter │
│ (audio/* MIME) │ │ (M3U MIME) │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────────────────────────────┐
│ Cache Lookup │
│ ┌─────────────┐ ┌──────────────┐ │
│ │ Cache Hit │ │ Cache Miss │ │
│ │ (Metadata) │ │ (New File) │ │
│ └──────┬──────┘ └──────┬───────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────┐ ┌──────────────┐ │
│ │Cover Lookup │ │ Mark for │ │
│ │ if Hit │ │ Extraction │ │
│ └──────┬──────┘ └──────┬───────┘ │
└─────────┴─────────────────┴─────────────┘
│
▼
Explored Stream
(Flow<Explored>)
```
### 2. Extract Phase Data Flow
```
START: Explored Items
│
▼
┌─────────────────┐
│ Group by Type │
│ - NewSong │
│ - RawSong │
│ - RawPlaylist │
└────────┬────────┘
│
┌────┴────┐
│ NewSong │
└────┬────┘
│
▼
┌─────────────────────────────────────┐
│ JNI Metadata Call │
│ │
│ Kotlin ──► JNI ──► C++ ──► TagLib │
│ │ │ │
│ └─────── Results ◄────────┘ │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Metadata Processing │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ Properties │ │ Tags │ │
│ │ - Duration │ │ - Title │ │
│ │ - Bitrate │ │ - Artist │ │
│ │ - Format │ │ - Album │ │
│ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Cache Update │
│ - Write metadata to cache │
│ - Store cover reference │
└─────────────────────────────────────┘
│
▼
Extracted Stream
(Flow<Extracted>)
```
### 3. Evaluate Phase Data Flow
```
START: Extracted Items
│
▼
┌─────────────────────────────────────┐
│ Collect All Items │
│ - Songs │
│ - Playlists │
└────────┬────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ UID Generation/Resolution │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ MusicBrainz │ │ Hash-based │ │
│ │ UIDs │ │ UIDs │ │
│ └──────────────┘ └──────────────┘ │
└────────┬────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Name Interpretation │
│ - Apply naming rules │
│ - Parse separators │
│ - Resolve conflicts │
└────────┬────────────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ Graph Building │
│ │
│ Songs ──► Albums ──► Artists │
│ │ │ │ │
│ └──────► Genres ◄────┘ │
│ │
│ Relationships: │
│ - Song.album → Album │
│ - Song.artists → List<Artist> │
│ - Album.artists → List<Artist> │
│ - Artist.albums → List<Album> │
└──────────────┬──────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Playlist Resolution │
│ - Match paths to songs │
│ - Create playlist objects │
└────────┬────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Final Library │
│ MutableLibrary { │
│ songs: List<Song> │
│ albums: List<Album> │
│ artists: List<Artist> │
│ genres: List<Genre> │
│ playlists: List<Playlist> │
│ } │
└─────────────────────────────────────┘
```
## Key Data Transformations
### File → Explored
```
DocumentFile { Explored {
uri: Uri ──► file: DocumentFile
mimeType: String // + cache status
} }
```
### Explored → Extracted
```
NewSong { ExtractedSong {
file: DocumentFile ──► file: DocumentFile
addedMs: Long properties: Properties
} tags: Map<String, List<String>>
cover: Cover?
addedMs: Long
}
```
### Extracted → Library Items
```
ExtractedSong { Song {
tags: Map ──► uid: UID
properties: Props name: Name
} album: Album
artists: List<Artist>
// ... full metadata
}
```
## Caching Data Flow
```
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ File URI │ ──► │ Cache Key │ ──► │ Cached │
│ │ │ Generation │ │ Metadata │
└─────────────┘ └─────────────┘ └─────────────┘
│
┌────────────────────┴────────────┐
│ │
┌─────▼─────┐ ┌─────▼─────┐
│ Valid │ │ Stale │
│ Use Cached │ │ Re-extract│
└───────────┘ └───────────┘
```
## Cover Art Data Flow
```
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Embedded │ │ Cover ID │ │ Cover │
│ Cover Data │ ──► │ Generation │ ──► │ Cache │
└─────────────┘ └─────────────┘ └─────────────┘
│
▼
┌─────────────┐
│ Cover Ref │
│ in Library │
└─────────────┘
```
## Error Handling Flow
```
┌─────────────┐
│ Error │
│ Occurs │
└──────┬──────┘
│
▼
┌─────────────────────────────────┐
│ Error Classification │
│ ┌──────────┐ ┌─────────────┐ │
│ │ Critical │ │ Recoverable │ │
│ └────┬─────┘ └──────┬──────┘ │
└───────┴────────────────┴────────┘
│ │
▼ ▼
┌──────────────┐ ┌───────────────┐
│ Stop Pipeline│ │ Log & Continue│
│ Throw Error │ │ Skip Item │
└──────────────┘ └───────────────┘
```
## Progress Reporting Flow
```
Pipeline Stage ──► Progress Event ──► Callback
│
▼
IndexingProgress
├── Songs(loaded, explored)
└── Indeterminate
```
+249
View File
@@ -0,0 +1,249 @@
# Musikr Module Breakdown
This document provides a detailed breakdown of all modules and packages within the Musikr library.
## Package Structure
```
org.oxycblt.musikr/
├── cache/ # Metadata caching system
├── covers/ # Cover art management
├── fs/ # File system abstraction
├── graph/ # Music relationship graph
├── metadata/ # JNI metadata extraction
├── model/ # Concrete implementations
├── pipeline/ # Processing pipeline
├── playlist/ # Playlist management
├── tag/ # Tag interpretation
├── track/ # Change tracking
└── util/ # Utility functions
```
## Core Modules
### Main Entry Points
#### `Musikr.kt`
- Main interface for the library
- Factory methods for creating instances
- Defines `LibraryResult` and `IndexingProgress`
#### `Config.kt`
- Configuration data classes
- `Config`: Main configuration container
- `Storage`: Side-effect components
- `Interpretation`: Tag parsing rules
#### `Music.kt`
- Core music data interfaces
- `Music`: Base interface with UID system
- `Song`, `Album`, `Artist`, `Genre`, `Playlist` interfaces
- UID implementation with MusicBrainz support
#### `Library.kt`
- Library container interfaces
- `Library`: Read-only music library
- `MutableLibrary`: Mutable library for updates
## Pipeline Modules (`pipeline/`)
### `PipelineItem.kt`
- Data classes for pipeline communication
- `Explored`: Items found during exploration
- `Extracted`: Items with extracted metadata
- `NewSong`, `RawSong`, `RawPlaylist` types
### `ExploreStep.kt`
- First pipeline stage
- Discovers music files using FS module
- Integrates with cache for optimization
- Handles cover pre-loading
### `ExtractStep.kt`
- Second pipeline stage
- Calls native metadata extraction
- Manages metadata caching
- Handles extraction failures
### `EvaluateStep.kt`
- Final pipeline stage
- Builds music graph from extracted data
- Resolves relationships between items
- Creates final library structure
### `FlowUtil.kt`
- Coroutine flow utilities
- `distributedMap`: Parallel processing helper
## File System Module (`fs/`)
### `FS.kt`
- File system abstraction interface
- SAF integration for Android
- Multi-location support
### `Path.kt`
- Path representation and manipulation
- Volume and document separation
- Display-friendly path formatting
### `Location.kt`
- Storage location management
- Permission handling
- URI to path conversion
### `Format.kt`
- Audio format enumeration
- MIME type mapping
- Format detection utilities
## Metadata Module (`metadata/`)
### `TagLibJNI.kt`
- JNI interface to native code
- Native method declarations
### `MetadataExtractor.kt`
- High-level metadata extraction
- Format-specific extraction routing
- Error handling and fallbacks
### `Metadata.kt`
- Metadata container classes
- Properties and tag maps
- Type-safe metadata access
### Native Integration
- `NativeInputStream.kt`: Java InputStream to C++ bridge
- `NativeTagMap.kt`: Tag data transfer object
## Cache Module (`cache/`)
### `Cache.kt`
- Cache interfaces and data types
- `CacheResult`: Hit/Miss/Stale states
- Read/write operations
### Implementation (not shown in detail)
- Room database integration
- Metadata persistence
- Cache invalidation logic
## Cover Module (`covers/`)
### `Covers.kt`
- Cover art management interfaces
- `CoverResult`: Cover loading states
- Cleanup operations
### `Cover.kt`
- Cover identifier types
- Format information
- Collection utilities
## Tag Module (`tag/`)
### Tag Types
- `Date.kt`: Date parsing and representation
- `Disc.kt`: Disc number handling
- `Name.kt`: Name types (Known/Unknown)
- `ReleaseType.kt`: Album type classification
- `ReplayGainAdjustment.kt`: ReplayGain data
### Interpretation (`tag/interpret/`)
- `Naming.kt`: Name construction rules
- `Separators.kt`: Multi-value tag parsing
## Model Module (`model/`)
Concrete implementations of music interfaces:
- `SongImpl.kt`: Song data implementation
- `AlbumImpl.kt`: Album with song relationships
- `ArtistImpl.kt`: Artist with album relationships
- `GenreImpl.kt`: Genre grouping implementation
- `PlaylistImpl.kt`: Playlist container
- `LibraryImpl.kt`: Complete library implementation
- `LibraryFactory.kt`: Factory for creating library instances
## Graph Module (`graph/`)
### `MusicGraph.kt`
- Relationship graph builder
- Artist-album-song connections
- Genre associations
- Duplicate resolution
## Playlist Module (`playlist/`)
### `ExternalPlaylistManager.kt`
- External playlist loading
- Format detection and parsing
### `PlaylistFile.kt`
- Playlist file abstraction
- Common playlist operations
### `m3u/M3U.kt`
- M3U/M3U8 playlist support
- Path resolution
- Encoding handling
### `db/StoredPlaylists.kt`
- Database playlist interface
- CRUD operations
- Persistence management
## Track Module (`track/`)
### `UpdateTracker.kt`
- File system change detection
- Modification tracking
- Update notification
### `LocationObserver.kt`
- Storage location monitoring
- Permission change handling
## Utility Module (`util/`)
### `LangUtil.kt`
- Language/locale utilities
- String manipulation helpers
### `ParseUtil.kt`
- Parsing utilities
- Number parsing with validation
- UUID parsing
## Native Layer (C++)
### JNI Wrappers
- `JByteArrayRef`: Byte array management
- `JClassRef`: Class reference caching
- `JInputStream`: Stream adapter
- `JMetadataBuilder`: Metadata assembly
- `JObjectRef`: Object lifecycle management
- `JStringRef`: String conversion
- `JTagMap`: Tag data transfer
### Main JNI Entry
- `taglib_jni.cpp`: Native method implementations
- Format-specific parsing functions
- Error handling and logging
### Build System
- `CMakeLists.txt`: Native build configuration
- `build_taglib.sh`: TagLib compilation script
- `android.toolchain.cmake`: Android-specific toolchain
## Testing
### Unit Tests (`test/`)
- Tag parsing tests
- Date/Disc/ReleaseType validation
- Utility function tests
### Integration
- Full pipeline testing
- Cache behavior verification
- Cover loading tests
+149
View File
@@ -0,0 +1,149 @@
# Musikr Quick Reference Guide
## What is Musikr?
A custom Android music indexing library that bypasses MediaStore, using SAF + TagLib for enhanced metadata extraction and music organization.
## Key Features
- **No MediaStore**: Direct file access via Storage Access Framework
- **Advanced Metadata**: Full TagLib integration for rich tag support
- **Multi-threaded**: Parallel processing with Kotlin coroutines
- **Smart Caching**: Efficient metadata and cover art caching
- **MusicBrainz Support**: Proper handling of MB IDs
- **Flexible Architecture**: Pipeline-based processing
## Quick Start
```kotlin
// 1. Configure storage components
val storage = Storage(
cache = myCache,
covers = myCoverManager,
storedPlaylists = myPlaylistDb
)
// 2. Set interpretation rules
val interpretation = Interpretation(
naming = Naming.SYSTEM, // or DISPLAY
separators = Separators.default()
)
// 3. Create config
val config = Config(
fs = myFileSystem,
storage = storage,
interpretation = interpretation
)
// 4. Run musikr
val musikr = Musikr.new(context, config)
val result = musikr.run { progress ->
// Handle progress updates
}
// 5. Use the library
val library = result.library
println("Found ${library.songs.size} songs")
// 6. Clean up
result.cleanup()
```
## Core Concepts
### Pipeline Architecture
1. **Explore**: Find music files
2. **Extract**: Get metadata via TagLib
3. **Evaluate**: Build music graph
### Data Model
- **Song**: Individual tracks with full metadata
- **Album**: Collections of songs (includes EPs, singles)
- **Artist**: Can have both album and track credits
- **Genre**: Musical style groupings
- **Playlist**: User-created or imported (M3U)
### UID System
- Unique identifiers for all music items
- Supports MusicBrainz IDs
- Hash-based fallback for untagged files
## File Structure
```
musikr/
├── src/main/
│ ├── java/ # Kotlin sources
│ └── cpp/ # Native TagLib integration
├── ARCHITECTURE.md # System design overview
├── MODULES.md # Detailed module docs
└── DATA_FLOW.md # Data flow diagrams
```
## Common Tasks
### Custom Cache Implementation
```kotlin
class MyCache : MutableCache {
override suspend fun read(file: DocumentFile): CacheResult {
// Your implementation
}
override suspend fun write(extracted: List<ExtractedSong>) {
// Your implementation
}
}
```
### Custom Cover Storage
```kotlin
class MyCovers : MutableCovers<MyCover> {
override suspend fun obtain(id: String): CoverResult<MyCover> {
// Your implementation
}
override suspend fun write(cover: Cover): String {
// Your implementation
}
}
```
### Progress Monitoring
```kotlin
musikr.run { progress ->
when (progress) {
is IndexingProgress.Songs -> {
println("Loaded ${progress.loaded}/${progress.explored}")
}
is IndexingProgress.Indeterminate -> {
println("Building library...")
}
}
}
```
## Important Notes
1. **No Windows Support**: Requires Unix-based build system
2. **GPL v3 License**: Viral license - entire project must be GPL
3. **Unstable API**: Interface may change between versions
4. **Thread Safety**: All operations are coroutine-safe
5. **Memory Usage**: Streaming architecture for large libraries
## Debugging Tips
- Enable TagLib debug output for metadata issues
- Check cache validity for performance problems
- Monitor coroutine dispatchers for threading issues
- Use flow operators for custom processing
## Performance Tuning
- Adjust `distributedMap` parallelism (default: 8)
- Configure channel buffer sizes
- Optimize cache implementation
- Pre-warm cover cache for common albums
## See Also
- [ARCHITECTURE.md](ARCHITECTURE.md) - System design
- [MODULES.md](MODULES.md) - Module details
- [DATA_FLOW.md](DATA_FLOW.md) - Data flow diagrams
- [README.md](README.md) - Basic information
-3
View File
@@ -4,7 +4,6 @@ plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id "com.google.devtools.ksp"
id "org.jetbrains.kotlin.plugin.serialization"
id "com.diffplug.spotless"
id "kotlin-parcelize"
id "org.jetbrains.dokka"
@@ -63,8 +62,6 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0'
// AndroidX
implementation "androidx.core:core-ktx:$core_version"
-90
View File
@@ -1,90 +0,0 @@
# Native Code (C++) Component
## Overview
This directory contains the native C++ code that bridges between Java and TagLib. It enables fast and accurate metadata extraction from music files.
## Key Components
### JNI Implementation
**taglib_jni.cpp**
- Main JNI implementation
- Registers native methods
- Handles JNI environment setup
**JMetadataBuilder**
- Builds metadata objects from TagLib
- Extracts tags and properties
- Maps between TagLib and Java structures
**JTagMap**
- Maps between Java and C++ tag structures
- Provides bidirectional conversion
**JInputStream**
- Input stream adapter for TagLib
- Bridges between Java I/O and TagLib I/O
### Utility Classes
**JStringRef**
- Manages JNI string references
- Handles UTF conversions
**JByteArrayRef**
- Manages JNI byte array references
- Provides safe access to Java byte arrays
**JObjectRef**
- Manages JNI object references
- Provides RAII-style resource management
**JClassRef**
- Manages JNI class references
- Caches class and method lookups
**util.h**
- Utility functions for JNI
- Error handling and logging
### Build Configuration
**CMakeLists.txt**
- CMake build configuration
- Configures TagLib integration
**build_taglib.sh**
- Script to build TagLib from source
- Configures platform-specific options
**android.toolchain.cmake**
- Android-specific CMake toolchain
## TagLib Integration
TagLib is included as a subproject and built from source. The `taglib` directory contains the TagLib source code, which is a powerful and feature-rich library for reading and writing audio metadata.
## Build Process
1. The build starts with `build_taglib.sh`
2. TagLib is configured and built with CMake
3. The JNI wrapper is built against TagLib
4. The resulting library is packaged into the AAR
## JNI Interface
The native methods are exposed through `TagLibJNI.kt` in the Java code. The main functionalities include:
- Reading metadata from audio files
- Extracting embedded cover art
- Accessing audio properties (bitrate, sample rate, etc.)
## Extension Points
When extending the native code:
1. For new tag formats, update the TagLib integration
2. For new metadata fields, add them to JMetadataBuilder
3. For performance improvements, optimize the JNI bridge
4. For platform-specific optimizations, update the build configuration
@@ -21,16 +21,14 @@ package org.oxycblt.musikr
import org.oxycblt.musikr.cache.MutableCache
import org.oxycblt.musikr.covers.Cover
import org.oxycblt.musikr.covers.MutableCovers
import org.oxycblt.musikr.fs.Location
import org.oxycblt.musikr.fs.Location.Opened
import org.oxycblt.musikr.fs.device.FileTreeCache
import org.oxycblt.musikr.fs.FS
import org.oxycblt.musikr.playlist.db.StoredPlaylists
import org.oxycblt.musikr.tag.interpret.Naming
import org.oxycblt.musikr.tag.interpret.Separators
data class Query(val source: List<Location.Opened>, val exclude: List<Location>)
data class Config(val fs: FS, val storage: Storage, val interpretation: Interpretation)
/** Side-effect laden [Storage] for use during music loading and [MutableLibrary] operation. */
/** Side-effect laden [Config] for use during music loading and [MutableLibrary] operation. */
data class Storage(
/**
* A repository of cached metadata to read and write from over the course of music loading. This
@@ -51,19 +49,12 @@ data class Storage(
* the library.
*/
val storedPlaylists: StoredPlaylists,
/** A cache for file tree information to optimize file system exploration. */
val fileTreeCache: FileTreeCache
)
/** Configuration for how to interpret and extrapolate certain audio tags. */
data class Interpretation(
/** How to construct names from audio tags. */
val naming: Naming,
/** What separators delimit multi-value audio tags. */
val separators: Separators,
/** Whether to include hidden files and directories (those starting with a dot). */
val withHidden: Boolean
)
@@ -99,7 +99,7 @@ interface Library {
/**
* A mutable extension of [Library].
*
* Operations here will cause side-effects within the [Storage] used when this library was loaded.
* Operations here will cause side-effects within the [Config] used when this library was loaded.
* However, it won't actually mutate the [Library] itself, rather return a cloned instance with the
* changes applied. It is up to the client to update their reference to the library within their
* state handling.
@@ -108,7 +108,7 @@ interface MutableLibrary : Library {
/**
* Create a new [Playlist] with the given name and songs.
*
* This will commit the new playlist to the stored playlists in the [Storage] used to load the
* This will commit the new playlist to the stored playlists in the [Config] used to load the
* library.
*
* @param name the name of the playlist
@@ -19,7 +19,6 @@
package org.oxycblt.musikr
import android.content.Context
import android.util.Log
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.flow.buffer
@@ -45,36 +44,32 @@ import org.oxycblt.musikr.pipeline.ExtractStep
*/
interface Musikr {
/**
* Start loading music from the given [locations] and the configuration provided earlier.
* Start loading music using the given config and the configuration provided earlier.
*
* @param query The [Query] to load music from.
* @param onProgress Optional callback to receive progress on the current status of the music
* pipeline. Warning: These events will be rapid-fire.
* @return A handle to the newly created library alongside further cleanup.
*/
suspend fun run(
query: Query,
onProgress: suspend (IndexingProgress) -> Unit = {}
): LibraryResult
suspend fun run(onProgress: suspend (IndexingProgress) -> Unit = {}): LibraryResult
companion object {
/**
* Create a new instance from the given configuration.
*
* @param context The context to use for loading resources.
* @param storage Side-effect laden storage for use within the music loader **and** when
* @param config Side-effect laden storage for use within the music loader **and** when
* mutating [MutableLibrary]. You should take responsibility for managing their long-term
* state.
* @param interpretation The configuration to use for interpreting certain vague tags. This
* should be configured by the user, if possible.
*/
fun new(context: Context, storage: Storage, interpretation: Interpretation): Musikr =
fun new(context: Context, config: Config): Musikr =
MusikrImpl(
context,
storage,
ExploreStep.from(context, storage, interpretation),
ExtractStep.from(context, storage),
EvaluateStep.new(storage, interpretation))
config,
ExploreStep.from(context, config),
ExtractStep.from(context, config),
EvaluateStep.new(config, config.interpretation))
}
}
@@ -112,41 +107,34 @@ sealed interface IndexingProgress {
private class MusikrImpl(
private val context: Context,
private val storage: Storage,
private val config: Config,
private val exploreStep: ExploreStep,
private val extractStep: ExtractStep,
private val evaluateStep: EvaluateStep
) : Musikr {
override suspend fun run(query: Query, onProgress: suspend (IndexingProgress) -> Unit) =
coroutineScope {
val start = System.currentTimeMillis()
var exploredCount = 0
var extractedCount = 0
val explored =
exploreStep
.explore(query)
.buffer(Channel.UNLIMITED)
.onStart { onProgress(IndexingProgress.Songs(0, 0)) }
.onEach { onProgress(IndexingProgress.Songs(extractedCount, ++exploredCount)) }
val extracted =
extractStep
.extract(explored)
.buffer(Channel.UNLIMITED)
.onEach { onProgress(IndexingProgress.Songs(++extractedCount, exploredCount)) }
.onCompletion { onProgress(IndexingProgress.Indeterminate) }
val library = evaluateStep.evaluate(extracted)
Log.d(
"Musikr",
"Loaded ${library.songs.size} songs in ${System.currentTimeMillis() - start}ms")
LibraryResultImpl(storage, library)
}
override suspend fun run(onProgress: suspend (IndexingProgress) -> Unit) = coroutineScope {
var exploredCount = 0
var extractedCount = 0
val explored =
exploreStep
.explore()
.buffer(Channel.UNLIMITED)
.onStart { onProgress(IndexingProgress.Songs(0, 0)) }
.onEach { onProgress(IndexingProgress.Songs(extractedCount, ++exploredCount)) }
val extracted =
extractStep
.extract(explored)
.buffer(Channel.UNLIMITED)
.onEach { onProgress(IndexingProgress.Songs(++extractedCount, exploredCount)) }
.onCompletion { onProgress(IndexingProgress.Indeterminate) }
val library = evaluateStep.evaluate(extracted)
LibraryResultImpl(config, library)
}
}
private class LibraryResultImpl(
private val storage: Storage,
override val library: MutableLibrary
) : LibraryResult {
private class LibraryResultImpl(private val config: Config, override val library: MutableLibrary) :
LibraryResult {
override suspend fun cleanup() {
storage.covers.cleanup(library.songs.mapNotNull { it.cover })
config.storage.covers.cleanup(library.songs.mapNotNull { it.cover })
}
}
+9 -9
View File
@@ -18,7 +18,7 @@
package org.oxycblt.musikr.cache
import org.oxycblt.musikr.fs.device.DeviceFile
import org.oxycblt.musikr.fs.File
import org.oxycblt.musikr.metadata.Properties
import org.oxycblt.musikr.tag.parse.ParsedTags
@@ -37,10 +37,10 @@ interface Cache {
* Read a [CachedSong] corresponding to the given [file] from the cache. This can result in
* several outcomes represented by [CacheResult].
*
* @param file the [DeviceFile] to read from the cache
* @param file the [File] to read from the cache
* @return a [CacheResult] representing the result of the operation.
*/
suspend fun read(file: DeviceFile): CacheResult
suspend fun read(file: File): CacheResult
}
/**
@@ -56,7 +56,7 @@ interface MutableCache : Cache {
* Write a [CachedSong] to the cache.
*
* This should commit the metadata to the repository in such a way that it can be retrieved
* later by [read] using only the [DeviceFile].
* later by [read] using only the [File].
*
* @param cachedSong the [CachedSong] to write to the cache
*/
@@ -78,7 +78,7 @@ interface MutableCache : Cache {
/** A cached song entry containing the data needed by the rest of the loader. */
data class CachedSong(
/** The file this song corresponds to. */
val file: DeviceFile,
val file: File,
/** The properties of the song. */
val properties: Properties,
/** The parsed tags of the song. */
@@ -107,15 +107,15 @@ sealed interface CacheResult {
/**
* A cache entry was not found.
*
* @param file the [DeviceFile] that could not be found in the cache.
* @param file the [File] that could not be found in the cache.
*/
data class Miss(val file: DeviceFile) : CacheResult
data class Miss(val file: File) : CacheResult
/**
* A cache entry was found, but it's out of date compared to the [file] given.
*
* @param file the [DeviceFile] that was found in the cache.
* @param file the [File] that was found in the cache.
* @param addedMs the time the song was added to the cache.
*/
data class Stale(val file: DeviceFile, val addedMs: Long) : CacheResult
data class Stale(val file: File, val addedMs: Long) : CacheResult
}
@@ -53,9 +53,6 @@ internal abstract class CacheDatabase : RoomDatabase() {
@Dao
internal interface CacheReadDao {
@Query("SELECT * FROM CachedSongData WHERE uri = :uri")
suspend fun selectSong(uri: String): CachedSongData?
@Query("SELECT * FROM CachedSongData") suspend fun selectAllSongs(): List<CachedSongData>
}
+11 -15
View File
@@ -21,11 +21,12 @@ package org.oxycblt.musikr.cache.db
import android.content.Context
import android.net.Uri
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import org.oxycblt.musikr.cache.Cache
import org.oxycblt.musikr.cache.CacheResult
import org.oxycblt.musikr.cache.CachedSong
import org.oxycblt.musikr.cache.MutableCache
import org.oxycblt.musikr.fs.device.DeviceFile
import org.oxycblt.musikr.fs.File
import org.oxycblt.musikr.metadata.Properties
import org.oxycblt.musikr.tag.parse.ParsedTags
@@ -35,20 +36,15 @@ import org.oxycblt.musikr.tag.parse.ParsedTags
* Create an instance with [from].
*/
class DBCache private constructor(private val readDao: CacheReadDao) : Cache {
@Volatile private var mapping: MutableMap<Uri, CachedSongData>? = null
private var mappingLock = Mutex()
private var mapping: Map<Uri, CachedSongData>? = null
private val mappingLock = Mutex()
override suspend fun read(file: DeviceFile): CacheResult {
mappingLock.lock()
val mapping =
this.mapping
?: readDao
.selectAllSongs()
.associateBy { it.uri }
.toMutableMap()
.also { mapping = it }
mappingLock.unlock()
val dbSong = mapping[file.uri] ?: return CacheResult.Miss(file)
override suspend fun read(file: File): CacheResult {
val currentMapping =
mappingLock.withLock {
mapping ?: readDao.selectAllSongs().associateBy { it.uri }.also { mapping = it }
}
val dbSong = currentMapping[file.uri] ?: return CacheResult.Miss(file)
if (dbSong.modifiedMs != file.modifiedMs) {
return CacheResult.Stale(file, dbSong.addedMs)
}
@@ -108,7 +104,7 @@ class DBCache private constructor(private val readDao: CacheReadDao) : Cache {
class MutableDBCache
private constructor(private val inner: DBCache, private val writeDao: CacheWriteDao) :
MutableCache {
override suspend fun read(file: DeviceFile) = inner.read(file)
override suspend fun read(file: File) = inner.read(file)
override suspend fun write(cachedSong: CachedSong) {
val dbSong =
@@ -20,7 +20,7 @@ package org.oxycblt.musikr.covers
import android.os.ParcelFileDescriptor
import java.io.InputStream
import org.oxycblt.musikr.fs.device.DeviceFile
import org.oxycblt.musikr.fs.File
import org.oxycblt.musikr.metadata.Metadata
/**
@@ -54,11 +54,11 @@ interface MutableCovers<T : Cover> : Covers<T> {
* This could result in side-effect-laden storage, or be a simple translation into a lazily
* loaded [Cover] instance.
*
* @param file The [DeviceFile] to of the file to create a cover for.
* @param file The [File] to of the file to create a cover for.
* @param metadata The [Metadata] to use to create the cover.
* @return a [CoverResult] indicating whether the cover was created or not
*/
suspend fun create(file: DeviceFile, metadata: Metadata): CoverResult<T>
suspend fun create(file: File, metadata: Metadata): CoverResult<T>
/**
* Cleanup the cover repository by removing any covers that are not in the [excluding]
@@ -1,74 +0,0 @@
# Covers Package
## Overview
The covers package provides functionality for discovering, extracting, and managing album cover art. It handles embedded covers in music files, external cover images, and persistent storage.
## Key Components
### Core Interfaces
**Covers** (`Covers.kt`)
- Generic interface for cover art management
- Provides methods to obtain and manage covers
**Cover** (`Covers.kt`)
- Represents a cover image
- Contains cover metadata and access methods
### Cover Sources
**EmbeddedCovers** (`embedded/EmbeddedCovers.kt`)
- Extracts covers embedded in music files
- Uses metadata extraction to access embedded images
**FSCovers** (`fs/FSCovers.kt`)
- Discovers cover art in the filesystem
- Searches for common cover image filenames
**ChainedCovers** (`chained/ChainedCovers.kt`)
- Combines multiple cover sources
- Provides fallback mechanisms
### Storage
**StoredCovers** (`stored/StoredCovers.kt`)
- Manages persistent storage of covers
- Handles caching and retrieval
**CoverStorage** (`stored/CoverStorage.kt`)
- Low-level cover storage operations
- Manages the cover storage directory
**Transcoding** (`stored/Transcoding.kt`)
- Handles image format conversion
- Optimizes covers for storage and display
### Identification
**CoverIdentifier** (`embedded/CoverIdentifier.kt`)
- Generates unique identifiers for covers
- Used for caching and referencing
## Cover Flow
1. During music indexing, covers are extracted or discovered
2. Covers are identified and stored
3. Songs reference covers by identifier
4. When needed, covers are retrieved from storage
## Key Features
- **Multiple sources** - Embedded, filesystem, and custom sources
- **Efficient storage** - Avoids duplicates through identification
- **Format optimization** - Transcodes images for optimal storage
- **Lazy loading** - Loads covers only when needed
## Extension Points
When extending the cover functionality:
1. For new cover sources, implement the Covers interface
2. For custom storage, extend or replace StoredCovers
3. For format-specific handling, update the Transcoding class
4. For performance improvements, optimize the identification and storage mechanisms

Some files were not shown because too many files have changed in this diff Show More