Merge pull request #1112 from OxygenCobalt/dev

v4.0.5
This commit is contained in:
Alexander Capehart
2025-06-01 06:43:42 -06:00
committed by GitHub
85 changed files with 3312 additions and 571 deletions
Symlink
+1
View File
@@ -0,0 +1 @@
CLAUDE.md
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## 4.0.5
#### What's Improved
- Re-added folder exclusion
#### What's Fixed
- Fixed slow loading on large libraries
## 4.0.3
#### What's Improved
+123
View File
@@ -0,0 +1,123 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## 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.
## Build System & 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
### Common Build Commands
```bash
# Build debug version
./gradlew assembleDebug
# Build release version
./gradlew assembleRelease
# Run tests
./gradlew test
# Run connected tests
./gradlew connectedAndroidTest
# Code formatting (Spotless)
./gradlew spotlessApply
# Check code formatting
./gradlew spotlessCheck
```
### Development Modules
- `app/` - Main Android application
- `musikr/` - Native music indexing library with TagLib integration
- `media/` - Patched Media3 ExoPlayer libraries (git submodule)
## 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
### Key Modules & 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
#### 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
#### 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
#### 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
### 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
## Code Conventions
### 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
### Code Style
- Uses Spotless with ktfmt Dropbox style formatting
- License header required (see NOTICE file)
- C++ code uses Eclipse CDT formatting (eclipse-cdt.xml)
## Testing
### Test Structure
- Unit tests: `src/test/` directories
- Integration tests: `src/androidTest/` directories
- musikr module includes Robolectric tests
### Test Dependencies
- JUnit 4 for unit testing
- MockK for mocking
- Robolectric for Android unit tests
- Espresso for UI tests
## Key Development Notes
- **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
+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.4">
<img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v4.0.4&color=64B5F6&style=flat">
<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>
<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.4"
versionCode 63
versionName "4.0.5"
versionCode 64
minSdk min_sdk
targetSdk target_sdk
@@ -29,6 +29,7 @@ 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.WriteOnlyFileTreeCache
import org.oxycblt.auxio.music.shim.WriteOnlyMutableCache
import org.oxycblt.musikr.IndexingProgress
import org.oxycblt.musikr.Interpretation
@@ -37,9 +38,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.playlist.db.StoredPlaylists
import org.oxycblt.musikr.tag.interpret.Naming
import org.oxycblt.musikr.tag.interpret.Separators
@@ -385,16 +388,20 @@ constructor(
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 storage = Storage(cache, covers, storedPlaylists)
val fileTreeCache =
if (withCache) FileTreeCache.from(context)
else WriteOnlyFileTreeCache(FileTreeCache.from(context))
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(locations, ::emitIndexingProgress)
val result = Musikr.new(context, storage, interpretation).run(query, ::emitIndexingProgress)
// Music loading completed, update the revision right now so we re-use this work
// later.
musicSettings.revision = newRevision
@@ -20,12 +20,13 @@ package org.oxycblt.auxio.music
import android.content.Context
import androidx.core.content.edit
import androidx.core.net.toUri
import dagger.hilt.android.qualifiers.ApplicationContext
import java.util.UUID
import javax.inject.Inject
import org.oxycblt.auxio.R
import org.oxycblt.auxio.settings.Settings
import org.oxycblt.musikr.fs.MusicLocation
import org.oxycblt.musikr.fs.Location
import timber.log.Timber as L
/**
@@ -37,7 +38,9 @@ interface MusicSettings : Settings<MusicSettings.Listener> {
/** The current library revision. */
var revision: UUID?
/** The locations of music to load. */
var musicLocations: List<MusicLocation>
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. */
@@ -74,20 +77,35 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont
}
}
override var musicLocations: List<MusicLocation>
override var musicLocations: List<Location.Opened>
get() {
val locations =
sharedPreferences.getString(getString(R.string.set_key_music_locations), null)
?: return emptyList()
return MusicLocation.existing(context, locations)
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_music_locations), MusicLocation.toString(value))
getString(R.string.set_key_excluded_locations), value.stringifyLocations())
commit()
// Sometimes changing this setting just won't actually trigger the listener.
// Only this one. No idea why.
listener?.onMusicLocationsChanged()
}
}
@@ -119,7 +137,8 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont
// TODO: Differentiate "hard reloads" (Need the cache) and "Soft reloads"
// (just need to manipulate data)
when (key) {
getString(R.string.set_key_music_locations) -> {
getString(R.string.set_key_music_locations),
getString(R.string.set_key_excluded_locations) -> {
L.d("Dispatching music locations change")
listener.onMusicLocationsChanged()
}
@@ -136,4 +155,55 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont
}
}
}
private fun List<Location.Opened>.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()) }
private inline fun String.splitEscaped(selector: (Char) -> Boolean): List<String> {
val split = mutableListOf<String>()
var currentString = ""
var i = 0
while (i < length) {
val a = get(i)
val b = getOrNull(i + 1)
if (selector(a)) {
// Non-escaped separator, split the string here, making sure any stray whitespace
// is removed.
split.add(currentString)
currentString = ""
i++
continue
}
if (b != null && a == '\\' && selector(b)) {
// 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,57 @@
/*
* 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))
}
}
@@ -0,0 +1,63 @@
/*
* 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"
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Auxio Project
* Copyright (c) 2024 Auxio Project
* LocationAdapter.kt is part of Auxio.
*
* This program is free software: you can redistribute it and/or modify
@@ -18,106 +18,59 @@
package org.oxycblt.auxio.music.locations
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import org.oxycblt.auxio.databinding.ItemMusicLocationBinding
import org.oxycblt.auxio.list.recycler.DialogRecyclerView
import org.oxycblt.auxio.util.context
import org.oxycblt.auxio.util.inflater
import org.oxycblt.musikr.fs.MusicLocation
import org.oxycblt.musikr.fs.Location
import timber.log.Timber as L
/**
* [RecyclerView.Adapter] that manages a list of [MusicLocation] music directory instances.
*
* @param listener A [LocationAdapter.Listener] to bind interactions to.
* @author Alexander Capehart (OxygenCobalt)
*/
class LocationAdapter(private val listener: Listener) : RecyclerView.Adapter<MusicDirViewHolder>() {
private val _locations = mutableListOf<MusicLocation>()
/**
* The current list of [MusicLocation]s, may not line up with [MusicLocation]s due to removals.
*/
val locations: List<MusicLocation> = _locations
abstract class LocationAdapter<T : Location>(private val listener: Listener<T>) :
RecyclerView.Adapter<LocationViewHolder<T>>() {
private val _locations = mutableListOf<T>()
val locations: List<T> = _locations
override fun getItemCount() = locations.size
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) =
MusicDirViewHolder.from(parent)
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(parent)
override fun onBindViewHolder(holder: MusicDirViewHolder, position: Int) =
override fun onBindViewHolder(holder: LocationViewHolder<T>, position: Int) =
holder.bind(locations[position], listener)
/**
* Add a [MusicLocation] to the end of the list.
*
* @param location The [MusicLocation] to add.
*/
fun add(location: MusicLocation) {
fun add(location: T) {
if (_locations.contains(location)) return
L.d("Adding $location")
_locations.add(location)
notifyItemInserted(_locations.lastIndex)
}
/**
* Add a list of [MusicLocation] instances to the end of the list.
*
* @param locations The [MusicLocation] instances to add.
*/
fun addAll(locations: List<MusicLocation>) {
fun addAll(locations: List<T>) {
L.d("Adding ${locations.size} locations")
val oldLastIndex = locations.lastIndex
val oldSize = _locations.size
_locations.addAll(locations)
notifyItemRangeInserted(oldLastIndex, locations.size)
notifyItemRangeInserted(oldSize, locations.size)
}
/**
* Remove a [MusicLocation] from the list.
*
* @param location The [MusicLocation] to remove. Must exist in the list.
*/
fun remove(location: MusicLocation) {
fun remove(location: T) {
L.d("Removing $location")
val idx = _locations.indexOf(location)
_locations.removeAt(idx)
notifyItemRemoved(idx)
}
/** A Listener for [LocationAdapter] interactions. */
interface Listener {
/** Called when the delete button on a directory item is clicked. */
fun onRemoveLocation(location: MusicLocation)
protected abstract fun createViewHolder(parent: ViewGroup): LocationViewHolder<T>
interface Listener<T : Location> {
fun onRemoveLocation(location: T)
}
}
/**
* A [RecyclerView.Recycler] that displays a [MusicLocation]. Use [from] to create an instance.
*
* @author Alexander Capehart (OxygenCobalt)
*/
class MusicDirViewHolder private constructor(private val binding: ItemMusicLocationBinding) :
abstract class LocationViewHolder<T : Location>(protected val binding: ItemMusicLocationBinding) :
DialogRecyclerView.ViewHolder(binding.root) {
/**
* Bind new data to this instance.
*
* @param location The new [MusicLocation] to bind.
* @param listener A [LocationAdapter.Listener] to bind interactions to.
*/
fun bind(location: MusicLocation, listener: LocationAdapter.Listener) {
fun bind(location: T, listener: LocationAdapter.Listener<T>) {
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 from(parent: View) =
MusicDirViewHolder(ItemMusicLocationBinding.inflate(parent.context.inflater))
}
}
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021 Auxio Project
* MusicSourcesDialog.kt is part of Auxio.
* Copyright (c) 2024 Auxio Project
* LocationsDialog.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
@@ -27,42 +27,33 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AlertDialog
import androidx.core.net.toUri
import androidx.recyclerview.widget.ConcatAdapter
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject
import org.oxycblt.auxio.BuildConfig
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.showToast
import org.oxycblt.musikr.fs.MusicLocation
import org.oxycblt.musikr.fs.Location
import timber.log.Timber as L
/**
* Dialog that manages the music locations setting.
*
* @author Alexander Capehart (OxygenCobalt)
*/
@AndroidEntryPoint
class MusicSourcesDialog :
abstract class LocationsDialog<T : Location> :
ViewBindingMaterialDialogFragment<DialogMusicLocationsBinding>(),
LocationAdapter.Listener,
LocationAdapter.Listener<T>,
NewLocationFooterAdapter.Listener {
private val locationAdapter = LocationAdapter(this)
protected abstract val locationAdapter: LocationAdapter<T>
private val locationFooterAdapter = NewLocationFooterAdapter(this)
private var openDocumentTreeLauncher: ActivityResultLauncher<Uri?>? = null
@Inject lateinit var musicSettings: MusicSettings
abstract val musicSettings: MusicSettings
override fun onCreateBinding(inflater: LayoutInflater) =
DialogMusicLocationsBinding.inflate(inflater)
override fun onConfigDialog(builder: AlertDialog.Builder) {
builder
.setTitle(R.string.set_locations)
.setTitle(getDialogTitle())
.setNegativeButton(R.string.lbl_cancel, null)
.setPositiveButton(R.string.lbl_save) { _, _ ->
val newDirs = locationAdapter.locations
musicSettings.musicLocations = newDirs
saveLocations(newDirs)
}
}
@@ -80,9 +71,9 @@ class MusicSourcesDialog :
}
val locations =
savedInstanceState?.getStringArrayList(KEY_PENDING_LOCATIONS)?.mapNotNull {
MusicLocation.existing(requireContext(), it.toUri())
} ?: musicSettings.musicLocations
savedInstanceState?.getStringArrayList(getPendingLocationsKey())?.mapNotNull {
convertUriToLocation(it.toUri())
} ?: getCurrentLocations()
locationAdapter.addAll(locations)
}
@@ -90,7 +81,8 @@ class MusicSourcesDialog :
override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
outState.putStringArrayList(
KEY_PENDING_LOCATIONS, ArrayList(locationAdapter.locations.map { it.uri.toString() }))
getPendingLocationsKey(),
ArrayList(locationAdapter.locations.map { it.uri.toString() }))
}
override fun onDestroyBinding(binding: DialogMusicLocationsBinding) {
@@ -99,10 +91,6 @@ class MusicSourcesDialog :
binding.locationsRecycler.adapter = null
}
override fun onRemoveLocation(location: MusicLocation) {
locationAdapter.remove(location)
}
override fun onNewLocation() {
L.d("Opening launcher")
val launcher =
@@ -111,24 +99,17 @@ class MusicSourcesDialog :
try {
launcher.launch(null)
} catch (e: ActivityNotFoundException) {
// User doesn't have a capable file manager.
requireContext().showToast(R.string.err_no_app)
}
}
/**
* Add a Document Tree [Uri] chosen by the user to the current [MusicLocation]s.
*
* @param uri The document tree [Uri] to add, chosen by the user. Will do nothing if the [Uri]
* is null or not valid.
*/
private fun addDocumentTreeUriToDirs(uri: Uri?) {
if (uri == null) {
// A null URI means that the user left the file picker without picking a locationectory
L.d("No URI given (user closed the dialog)")
return
}
val location = MusicLocation.new(requireContext(), uri)
val context = requireContext()
val location = createLocationFromUri(context, uri)
if (location != null) {
locationAdapter.add(location)
@@ -137,7 +118,19 @@ class MusicSourcesDialog :
}
}
private companion object {
const val KEY_PENDING_LOCATIONS = BuildConfig.APPLICATION_ID + ".key.PENDING_LOCATIONS"
override fun onRemoveLocation(location: T) {
locationAdapter.remove(location)
}
protected abstract fun getDialogTitle(): Int
protected abstract fun getCurrentLocations(): List<T>
protected abstract fun saveLocations(locations: List<T>)
protected abstract fun getPendingLocationsKey(): String
protected abstract fun convertUriToLocation(uri: Uri): T?
protected abstract fun createLocationFromUri(context: android.content.Context, uri: Uri): T?
}
@@ -0,0 +1,57 @@
/*
* 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))
}
}
@@ -0,0 +1,63 @@
/*
* 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"
}
}
@@ -36,7 +36,7 @@ import org.oxycblt.auxio.music.shim.UpdateTrackerFactory
import org.oxycblt.auxio.playback.state.PlaybackStateManager
import org.oxycblt.auxio.util.getSystemServiceCompat
import org.oxycblt.musikr.MusicParent
import org.oxycblt.musikr.fs.MusicLocation
import org.oxycblt.musikr.fs.Location
import org.oxycblt.musikr.track.UpdateTracker
import timber.log.Timber as L
@@ -168,7 +168,7 @@ private constructor(
}
}
override fun onUpdate(location: MusicLocation) {
override fun onUpdate(location: Location.Opened) {
if (musicSettings.shouldBeObserving) {
musicRepository.requestIndex(true)
}
@@ -0,0 +1,59 @@
/*
* 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()
}
}
@@ -51,9 +51,15 @@ class RootPreferenceFragment : BasePreferenceFragment(R.xml.preferences_root) {
}
override fun onOpenDialogPreference(preference: WrappedDialogPreference) {
if (preference.key == getString(R.string.set_key_music_dirs)) {
findNavController()
.navigateSafe(RootPreferenceFragmentDirections.musicLocationsSettings())
when (preference.key) {
getString(R.string.set_key_music_dirs) -> {
findNavController()
.navigateSafe(RootPreferenceFragmentDirections.musicLocationsSettings())
}
getString(R.string.set_key_excluded_dirs) -> {
findNavController()
.navigateSafe(RootPreferenceFragmentDirections.excludedLocationsSettings())
}
}
}
@@ -16,4 +16,5 @@
app:layout_constraintTop_toBottomOf="@+id/locations_list_header"
tools:listitem="@layout/item_music_location" />
</FrameLayout>
</FrameLayout>
+1 -1
View File
@@ -570,7 +570,7 @@
<dialog
android:id="@+id/music_locations_dialog"
android:name="org.oxycblt.auxio.music.locations.MusicSourcesDialog"
android:name="org.oxycblt.auxio.music.locations.MusicLocationsDialog"
android:label="music_locations_dialog"
tools:layout="@layout/dialog_music_locations" />
</navigation>
+9 -1
View File
@@ -36,6 +36,9 @@
<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
@@ -91,7 +94,7 @@
tools:layout="@layout/dialog_pre_amp" />
<dialog
android:id="@+id/music_locations_dialog"
android:name="org.oxycblt.auxio.music.locations.MusicSourcesDialog"
android:name="org.oxycblt.auxio.music.locations.MusicLocationsDialog"
android:label="music_locations_dialog"
tools:layout="@layout/dialog_music_locations" />
<dialog
@@ -99,6 +102,11 @@
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"
+4 -1
View File
@@ -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>
@@ -325,4 +325,7 @@
</plurals>
<string name="cnt_mp4">MPEG-4 تحتوي على %s</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="set_cover_mode_as_is">كما هي</string>
<string name="set_with_hidden_desc">ضمّن ملفات الصوت المخفية (مثال: ذاكرة التخزين المؤقت)</string>
<string name="set_with_hidden">ضمّن الملفات المخفية</string>
</resources>
+29 -29
View File
@@ -8,41 +8,41 @@
<string name="lbl_albums">Albomlar</string>
<string name="lbl_album">Albom</string>
<string name="lbl_album_live">Canlı albom</string>
<string name="lbl_album_remix">Qarışıq albom</string>
<string name="lbl_eps">Ep-lər</string>
<string name="lbl_singles">Seçmə</string>
<string name="lbl_single">Seçmə</string>
<string name="lbl_single_live">Canlı seçmə</string>
<string name="lbl_single_remix">Qarışıq seçmə</string>
<string name="lbl_album_remix">Remiks albom</string>
<string name="lbl_eps">EP-lər</string>
<string name="lbl_singles">Sinqlər</string>
<string name="lbl_single">Sinql</string>
<string name="lbl_single_live">Canlı sinql</string>
<string name="lbl_single_remix">Remiks sinql</string>
<string name="lbl_compilation">Kompilyasiya</string>
<string name="lbl_compilations">Kompilyasiyalar</string>
<string name="lbl_soundtrack">Səs axını</string>
<string name="lbl_soundtrack">Saundtrek</string>
<string name="info_app_desc">Android üçün asan, səmərəli musiqi səsləndirici.</string>
<string name="lbl_observing">Musiqi kitabxanası yoxlanılır</string>
<string name="lbl_ep_live">Canlı EP</string>
<string name="lbl_ep">EP</string>
<string name="lbl_ep_remix">Remiks EP</string>
<string name="lbl_soundtracks">Səs axınları</string>
<string name="lbl_soundtracks">Saundtreklər</string>
<string name="lbl_new_playlist">Yeni pleylist</string>
<string name="lbl_compilation_remix">Remiks kompilyasiyası</string>
<string name="lbl_mixes">DJ Mikslər</string>
<string name="lbl_compilation_live">Canlı kompilyasiya</string>
<string name="lbl_demo">Demo</string>
<string name="lbl_demos">Demos</string>
<string name="lbl_demos">Demolar</string>
<string name="lbl_live_group">Canlı</string>
<string name="lbl_remix_group">Remikslər</string>
<string name="lbl_artist">Sənətkar</string>
<string name="lbl_artists">Sənətkarlar</string>
<string name="lbl_artist">İfaçı</string>
<string name="lbl_artists">İfaçılar</string>
<string name="lbl_genre">Janr</string>
<string name="lbl_song">Mahnı</string>
<string name="lbl_mixtapes">Qarışıq lentlər</string>
<string name="lbl_mixtape">Qarışıq lent</string>
<string name="lbl_mixtapes">Miksteyplər</string>
<string name="lbl_mixtape">Miksteyp</string>
<string name="lbl_mix">DJ Miks</string>
<string name="lbl_genres">Janrlar</string>
<string name="lbl_playlist">Pleylist</string>
<string name="lbl_playlists">Pleylistlər</string>
<string name="lbl_empty_playlist">Boş pleylist</string>
<string name="lbl_appears_on">Üzərində Görünür</string>
<string name="lbl_appears_on">Çıxış edir</string>
<string name="lbl_imported_playlist">İdxal edilən pleylist</string>
<string name="lbl_delete">Sil</string>
<string name="lbl_search">Axtarış</string>
@@ -54,15 +54,15 @@
<string name="lbl_filter">Filtr</string>
<string name="lbl_date">Tarix</string>
<string name="lbl_import_playlist">Pleylisti idxal et</string>
<string name="lbl_rename_playlist">Pleylisti yenidən adlandır</string>
<string name="lbl_rename_playlist">Pleylistin adını dəyişdir</string>
<string name="lbl_confirm_delete_playlist">Pleylist silinsin?</string>
<string name="lbl_name">Ad</string>
<string name="lbl_song_count">Mahnı sayı</string>
<string name="lbl_import">İdxal et</string>
<string name="lbl_export">İxrac et</string>
<string name="lbl_export_playlist">Pleylist ixrac et</string>
<string name="lbl_export_playlist">Pleylisti ixrac et</string>
<string name="lbl_playlist_add">Pleylistə əlavə et</string>
<string name="lbl_song_detail">Xüsusiyyətlərə bax</string>
<string name="lbl_song_detail">Detallara bax</string>
<string name="lbl_sample_rate">Nümunə sürəti</string>
<string name="lbl_more">Daha çox</string>
<string name="lbl_start_playback">Səsləndirməni başlat</string>
@@ -70,39 +70,39 @@
<string name="lbl_reset">Sıfırla</string>
<string name="lbl_queue">Növbə</string>
<string name="lbl_shuffle_shortcut_short">Qarışdır</string>
<string name="lbl_artist_details">Sənətkara bax</string>
<string name="lbl_album_details">Alboma keç</string>
<string name="lbl_artist_details">İfaçıya bax</string>
<string name="lbl_album_details">Alboma bax</string>
<string name="lbl_parent_detail">Baxış</string>
<string name="lbl_share">Paylaş</string>
<string name="lbl_play">Səsləndir</string>
<string name="lbl_sort_mode">Çeşidləmə üsulu</string>
<string name="lbl_sort_direction">Göstəriş</string>
<string name="lbl_sort_dsc">Azalan</string>
<string name="lbl_track">Axın</string>
<string name="lbl_track">Trek</string>
<string name="lbl_date_added">Əlavə edilən tarix</string>
<string name="lbl_sort_asc">Artan</string>
<string name="lbl_playback">İndi səslənir</string>
<string name="lbl_format">Format</string>
<string name="lbl_size">Həcm</string>
<string name="lbl_replaygain_track">ReplayGain Axın Nizamlanması</string>
<string name="lbl_replaygain_track">ReplayGain Trek Nizamlanması</string>
<string name="lbl_replaygain_album">ReplayGain Albom Nizamlanması</string>
<string name="lbl_ok">Oldu</string>
<string name="lbl_save">Saxla</string>
<string name="lbl_sort">Çeşidlə</string>
<string name="lbl_equalizer">Tarazlayıcı</string>
<string name="lbl_shuffle">Qarışdır</string>
<string name="lbl_play_next">Növbəti səsləndirmə</string>
<string name="lbl_play_next">Növbəti olaraq səsləndir</string>
<string name="lbl_queue_add">Növbəyə əlavə et</string>
<string name="lbl_props">Mahnı detalları</string>
<string name="lbl_path">Yol</string>
<string name="lbl_shuffle_shortcut_long">Hamısın Qarışdır</string>
<string name="lbl_shuffle_shortcut_long">Hamısını qarışdır</string>
<string name="lbl_bitrate">Bit sürəti</string>
<string name="lbl_about">Haqqında</string>
<string name="lbl_copied">Köçürüldü</string>
<string name="lbl_report">Hesabat</string>
<string name="lbl_copied">Kopyalandı</string>
<string name="lbl_report">Bildiriş et</string>
<string name="lbl_error_info">Xəta məlumatı</string>
<string name="lbl_author">Yaradıcı</string>
<string name="lbl_author_name">Alexander Capehart</string>
<string name="lbl_author_name">Aleksandr Keyphart</string>
<string name="lbl_version">Versiya</string>
<string name="lbl_code">Mənbə kodu</string>
<string name="lbl_wiki">Viki</string>
@@ -118,7 +118,7 @@
<string name="lbl_supporters">Dəstəkçilər</string>
<string name="lng_indexing">Musiqi kitabxananız yüklənir…</string>
<string name="lng_observing">Musiqi kitabxananız dəyişikliklər üçün yoxlanılır…</string>
<string name="lbl_feedback">Əks Əlaqə</string>
<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>
@@ -127,6 +127,6 @@
<string name="lng_playlist_renamed">Pleylist adı dəyişdirildi</string>
<string name="lng_playlist_imported">Pleylist idxal edildi</string>
<string name="lng_playlist_deleted">Pleylist silindi</string>
<string name="lng_playlist_created">Səsləndirmə siyahısı yaradıldı</string>
<string name="lng_playlist_created">Pleylist yaradıldı</string>
<string name="lng_queue_added">Növbəyə əlavə edildi</string>
</resources>
</resources>
+18 -3
View File
@@ -102,7 +102,7 @@
<string name="lbl_ep">EP</string>
<string name="lbl_version">Версия</string>
<string name="lbl_code">Програмен код</string>
<string name="lbl_wiki">Wiki</string>
<string name="lbl_wiki">Уики</string>
<string name="lbl_licenses">Лицензи</string>
<string name="lbl_library_counts">Библиотечна статистика</string>
<string name="lbl_selection">Избор</string>
@@ -299,6 +299,21 @@
<string name="lbl_start_playback">Стартирай възпроизвеждане</string>
<string name="lbl_more">Още</string>
<string name="lbl_feedback">Обратна връзка</string>
<string name="lbl_github">Направете проблем в GitHub</string>
<string name="lbl_github">Създайте проблем в GitHub</string>
<string name="lbl_email">Изпратете имейл</string>
</resources>
<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_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_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>
</resources>
+98
View File
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<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>
<string name="lbl_albums">آلبوما</string>
<string name="lbl_album">آلبوم</string>
<string name="lbl_album_live">آلبوم زنده</string>
<string name="lbl_eps">آلبوما کۊتال</string>
<string name="lbl_ep">آلبوم کۊتال</string>
<string name="lbl_ep_live">آلبوم کۊتال زنده</string>
<string name="lbl_singles">تک آرنگا</string>
<string name="lbl_single_remix">ریمیکس زنده</string>
<string name="lbl_soundtracks">آرنگا هؽل</string>
<string name="lbl_demo">دمو</string>
<string name="lbl_demos">دمو یل</string>
<string name="lbl_live_group">زنده</string>
<string name="lbl_remix_group">ریمیکسا</string>
<string name="lbl_appears_on">دیاری ابۊ</string>
<string name="lbl_artist">هونرمند</string>
<string name="lbl_genre">ژانر</string>
<string name="lbl_new_playlist">نومگه پشک نۊ</string>
<string name="lbl_empty_playlist">نومگه پشک پتی</string>
<string name="lbl_import">و من ٱووردن</string>
<string name="lbl_import_playlist">و من ٱووردن نومگه پشک</string>
<string name="lbl_mix">دیجی میکس</string>
<string name="lbl_indexing">آرنگ هونی بار ونی ابۊ</string>
<string name="info_app_desc">ی پشک کوننده آرنگ ساڌه وو منتقی سی ٱندروید</string>
<string name="lbl_indexer">بار ونی آرنگ</string>
<string name="lbl_album_remix">آلبوم ریمیکس</string>
<string name="lbl_ep_remix">آلبوم کۊتال ریمیکس</string>
<string name="lbl_single_live">تک آرنگ زنده</string>
<string name="lbl_mixes">دیجی میکسا</string>
<string name="lbl_imported_playlist">نومگه پشک و من ٱووڌه</string>
<string name="lbl_artists">هونرمندۉݩ</string>
<string name="lbl_soundtrack">آرنگ هؽل</string>
<string name="lbl_playlist">نومگه پشک</string>
<string name="lbl_single">تک آرنگ</string>
<string name="lbl_genres">ژانرا</string>
<string name="lbl_date">ویرگار</string>
<string name="lbl_duration">مودت زمووݩ</string>
<string name="lbl_song_count">تئداڌ آرنگا</string>
<string name="lbl_disc">دیسک</string>
<string name="lbl_date_added">ویرگار ٱوورده وابی</string>
<string name="lbl_sort">کتن کردن</string>
<string name="lbl_sort_mode">کتن و ری</string>
<string name="lbl_sort_direction">جهت</string>
<string name="lbl_sort_asc">ری و روء</string>
<string name="lbl_sort_dsc">ری و لم</string>
<string name="lbl_playback">هیم سکو هونی پشک ابۊ</string>
<string name="lbl_play">پشک</string>
<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_parent_detail">نیشتن</string>
<string name="lbl_share">یک رسۊوی</string>
<string name="lbl_props">دووسمندیا آرنگ</string>
<string name="lbl_path">تور</string>
<string name="lbl_format">فورمت</string>
<string name="lbl_size">هندا</string>
<string name="lbl_bitrate">بیت ریت</string>
<string name="lbl_sample_rate">نرخ نمووه بورداری</string>
<string name="lbl_replaygain_track">سامووݩ آرنگ ReplayGain</string>
<string name="lbl_replaygain_album">سامووݩ آلبوم ReplayGain</string>
<string name="lbl_start_playback">ناهاڌن پا پشک</string>
<string name="lbl_ok">خا</string>
<string name="lbl_cancel">رڌ کردن</string>
<string name="lbl_save">زفت کردن</string>
<string name="lbl_reset">سامووݩ دوواره</string>
<string name="lbl_about">زبار</string>
<string name="lbl_version">نوسخه</string>
<string name="lbl_code">کود بونچک</string>
<string name="lbl_selection">پسند</string>
<string name="lbl_error_info">دووسمندیا ختا</string>
<string name="lbl_copied">لف گیری وابی</string>
<string name="lbl_author">هؽل کوݩ</string>
<string name="lbl_donate">لادراری</string>
<string name="lbl_filter_all">پوی</string>
<string name="lbl_track">آرنگ</string>
<string name="lbl_report">گوزارش</string>
<string name="lbl_more">قلوه</string>
<string name="lbl_name">نوم</string>
<string name="lbl_queue_add">ٱووردن و سف</string>
<string name="lbl_shuffle">تساڌۊفی</string>
<string name="lbl_play_next">پشک نیایی</string>
<string name="lbl_queue">سف</string>
<string name="lbl_equalizer">اکولایزر</string>
<string name="lbl_library_counts">آمار کتاو هووه</string>
<string name="lbl_wiki">ویکی</string>
<string name="lbl_shuffle_shortcut_long">شیونیڌن پوی</string>
<string name="lbl_shuffle_shortcut_short">تساڌۊفی</string>
<string name="lbl_licenses">لایسنس</string>
<string name="lbl_supporters">هؽزگرووݩ</string>
</resources>
+2
View File
@@ -335,4 +335,6 @@
<string name="set_with_hidden">Zahrnout skryté soubory</string>
<string name="set_with_hidden_desc">Zahrnout skryté zvukové soubory (např. .cache)</string>
<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>
</resources>
+2
View File
@@ -326,4 +326,6 @@
<string name="set_cover_mode_as_is">Unverändert</string>
<string name="set_with_hidden_desc">Audio-Dateien einbeziehen, die versteckt sind (z. B. .cache)</string>
<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>
</resources>
+2
View File
@@ -330,4 +330,6 @@
<string name="set_cover_mode_as_is">Original</string>
<string name="set_with_hidden_desc">Incluir ficheros de audio ocultos (ej. .cache)</string>
<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>
</resources>
+6 -1
View File
@@ -68,7 +68,7 @@
<string name="set_play_song_from_genre">Toista tyylilajista</string>
<string name="set_separators">Moniarvoerottimet</string>
<string name="set_exclude_non_music_desc">Ohita äänitiedostot, jotka eivät ole musiikkia, kuten podcastit</string>
<string name="set_separators_and">Ampersand &amp;</string>
<string name="set_separators_and">Ja-merkki (&amp;)</string>
<string name="set_separators_comma">Pilkku (,)</string>
<string name="set_separators_plus">Plus (+)</string>
<string name="set_separators_semicolon">Puolipiste (;)</string>
@@ -313,4 +313,9 @@
<string name="lng_empty_genres">Tyylilajisi tulevat näkymään tässä.</string>
<string name="cdc_alac">Apple Lossless Audio Codec (ALAC)</string>
<string name="set_cover_mode_save_space">Säätä tilaa</string>
<string name="set_with_hidden_desc">Sisällytä piilotetut äänitiedostot (esim. .cache)</string>
<string name="set_with_hidden">Sisällytä piilotetut tiedostot</string>
<string name="set_cover_mode_as_is">Sellaisenaan</string>
<string name="set_excluded_locations">Poissuljetut kansiot</string>
<string name="set_excluded_locations_desc">Hallinnoi kansioita, joista ei ladata musiikkia</string>
</resources>
+14
View File
@@ -312,4 +312,18 @@
<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>
<string name="lng_empty_playlists">Vos playlists vont s\'afficher ici.</string>
<string name="lng_empty_genres">Les genres musicaux vont s\'afficher ici.</string>
<string name="set_with_hidden_desc">Inclure les fichiers audios qui sont cachés (ex. .cache)</string>
<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>
</resources>
+23 -2
View File
@@ -200,7 +200,7 @@
<string name="lbl_indexing">Zene betöltése</string>
<string name="lbl_observing">Zene könyvtár figyelése</string>
<string name="desc_exit">Lejátszás megállítása</string>
<string name="info_app_desc">Egyszerű, praktikus zenelejátszó androidra.</string>
<string name="info_app_desc">Egyszerű, praktikus zenelejátszó Androidra.</string>
<string name="lbl_album">Album</string>
<string name="lbl_singles">Kislemezek</string>
<string name="lbl_single">Kislemez</string>
@@ -302,4 +302,25 @@
<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>
</resources>
<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>
<string name="set_with_hidden_desc">Rejtett audió fájlok megjelenítése (pl. .cache)</string>
<string name="lbl_more">Több</string>
<string name="lbl_email">Küldj egy e-mailt</string>
<string name="lng_empty_albums">Itt fognak megjelenni az albumaid.</string>
<string name="lng_empty_artists">Itt fognak megjelenni az előadóid.</string>
<string name="lng_empty_genres">Itt fognak megjelenni a műfajaid.</string>
<string name="set_cover_mode_as_is">Ahogy van</string>
<string name="cnt_mp4">MPEG-4, amely tartalmazza a %s-t</string>
<string name="lbl_start_playback">Indítsd el a lejátszást</string>
<string name="lng_tasker_start">Elindítja az Auxio-t a korábban mentett állapot használatával. Ha nincs mentett állapot, akkor minden szám véletlenszerűen lejátszásra kerül. A lejátszás azonnal elindul.\n\nFIGYELEM: Légy óvatos a szolgáltatás vezérlésével, mert ha bezárod, majd újra próbálod használni, valószínűleg összeomlik az alkalmazás.</string>
<string name="lng_empty_playlists">Itt fognak megjelenni a lejátszási listáid.</string>
<string name="set_cover_mode_save_space">Helytakarékos</string>
<string name="cdc_alac">Apple veszteségmentes audió kodek (ALAC)</string>
<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>
</resources>
+9 -1
View File
@@ -298,4 +298,12 @@
<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>
</resources>
<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>
<string name="lbl_feedback">Umpan balik</string>
<string name="lbl_github">Buat masalah di GitHub</string>
<string name="lbl_email">Kirim email</string>
<string name="lng_tasker_start">Memulai Auxio menggunakan status yang disimpan sebelumnya. Jika tidak ada status yang disimpan, semua lagu akan diputar secara acak. Pemutaran akan dimulai segera.\n\nPERINGATAN: Hati-hati saat mengontrol layanan ini, jika Anda menutupnya dan kemudian mencoba menggunakannya lagi, aplikasi kemungkinan besar akan mengalami kegagalan.</string>
</resources>
+2
View File
@@ -328,4 +328,6 @@
<string name="set_cover_mode_as_is">Qualità originale</string>
<string name="set_with_hidden_desc">Include file audio nascosti (per esempio in .cache)</string>
<string name="set_with_hidden">Includi file nascosti</string>
<string name="set_excluded_locations">Cartelle da escludere</string>
<string name="set_excluded_locations_desc">Seleziona le cartelle da escludere dal caricamento della musica</string>
</resources>
+10 -1
View File
@@ -310,4 +310,13 @@
<string name="lbl_supporters">תומכים</string>
<string name="lbl_github">יצירת דוח ב-GitHub</string>
<string name="lbl_email">שליחת מייל</string>
</resources>
<string name="lng_empty_songs">השירים שלך יופיעו כאן.</string>
<string name="lng_empty_albums">האלבומים שלך יופיעו כאן.</string>
<string name="lng_empty_artists">האמנים שלך יופיעו כאן.</string>
<string name="lng_empty_playlists">הפלייליסטים שלך יופיעו כאן.</string>
<string name="set_with_hidden">כלול קבצים מוסתרים</string>
<string name="lng_empty_genres">הז\'אנרים שלך יופיעו כאן.</string>
<string name="set_with_hidden_desc">כלול קובצי אודיו מוסתרים (לדוגמה .cache)</string>
<string name="set_cover_mode_as_is">כפי שהוא</string>
<string name="set_cover_mode_save_space">חיסכון מקום</string>
</resources>
+36 -2
View File
@@ -134,7 +134,7 @@
<string name="lbl_version">バージョン</string>
<string name="set_headset_autoplay_desc">ヘッドセット接続時に常時再生開始 (動作しない機種あり)</string>
<string name="set_headset_autoplay">ヘッドセット自動再生</string>
<string name="set_replay_gain">リプレイゲイン</string>
<string name="set_replay_gain">音量の均一化</string>
<string name="set_play_song_from_all">すべての曲から再生</string>
<string name="set_play_song_from_album">アルバムから再生</string>
<string name="set_play_song_from_artist">アーティストから再生</string>
@@ -279,4 +279,38 @@
<string name="set_replay_gain_mode_off">オフ</string>
<string name="err_import_failed">このファイルからプレイリストをインポートできません</string>
<string name="err_export_failed">このファイルにプレイリストをエクスポートできません</string>
</resources>
<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>
<string name="lbl_report">報告</string>
<string name="lbl_sort_direction">順列</string>
<string name="lbl_parent_detail">表示</string>
<string name="lng_empty_songs">あなたの曲はここに表示されます</string>
<string name="lng_empty_albums">あなたのアルバムはここに表示されます</string>
<string name="lng_empty_artists">あなたのアーティストはここに表示されます</string>
<string name="lng_empty_genres">あなたのジャンルはここに表示されます</string>
<string name="lbl_selection">選択</string>
<string name="lbl_author">著者</string>
<string name="lbl_empty_playlist">空のブレイリスト</string>
<string name="desc_selection_image">画像の選択</string>
<string name="lbl_imported_playlist">インポートされたプレイリスト</string>
<string name="lbl_replaygain_album">ReplayGainアルバム調整</string>
<string name="lbl_replaygain_track">ReplayGainトラック調整</string>
<string name="lbl_github">GitHubで問題を報告する</string>
<string name="lng_empty_playlists">プレイリストはここに表示されます</string>
<string name="set_with_hidden">非表示のファイルを含む</string>
<string name="set_with_hidden_desc">非表示のオーディオファイルを含める(例:.cache)</string>
<string name="set_remember_pause">再開時に一時停止を記憶</string>
<string name="set_remember_pause_desc">キューをスキップまたは編集しても、再生/一時停止を維持する</string>
<string name="cdc_unknown">不明</string>
<string name="set_cover_mode_save_space">スペースの節約</string>
<string name="cdc_alac">アップルロスレスオーディオコーデック(ALAC)</string>
<string name="lbl_more">さらに</string>
<string name="lng_tasker_start">事前に保存した状態でAuxioを起動します。保存状態がない場合は、すべての曲がシャッフルされます。再生はすぐに開始されます\n\n警告: このサービスの操作には注意してください。このサービスを終了してから再度使用しようとすると、アプリがクラッシュする可能性があります</string>
<string name="lbl_sort_mode">並べ替える</string>
<string name="lbl_path_style_absolute">絶対的</string>
<string name="lbl_path_style_relative">相対的</string>
</resources>
+11
View File
@@ -101,4 +101,15 @@
<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>
<string name="lng_empty_playlists">თქვენი დასაკრავი სიები გამოჩნდება აქ.</string>
<string name="fmt_lib_song_count">სიმღერების რაოდენობა: %d</string>
<string name="fmt_lib_album_count">ალბომების რაოდენობა: %d</string>
<string name="fmt_lib_artist_count">არტისტების რაოდენობა: %d</string>
<string name="lbl_queue_add">დაამატე რიგში</string>
<string name="lbl_supporters">გულშემატკივრები</string>
<string name="lng_empty_genres">თქვენი ჟანრები აქ გამოჩნდება.</string>
<string name="fmt_lib_total_duration">სრული ხანგრძლივობა: %s</string>
<string name="fmt_lib_genre_count">ჟანრების რაოდენობა: %d</string>
</resources>
+24 -24
View File
@@ -44,11 +44,11 @@
<string name="set_root_title">Nustatymai</string>
<string name="set_theme">Tema</string>
<string name="set_black_mode_desc">Naudok grynai juodą tamsią temą.</string>
<string name="info_app_desc">Paprastas, racionalus „Android“ muzikos leistuvė.</string>
<string name="info_app_desc">Paprasta, racionali „Android“ muzikos leistuvė.</string>
<string name="lbl_indexer">Muzikos įkėlimas</string>
<string name="lng_widget">Peržiūrėk ir valdyk muzikos įrašo perklausą</string>
<string name="lbl_genres">Žanrai</string>
<string name="lbl_retry">Pakartoti</string>
<string name="lbl_retry">Kartoti</string>
<string name="lbl_indexing">Įkeliama muzika</string>
<string name="lng_indexing">Įkeliamas tavo muzikos biblioteka…</string>
<string name="lbl_library_counts">Bibliotekos statistika</string>
@@ -98,14 +98,14 @@
<string name="clr_teal">Arbatžolė</string>
<string name="clr_yellow">Geltona</string>
<string name="cdc_aac">Išplėstinis garso kodavimas (AAC)</string>
<string name="cdc_flac">Nemokamas be nuostolių garso kodekas (FLAC)</string>
<string name="cdc_flac">Nemokamas nenuostolingas garso kodekas (FLAC)</string>
<plurals name="fmt_song_count">
<item quantity="one">%d daina</item>
<item quantity="few">%d dainos</item>
<item quantity="many">%d albumų</item>
<item quantity="other">%d dainų</item>
</plurals>
<string name="clr_dynamic">Dinaminis</string>
<string name="clr_dynamic">Dinaminė</string>
<string name="clr_grey">Pilka</string>
<string name="clr_orange">Oranžinė</string>
<string name="clr_brown">Ruda</string>
@@ -118,21 +118,21 @@
<string name="set_headset_autoplay_desc">Visada pradėk leisti, kai ausinės yra prijungtos (gali neveikti visuose įrenginiuose).</string>
<string name="cdc_ogg">Ogg garsas</string>
<string name="lbl_author_name">Aleksandras Keiphartas (angl. Alexander Capehart)</string>
<string name="set_replay_gain_mode_track">Pageidauti takeliui</string>
<string name="set_replay_gain_mode_track">Pageidauti takelį</string>
<string name="err_bad_location">Šis aplankas nepalaikomas.</string>
<string name="desc_play_pause">Leisti arba pristabdyti</string>
<string name="desc_skip_next">Praleisti į kitą dainą</string>
<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="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 albumui</string>
<string name="set_replay_gain_mode_dynamic">Pageidauti albumui, jei vienas groja</string>
<string name="set_replay_gain_mode_album">Pageidauti albumą</string>
<string name="set_replay_gain_mode_dynamic">Pageidauti albumą, jei vienas leidžiamas</string>
<string name="err_no_app">Programėlę nerasta, kuri galėtų atlikti šią užduotį.</string>
<string name="desc_auxio_icon">„Auxio“ piktograma</string>
<string name="desc_song_handle">Perkelti šią dainą</string>
<string name="desc_tab_handle">Perkelti šį skirtuką</string>
<string name="desc_tab_handle">Perkelti šią kortelę</string>
<string name="err_index_failed">Nepavyko įkelti muzikos.</string>
<string name="fmt_disc_no">%d diskas</string>
<string name="fmt_db_pos">+%.1f dB</string>
@@ -149,7 +149,7 @@
<string name="set_repeat_pause">Pauzė ant kartojimo</string>
<string name="set_play_in_list_with">Kai leidžiant iš bibliotekos</string>
<string name="set_play_in_parent_with">Kai leidžiant iš elemento informacijos</string>
<string name="desc_music_location_delete">Pašalinti aplanką</string>
<string name="desc_music_location_delete">Šalinti aplanką</string>
<string name="lbl_genre">Žanras</string>
<string name="lng_search_library">Ieškok savo bibliotekoje…</string>
<string name="lbl_equalizer">Ekvalaizeris</string>
@@ -159,9 +159,9 @@
<string name="set_action_mode_next">Praleisti į kitą</string>
<string name="set_headset_autoplay">Automatinis ausinių leidimas</string>
<string name="set_action_mode_repeat">Kartojimo režimas</string>
<string name="desc_queue_bar">Atidaryti eilę</string>
<string name="desc_clear_search">Išvalyti paieškos užklausą</string>
<string name="desc_remove_song">Pašalinti šią dainą</string>
<string name="desc_queue_bar">Atverti eilę</string>
<string name="desc_clear_search">Valyti paieškos užklausą</string>
<string name="desc_remove_song">Šalinti šią dainą</string>
<string name="set_play_song_from_all">Leisti iš visų dainų</string>
<string name="set_play_song_none">Leisti iš parodyto elemento</string>
<string name="set_play_song_from_album">Leisti iš albumo</string>
@@ -175,18 +175,18 @@
<string name="fmt_indexing">Įkėliamas tavo muzikos biblioteka… (%1$d/%2$d)</string>
<string name="set_personalize">Suasmeninti</string>
<string name="set_pre_amp_warning">Įspėjimas: keičiant išankstinį stiprintuvą į didelę teigiamą reikšmę, kai kuriuose garso takeliuose gali atsirasti tarpų.</string>
<string name="desc_album_cover">Albumo viršelis %s</string>
<string name="desc_artist_image">Atlikėjo vaizdas %s</string>
<string name="desc_album_cover">Albumo viršelis, skirtas „%s“</string>
<string name="desc_artist_image">Atlikėjo vaizdas, skirtas „%s“</string>
<string name="def_playback">Nėra leidžiamos muzikos</string>
<string name="set_repeat_pause_desc">Sustabdyk, kai daina kartojasi.</string>
<string name="set_content">Turinys</string>
<string name="set_locations">Muzikos aplankai</string>
<string name="set_reindex">Atnaujinti muziką</string>
<string name="set_reindex_desc">Perkrauk muzikos biblioteką, naudojant podėlio žymes, kai įmanoma.</string>
<string name="set_reindex_desc">Įkelkite iš naujo muzikos biblioteką, naudojant podėlio žymes, kai įmanoma.</string>
<string name="set_bar_action">Pasirinktinis įrašo perklausos juostos veiksmas</string>
<string name="set_pre_amp">„ReplayGain“ išankstinis stiprintuvas</string>
<string name="set_locations_desc">Tvarkyk, kur muzika turėtų būti įkeliama iš.</string>
<string name="desc_genre_image">Žanro vaizdas %s</string>
<string name="set_locations_desc">Tvarkykite, kur muzika turėtų būti įkeliama iš.</string>
<string name="desc_genre_image">Žanro vaizdas, skirtas „%s“</string>
<string name="desc_shuffle">Įjungti arba išjungti maišymą</string>
<string name="desc_track_number">%d takelis</string>
<string name="desc_change_repeat">Keisti kartojimo režimą</string>
@@ -222,7 +222,7 @@
<item quantity="other">%d atlikėjų</item>
</plurals>
<string name="set_rescan">Perskenuoti muziką</string>
<string name="set_rescan_desc">Išvalyk žymių podėlį ir pilnai perkrauk muzikos biblioteką (lėčiau, bet labiau užbaigta).</string>
<string name="set_rescan_desc">Išvalykite žymių podėlį ir pilnai įkelkite iš naujo muzikos biblioteką (lėčiau, bet labiau užbaigta).</string>
<string name="fmt_selected">%d pasirinkta</string>
<string name="set_play_song_from_genre">Leisti iš žanro</string>
<string name="lbl_wiki">Viki</string>
@@ -237,13 +237,13 @@
<string name="set_music">Muzika</string>
<string name="set_images">Vaizdai</string>
<string name="set_playback">Įrašo perklausa</string>
<string name="set_replay_gain">Garso normalizavimas</string>
<string name="set_replay_gain">Garsumo normalizavimas</string>
<string name="lbl_sort_dsc">Mažėjantis</string>
<string name="set_intelligent_sorting_desc">Teisingai surūšiuok pavadinimus, kurie prasideda skaičiais arba žodžiais, tokiais kaip „the“ (geriausiai veikia su anglų kalbos muzika).</string>
<string name="set_intelligent_sorting">Išmanusis rūšiavimas</string>
<string name="lbl_playlist">Grojaraštis</string>
<string name="lbl_playlists">Grojaraščiai</string>
<string name="desc_playlist_image">Grojaraščio vaizdas %s</string>
<string name="desc_playlist_image">Grojaraščio vaizdas, skirtas „%s“</string>
<string name="lbl_new_playlist">Naujas grojaraštis</string>
<string name="lbl_playlist_add">Pridėti į grojaraštį</string>
<string name="lng_playlist_added">Pridėta į grojaraštį</string>
@@ -299,7 +299,7 @@
<string name="lbl_path_style_relative">Santykinis</string>
<string name="lbl_windows_paths">Naudoti „Windows“ suderinamus kelius</string>
<string name="set_remember_pause">Prisiminti pauzę</string>
<string name="set_remember_pause_desc">Išlaikyk leidimą / pristabdymą, kai praleidžiama arba redaguojama eilė.</string>
<string name="set_remember_pause_desc">Išlaikykite leidžiamą / pristabdymą praleidžiant arba redaguojant eilę.</string>
<string name="set_replay_gain_mode_off">Išjungta</string>
<string name="lng_tasker_start">Paleidžia „Auxio“ naudojant anksčiau išsaugotą būseną. Jei nėra išsaugotos būsenos, visos dainos bus išmaišytos. Įrašo perklausa bus pradėta iš karto.
\n
@@ -308,7 +308,7 @@
<string name="lbl_more">Daugiau</string>
<string name="lbl_feedback">Atsiliepimai</string>
<string name="lbl_github">Sukurti problemą svetainėje „GitHub“</string>
<string name="cnt_mp4">MPEG-4, kuriame yra %s</string>
<string name="cnt_mp4">MPEG-4, turintis %s</string>
<string name="def_album">Nežinomas albumas</string>
<string name="lng_empty_songs">Čia bus rodomos jūsų dainos.</string>
<string name="lng_empty_albums">Čia bus rodomi jūsų albumai.</string>
@@ -318,7 +318,7 @@
<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“ be nuostolių garso kodekas (ALAC)</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>
+22 -1
View File
@@ -304,4 +304,25 @@
<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>
</resources>
<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>
<string name="cdc_alac">Appel Lossless Audio Codec (ALAC)</string>
<string name="cdc_unknown">Onbekend</string>
<string name="lng_empty_songs">Je nummers zullen hier worden weergegeven.</string>
<string name="lng_empty_playlists">Je afspeellijsten zullen hier worden weergegeven.</string>
<string name="set_with_hidden">Inclusief verborgen bestanden</string>
<string name="lbl_github">Meld een probleem met GitHub</string>
<string name="lbl_email">Stuur een e-mail</string>
<string name="lng_empty_albums">Je albums zullen hier worden weergegeven.</string>
<string name="lng_empty_artists">Je artiesten zullen hier worden weergegeven.</string>
<string name="lng_empty_genres">Je genres zullen hier worden weergegeven.</string>
<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>
</resources>
+5 -3
View File
@@ -78,13 +78,13 @@
<string name="set_pre_amp_desc">A pré-amplificação é aplicada em cima da normalização de volume</string>
<string name="set_pre_amp_warning">Aviso: Alterar a pré-amplificação para um valor positivo muito alto pode resultar em picos de volume em algumas faixas.</string>
<string name="set_locations">Pastas de música</string>
<string name="set_locations_desc">Gerencia de onde as músicas devem ser carregadas</string>
<string name="set_locations_desc">Gerencie de onde as músicas devem ser carregadas</string>
<string name="err_index_failed">Falha ao carregar músicas</string>
<string name="err_no_app">Nenhum aplicativo encontrado que possa lidar com esta tarefa</string>
<string name="err_bad_location">Esta pasta não é compatível</string>
<string name="set_reindex_desc">Recarrega a biblioteca de músicas usando metadados salvos em cache quando possível</string>
<string name="set_rewind_prev">Retroceder antes de voltar</string>
<string name="set_reindex">Recarregar música</string>
<string name="set_reindex">Recarregar músicas</string>
<string name="set_rewind_prev_desc">Retroceder a música antes de voltar para a anterior</string>
<string name="info_app_desc">Um reprodutor de música simples e racional para Android.</string>
<string name="lng_indexing">Carregando a sua biblioteca de músicas…</string>
@@ -223,7 +223,7 @@
<item quantity="many">%d artistas</item>
<item quantity="other">%d artistas</item>
</plurals>
<string name="set_rescan">Re-escanear músicas</string>
<string name="set_rescan">Reescanear músicas</string>
<string name="set_rescan_desc">Limpa os metadados em cache e recarrega totalmente a biblioteca de música (lento, porém mais completo)</string>
<string name="set_hide_collaborators">Ocultar artistas colaboradores</string>
<string name="set_hide_collaborators_desc">Mostrar apenas artistas que foram creditados diretamente no álbum (funciona melhor em músicas com metadados completos)</string>
@@ -328,4 +328,6 @@
<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>
</resources>
+20 -2
View File
@@ -305,6 +305,24 @@
<string name="lbl_replaygain_album">Ajuste de ReplayGain do álbum</string>
<string name="lbl_path_style_relative">Relativo</string>
<string name="lbl_windows_paths">Usar caminhos compatíveis com Windows</string>
<string name="lng_tasker_start">Inicia o Auxio utilizando o estado anteriormente guardado. Se não existir nenhum estado guardado, todas as músicas serão reproduzidas aleatoriamente. A reprodução começará imediatamente.\n\nAVISO: Tenha cuidado ao controlar este serviço. Se o fechar e tentar utilizá-lo novamente, provavelmente irá causar uma falha na aplicação.</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>
</resources>
<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>
<string name="set_cover_mode_save_space">Gravar espaço</string>
<string name="cnt_mp4">MPEG-4 contendo %s</string>
<string name="cdc_unknown">Desconhecido</string>
<string name="lbl_more">Mais</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_artists">Os seus artistas aparecerão aqui.</string>
<string name="lng_empty_genres">Os seus gêneros aparecerão aqui.</string>
<string name="lng_empty_playlists">As suas listas de reprodução aparecerão aqui.</string>
<string name="set_with_hidden_desc">Ignorar ficheiros e pastas que estão ocultos (por exemplo, .cache)</string>
<string name="lbl_email">Envie um e-mail</string>
<string name="lbl_github">Crie um problema no GitHub</string>
</resources>
+2
View File
@@ -316,4 +316,6 @@
<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>
</resources>
+4 -1
View File
@@ -330,4 +330,7 @@
<string name="lng_empty_genres">Здесь будут отображаться ваши жанры.</string>
<string name="set_cover_mode_save_space">Экономия места</string>
<string name="lbl_github">Сообщить о проблеме на GitHub</string>
</resources>
<string name="set_with_hidden">Со скрытыми файлами</string>
<string name="set_with_hidden_desc">Показывать скрытые аудио (например, те, что в .cache)</string>
<string name="set_cover_mode_as_is">Как есть</string>
</resources>
+4 -1
View File
@@ -319,4 +319,7 @@
<string name="lbl_email">E-posta yolla</string>
<string name="lbl_github">Github\'da rapor aç</string>
<string name="err_export_failed">Bu dosyaya bir oynatma listesi aktarılamıyor</string>
</resources>
<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>
</resources>
+3 -1
View File
@@ -175,7 +175,7 @@
<string name="err_bad_location">Ця папка не підтримується</string>
<string name="def_artist">Невідомий виконавець</string>
<string name="clr_lime">Лаймовий</string>
<string name="set_separators_and">Амперсанд &amp;</string>
<string name="set_separators_and">Амперсанд (&amp;)</string>
<string name="desc_skip_next">Перейти до наступної пісні</string>
<string name="desc_shuffle">Ввімкніть або вимкніть перемішування</string>
<string name="desc_exit">Зупинити відтворення</string>
@@ -330,4 +330,6 @@
<string name="set_cover_mode_as_is">Як є</string>
<string name="set_with_hidden">Включати приховані файли</string>
<string name="set_with_hidden_desc">Включати приховані аудіофайли (наприклад, .cache)</string>
<string name="set_excluded_locations">Виключені папки</string>
<string name="set_excluded_locations_desc">Керування папками, які потрібно виключити із завантаження музики</string>
</resources>
@@ -324,4 +324,6 @@
<string name="set_cover_mode_as_is">保持原样</string>
<string name="set_with_hidden">包括隐藏的文件</string>
<string name="set_with_hidden_desc">包括隐藏的音频文件(排除 .cache)</string>
<string name="set_excluded_locations_desc">管理要排除在音乐加载以外的文件夹</string>
<string name="set_excluded_locations">排除的文件夹</string>
</resources>
+255 -96
View File
@@ -6,158 +6,317 @@
<string name="lbl_artists">演出者</string>
<string name="lbl_albums">專輯</string>
<string name="lbl_songs">歌曲</string>
<string name="lbl_all_songs">所有歌曲</string>
<string name="lbl_all_songs">所有曲目</string>
<string name="lbl_search">搜尋</string>
<string name="lbl_filter">篩選器</string>
<string name="lbl_filter">篩選</string>
<string name="lbl_filter_all">全部</string>
<string name="lbl_sort">排序</string>
<string name="lbl_sort_asc">升序排列</string>
<string name="lbl_sort_asc">升序</string>
<string name="lbl_play">播放</string>
<string name="lbl_shuffle">隨機播放</string>
<string name="lbl_playback">播放面板</string>
<string name="lbl_queue">隊列</string>
<string name="lbl_play_next">下一首播放</string>
<string name="lbl_queue_add">添加到隊列</string>
<string name="lng_queue_added">已加入隊列</string>
<string name="lbl_artist_details">前往該歌手頁面</string>
<string name="lbl_album_details">專輯</string>
<string name="lbl_playback">現正播放</string>
<string name="lbl_queue">佇列</string>
<string name="lbl_play_next">播放下一首</string>
<string name="lbl_queue_add">新增至佇列</string>
<string name="lng_queue_added">已新增至佇列</string>
<string name="lbl_artist_details">前往演出者</string>
<string name="lbl_album_details">前往專輯</string>
<string name="lbl_about">關於</string>
<string name="lbl_version">版本</string>
<string name="lbl_code">在 GitHub 上檢視</string>
<string name="lbl_licenses">授權條款</string>
<string name="lbl_code">原始碼</string>
<string name="lbl_licenses">授權</string>
<!-- Settings namespace | Settings-related labels -->
<string name="set_root_title">設定</string>
<string name="set_ui">外觀</string>
<string name="set_theme">主題色調</string>
<string name="set_theme_auto">強調色</string>
<string name="set_theme">主題</string>
<string name="set_theme_auto">自動</string>
<string name="set_theme_day">淺色</string>
<string name="set_theme_night">深色</string>
<string name="set_accent">色彩樣式</string>
<string name="set_accent">主色調</string>
<string name="set_audio">音訊</string>
<string name="set_personalize">行為</string>
<string name="set_keep_shuffle">記住隨機播放</string>
<string name="set_personalize">個人化</string>
<string name="set_keep_shuffle">記憶隨機播放</string>
<!-- Error Namespace | Error Labels -->
<!-- Description Namespace | Accessibility Strings -->
<string name="desc_track_number">音軌 %d</string>
<string name="desc_play_pause">播放/暫停</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>
<item quantity="other">%d 首歌曲</item>
</plurals>
<plurals name="fmt_album_count">
<item quantity="other">%d 專輯</item>
<item quantity="other">%d 張專輯</item>
</plurals>
<string name="lbl_indexer">載入音樂</string>
<string name="lbl_observing">檢測音樂庫</string>
<string name="lbl_observing">正在檢查媒體</string>
<string name="lbl_format">格式</string>
<string name="set_black_mode">黑色主題</string>
<string name="lbl_duration">時長</string>
<string name="set_black_mode">黑色</string>
<string name="lbl_duration">長度</string>
<string name="lbl_size">大小</string>
<string name="lbl_bitrate">位元率</string>
<string name="lbl_sample_rate">取樣頻率</string>
<string name="set_black_mode_desc">使用純黑暗色主題</string>
<string name="lbl_bitrate">位元速率</string>
<string name="lbl_sample_rate">取樣率</string>
<string name="set_black_mode_desc">使用純黑色主題</string>
<string name="set_display">顯示</string>
<string name="lbl_reset">重設</string>
<string name="lng_indexing">正在載入你的音樂庫…</string>
<string name="lbl_genre">流派</string>
<string name="set_cover_mode">專輯封面</string>
<string name="lng_indexing">正在載入媒體…</string>
<string name="lbl_genre">類型</string>
<string name="set_cover_mode">專輯封面顯示</string>
<string name="lbl_save">儲存</string>
<string name="lbl_indexing">載入音樂中</string>
<string name="info_app_desc">一款為 android 打造的簡潔、理性的音樂播放器。</string>
<string name="lbl_indexing">正在載入音樂</string>
<string name="info_app_desc">一個簡潔、理性的 Android 音樂播放器。</string>
<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>
<string name="lbl_new_playlist">新的播放清單</string>
<string name="lbl_import_playlist">匯入播放清單</string>
<string name="lbl_path">路徑</string>
<string name="lbl_path_style">路徑樣式</string>
<string name="lbl_supporters">支援者</string>
<string name="lng_playlist_imported">已匯入播放隊列</string>
<string name="lng_playlist_exported">已匯出播放隊列</string>
<string name="lbl_path_style">路徑形式</string>
<string name="lbl_supporters">協力</string>
<string name="lng_playlist_imported">已匯入播放清單</string>
<string name="lng_playlist_exported">已匯出播放清單</string>
<string name="lbl_path_style_absolute">絕對</string>
<string name="lbl_more">更多</string>
<string name="lbl_error_info">錯誤信息</string>
<string name="lbl_error_info">錯誤訊息</string>
<string name="lbl_copied">已複製</string>
<string name="lng_widget">查看和控制音樂回放</string>
<string name="lbl_props">歌曲屬性</string>
<string name="lng_widget">檢視與控制音樂播放</string>
<string name="lbl_props">歌曲資訊</string>
<string name="lbl_shuffle_shortcut_short">隨機</string>
<string name="lbl_song">歌曲</string>
<string name="lbl_single_live">實況單曲</string>
<string name="lbl_single_remix">重新混音單曲</string>
<string name="lbl_windows_paths">使用與Windows相容的路徑</string>
<string name="lbl_imported_playlist">已匯入的播放隊列</string>
<string name="lbl_song_detail">查看屬性</string>
<string name="lbl_playlist_add">添加到播放隊列</string>
<string name="lbl_playlist">播放隊列</string>
<string name="lbl_playlists">播放隊列</string>
<string name="lbl_single_live">現場單曲</string>
<string name="lbl_single_remix">混音單曲</string>
<string name="lbl_windows_paths">使用與 Windows 相容的路徑</string>
<string name="lbl_imported_playlist">已匯入播放清單</string>
<string name="lbl_song_detail">檢視資訊</string>
<string name="lbl_playlist_add">新增至播放清單</string>
<string name="lbl_playlist">播放清單</string>
<string name="lbl_playlists">播放清單</string>
<string name="lbl_delete">刪除</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>
<string name="lbl_report">報告</string>
<string name="lbl_album_live">實況專輯</string>
<string name="lbl_album_remix">重新混音專輯</string>
<string name="lbl_live_group">實況</string>
<string name="lbl_remix_group">重新混音</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>
<string name="lbl_report">回報</string>
<string name="lbl_album_live">現場專輯</string>
<string name="lbl_album_remix">混音專輯</string>
<string name="lbl_live_group">現場</string>
<string name="lbl_remix_group">混音</string>
<string name="lbl_date">日期</string>
<string name="lng_playlist_renamed">已重新命名播放隊列</string>
<string name="lng_playlist_deleted">已刪除播放隊列</string>
<string name="lng_playlist_renamed">已編輯播放清單</string>
<string name="lng_playlist_deleted">已刪除播放清單</string>
<string name="lbl_rename">重新命名</string>
<string name="lbl_rename_playlist">重新命名播放隊列</string>
<string name="lbl_rename_playlist">重新命名播放清單</string>
<string name="lbl_edit">編輯</string>
<string name="lbl_name">名稱</string>
<string name="lbl_disc">碟片</string>
<string name="lbl_disc">唱片</string>
<string name="lbl_track">音軌</string>
<string name="lbl_date_added">添加日期</string>
<string name="lbl_date_added">建立日期</string>
<string name="lbl_sort_mode">排序依據</string>
<string name="lbl_equalizer">等化器</string>
<string name="lbl_share">分享</string>
<string name="lbl_shuffle_shortcut_long">隨機全部</string>
<string name="lbl_shuffle_shortcut_long">全部隨機播放</string>
<string name="lbl_cancel">取消</string>
<string name="lng_playlist_created">已建立播放隊列</string>
<string name="lbl_start_playback">開始回放</string>
<string name="lng_playlist_created">已建立播放清單</string>
<string name="lbl_start_playback">開始播放</string>
<string name="lbl_import">匯入</string>
<string name="lbl_export">匯出</string>
<string name="lbl_export_playlist">匯出播放隊列</string>
<string name="lbl_empty_playlist">空播放隊列</string>
<string name="lbl_parent_detail">查看</string>
<string name="lbl_feedback">回報</string>
<string name="lng_observing">正在監視你的音樂資料庫更改…</string>
<string name="set_bar_action">自定義回放條動作</string>
<string name="set_notif_action">自定義通知動作</string>
<string name="set_behavior">行為</string>
<string name="set_content_desc">控制如何載入音樂和圖片</string>
<string name="set_images">圖片</string>
<string name="lbl_export_playlist">匯出播放清單</string>
<string name="lbl_empty_playlist">空的播放清單</string>
<string name="lbl_parent_detail">檢視</string>
<string name="lbl_feedback">傳送意見</string>
<string name="lng_observing">正在檢查媒體變更…</string>
<string name="set_bar_action">自訂播放工具列動作</string>
<string name="set_notif_action">自訂通知動作</string>
<string name="set_behavior">動作</string>
<string name="set_content_desc">設定載入音樂和影像方式</string>
<string name="set_images">影像</string>
<string name="set_cover_mode_off">關閉</string>
<string name="set_audio_desc">配置聲音和回放行為</string>
<string name="set_playback">回放</string>
<string name="set_audio_desc">配置音訊與播放動作</string>
<string name="set_playback">播放</string>
<string name="set_replay_gain_mode_off">關閉</string>
<string name="set_replay_gain_mode_track">偏好的音軌</string>
<string name="lng_supporters_promo">捐贈此專案以將你的名字添加到此處!</string>
<string name="set_replay_gain_mode_track">偏好音軌</string>
<string name="lng_supporters_promo">贊助計畫並在此留下您的大名!</string>
<string name="set_headset_autoplay">耳機自動播放</string>
<string name="set_intelligent_sorting">智慧排序</string>
<string name="lng_empty_albums">你的專輯將顯示在這裡.</string>
<string name="set_square_covers">強制使用方形專輯封面</string>
<string name="lng_empty_albums">您的專輯將會顯示在這裡。</string>
<string name="set_square_covers">強制使用方形封面</string>
<string name="set_observing">自動重新載入</string>
<string name="set_separators">多參數分隔符</string>
<string name="lng_empty_songs">你的歌曲將顯示在這裡.</string>
<string name="lng_empty_artists">你的演出者將顯示在這裡.</string>
<string name="lng_empty_genres">你的類型將顯示在這裡.</string>
<string name="lng_empty_playlists">你的播放隊列將顯示在這裡.</string>
<string name="set_exclude_non_music_desc">忽略不是音訊的檔案比如博客</string>
<string name="lng_playlist_added">已添加到播放隊列</string>
<string name="lng_empty_songs">您的歌曲將會顯示在這裡。</string>
<string name="lng_empty_artists">您的演出者將會顯示在這裡。</string>
<string name="lng_empty_genres">您的類型將會顯示在這裡。</string>
<string name="lng_empty_playlists">您的播放清單將會顯示在這裡。</string>
<string name="set_exclude_non_music_desc">略過非音訊檔案,例如廣播服務</string>
<string name="lng_playlist_added">已新增至播放清單</string>
<string name="set_round_mode">圓角模式</string>
<string name="set_exclude_non_music">排除非音樂</string>
<string name="set_exclude_non_music">僅掃描音樂</string>
<string name="set_music">音樂</string>
<string name="set_personalize_desc">自定義使用者介面控制和行為</string>
<string name="set_lib_tabs_desc">更改媒體庫標籤的可見性和排序</string>
<string name="set_cover_mode_save_space">儲存空間</string>
<string name="set_remember_pause">記住暫停</string>
<string name="set_lib_tabs">媒體庫標籤</string>
<string name="set_ui_desc">更改應用程式的主題和顏色</string>
<string name="set_personalize_desc">自訂介面控制與動作</string>
<string name="set_lib_tabs_desc">變更媒體頁面顯示與排序</string>
<string name="set_cover_mode_save_space">節省空間</string>
<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>
<string name="fmt_lib_song_count">載入歌曲:%d</string>
<string name="fmt_indexing">正在載入您的媒體… (%1$d / %2$d)</string>
<string name="lbl_email">傳送電子郵件</string>
<string name="lbl_path_style_relative">相對</string>
<string name="lbl_eps">迷你專輯</string>
<string name="lbl_ep">迷你專輯</string>
<string name="lbl_ep_live">現場迷你專輯</string>
<string name="lbl_ep_remix">混音迷你專輯</string>
<string name="lbl_sort_direction">方向</string>
<string name="lbl_replaygain_track">重播增益音軌調整</string>
<string name="lbl_compilation_live">現場合輯</string>
<string name="set_rewind_prev_desc">移至上一首曲目前倒帶</string>
<string name="set_locations">音樂資料夾</string>
<string name="err_export_failed">無法將播放清單匯出至檔案</string>
<string name="err_bad_location">不支援這個資料夾</string>
<string name="desc_song_handle">移動歌曲</string>
<string name="desc_tab_handle">移動分頁</string>
<string name="desc_clear_search">清除搜尋紀錄</string>
<string name="desc_playlist_image">%s 的播放清單相片</string>
<string name="def_album_count">沒有專輯</string>
<string name="clr_deep_purple">深紫色</string>
<string name="clr_blue">藍色</string>
<string name="clr_deep_blue">深藍色</string>
<string name="clr_cyan">青色</string>
<string name="clr_teal">藍綠色</string>
<plurals name="fmt_artist_count">
<item quantity="other">%d 位演出者</item>
</plurals>
<string name="lbl_library_counts">媒體資料統計</string>
<string name="set_play_in_list_with">從媒體庫播放時</string>
<string name="set_play_in_parent_with">從項目資訊播放時</string>
<string name="set_play_song_none">播放顯示項目</string>
<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_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_square_covers_desc">將所有專輯封面裁剪為 1:1</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="err_no_app">找不到可處理這項操作的應用程式</string>
<string name="desc_remove_song">刪除歌曲</string>
<string name="desc_auxio_icon">Auxio 圖示</string>
<string name="def_track">沒有音軌</string>
<string name="def_playback">沒有正在播放的音樂</string>
<string name="clr_pink">粉色</string>
<string name="clr_yellow">黃色</string>
<string name="fmt_list">%1$s,%2$s</string>
<string name="fmt_lib_artist_count">載入演出者:%d</string>
<string name="fmt_lib_genre_count">載入類型:%d</string>
<string name="fmt_lib_total_duration">長度總計:%s</string>
<string name="set_replay_gain">音量標準化</string>
<string name="fmt_editing">正在編輯 %s</string>
<string name="def_song_count">沒有歌曲</string>
<string name="set_separators_plus">加號 (+)</string>
<string name="set_reindex">重新整理音樂</string>
<string name="desc_exit">停止播放</string>
<string name="set_replay_gain_mode_dynamic">僅單曲播放時偏向專輯</string>
<string name="clr_green">綠色</string>
<string name="clr_deep_green">深綠色</string>
<string name="clr_lime">草綠色</string>
<string name="lbl_compilation">合輯</string>
<string name="fmt_bitrate">%d kbps</string>
<string name="def_album">未知專輯</string>
<string name="cdc_aac">進階音訊編碼 (AAC)</string>
<string name="clr_orange">橘色</string>
<string name="clr_dynamic">動態</string>
<string name="clr_indigo">靛青色</string>
<string name="lbl_demo">試聽帶</string>
<string name="lbl_mixes">混音</string>
<string name="desc_skip_next">移至下一首</string>
<string name="desc_queue_bar">開啟佇列</string>
<string name="clr_grey">灰色</string>
<string name="lbl_replaygain_album">重播增益專輯調整</string>
<string name="desc_genre_image">%s 的類型相片</string>
<string name="fmt_lib_album_count">載入專輯:%d</string>
<string name="desc_skip_prev">移至上一首</string>
<string name="desc_no_cover">專輯封面</string>
<string name="err_index_failed">載入音樂失敗</string>
<string name="fmt_sample_rate">%d Hz</string>
<string name="fmt_deletion_info">要刪除 %s 嗎?這項動作無法復原。</string>
<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="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_selection">選取項目</string>
<string name="lbl_github">在 GitHub 張貼問題</string>
<string name="lbl_donate">贊助</string>
<string name="set_with_hidden">隱藏項目</string>
<string name="set_hide_collaborators">隱藏合作夥伴</string>
<string name="lng_tasker_start">以先前儲存的狀態啟動 Auxio。\n如果沒有可用存檔,將會立即隨機播放所有曲目。\n\n警告:請謹慎使用這項服務,停用後再次啟用可能會導致應用程式崩潰。</string>
<string name="set_rewind_prev">返回前倒帶</string>
<string name="set_repeat_pause">重播暫停</string>
<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="desc_selection_image">選取影像</string>
<string name="set_separators_warning">警告:啟用可能會誤判某些符號具有多重數值。您可在不需要的分隔符號前插入後斜線 (\\)。</string>
<string name="lbl_compilation_remix">混音合輯</string>
<string name="lbl_soundtracks">原聲帶</string>
<string name="lbl_soundtrack">原聲帶</string>
<string name="lbl_mixtapes">混音帶</string>
<string name="lbl_mixtape">混音帶</string>
<string name="lbl_demos">試聽帶</string>
<string name="lbl_author">作者</string>
<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_cover_mode_as_is">原始</string>
<string name="set_repeat_pause_desc">重播單曲時暫停</string>
<string name="set_pre_amp_without">不調整標籤</string>
<string name="set_pre_amp_warning">警告:變更前級擴大可能會導致某些音軌達到上限.</string>
<string name="set_library">媒體庫</string>
<string name="set_locations_desc">管理讀取音樂位置</string>
<string name="set_reindex_desc">盡可能透過標籤快取更新媒體</string>
<string name="set_rescan">重新掃描音樂</string>
<string name="err_import_failed">無法從檔案匯入播放清單</string>
<string name="desc_album_cover">%s 的專輯封面</string>
<string name="desc_artist_image">%s 的演出者相片</string>
<string name="def_artist">未知演出者</string>
<string name="def_genre">未知類型</string>
<string name="def_disc">沒有唱片</string>
<string name="cdc_mp3">MPEG-1</string>
<string name="cnt_mp4">MPEG-4 封裝 %s</string>
<string name="cdc_ogg">Ogg</string>
<string name="cdc_unknown">未知</string>
<string name="clr_red">紅色</string>
<string name="clr_brown">棕色</string>
<string name="fmt_selected">已選取 %d</string>
<string name="fmt_disc_no">唱片 %d</string>
<string name="fmt_def_playlist">播放清單 %d</string>
<string name="fmt_db_pos">+%.1f dB</string>
<string name="fmt_db_neg">-%.1f dB</string>
<string name="cdc_flac">自由無損音訊編碼 (FLAC)</string>
<string name="cdc_alac">Apple 無損音訊編碼 (ALAC)</string>
</resources>
+2
View File
@@ -14,11 +14,13 @@
<string name="set_key_rescan" translatable="false">auxio_rescan</string>
<string name="set_key_observing" translatable="false">auxio_observing</string>
<string name="set_key_music_dirs" translatable="false">auxio_music_dirs</string>
<string name="set_key_excluded_dirs" translatable="false">auxio_excluded_dirs</string>
<string name="set_key_cover_mode" translatable="false">auxio_cover_mode2</string>
<string name="set_key_square_covers" translatable="false">auxio_square_covers</string>
<string name="set_key_exclude_non_music" translatable="false">auxio_exclude_non_music</string>
<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_separators" translatable="false">auxio_separators</string>
<string name="set_key_auto_sort_names" translatable="false">auxio_auto_sort_names</string>
+2
View File
@@ -315,6 +315,8 @@
<string name="set_locations">Music folders</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_excluded_locations">Excluded folders</string>
<string name="set_excluded_locations_desc">Manage folders to exclude from music loading</string>
<string name="set_reindex">Refresh music</string>
<string name="set_reindex_desc">Reload the music library, using cached tags when possible</string>
<!-- Different from "Reload music" -->
@@ -33,6 +33,11 @@
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" />
<Preference
app:key="@string/set_key_reindex"
app:summary="@string/set_reindex_desc"
+1
View File
@@ -30,6 +30,7 @@ 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
@@ -6,8 +6,7 @@ Auxio е локален музикален плейър с бърз, надеж
- Snappy UI, извлечен от най-новите указания за Material Design
- Убеден UX, който дава приоритет на лекотата на използване пред крайните случаи
- Персонализирано поведение
- Поддръжка за номера на дискове, множество изпълнители, типове издания,
точни/оригинални дати, етикети за сортиране и др
- Поддръжка за номера на дискове, множество изпълнители, типове издания, точни/оригинални дати, етикети за сортиране и други
- Усъвършенствана система за изпълнители, която обединява изпълнители и изпълнители на албуми
- Управление на папки с SD карта
- Надеждна функционалност за плейлисти
@@ -22,4 +21,4 @@ Auxio е локален музикален плейър с бърз, надеж
- Автоматично пускане на слушалки
- Стилни джаджи, които автоматично се адаптират към техния размер
- Напълно частно и офлайн
- Без заоблени корици на албуми (по подразбиране)
- Без заоблени корици на албуми (ако ги искате)
@@ -0,0 +1,4 @@
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 fixes slower music loading and re-adds folder exclusion. Deep apologies for how long this took to fix.
For more information, see https://github.com/OxygenCobalt/Auxio/releases/tag/v4.0.5.
@@ -1,4 +1,4 @@
אוקסיו הוא נגן מוזיקה מקומי עם ממשק וחוויית משתמש מהיר ואמין, ובלי כל הפיצ'רים חסרי התועלת הרבים שנמצאים בנגני מוזיקה אחרים. בנוי על ספריות ניגון מדיה מודרניות, לאוקסיו יש תמיכה מיטבית בספריות ואיכות שמע נעלית בהשוואה ליישומים אחרים שמשתמשים בפונקציונליות אנדרואיד מיושנת. בקיצור, <b>הוא פשוט מנגן מוזיקה.</b>
אוקסיו הוא נגן מוזיקה מקומי עם ממשק וחוויית משתמש מהיר ואמין, ובלי כל הפיצ'רים חסרי התועלת הרבים שנמצאים בנגני מוזיקה אחרים. בנוי על ספריות ניגון מדיה מודרניות, לאוקסיו יש תמיכה מיטבית בספריות ואיכות שמע מקצועית בהשוואה ליישומים אחרים שמשתמשים בפונקציונליות אנדרואיד מיושנת. בקיצור, <b>הוא פשוט מנגן מוזיקה.</b>
<b>פיצ'רים</b>
@@ -1,25 +1,24 @@
Az Auxio egy helyi zenelejátszó gyors, megbízható felhasználói felülettel/UX-szel, anélkül, hogy a többi zenelejátszóban jelen lévő sok haszontalan funkciót tartalmazna. A modern médialejátszó könyvtárakra épülő Auxio kiváló könyvtártámogatással és zenehallgatási minőséggel rendelkezik, mint más, elavult Android-funkciókat használó alkalmazások. Röviden: <b>Zenét játszik.</b>
Az Auxio egy helyi zenelejátszó gyors, megbízható UI/UX felülettel, anélkül, hogy a többi zenelejátszóban előforduló sok felesleges funkcióval rendelkezne. Modern média lejátszó könyvtárakra építve, az Auxio kiváló könyvtámtámogatással és hallgatási minőséggel rendelkezik, összehasonlítva az elavult androidos funkciókat használó egyéb alkalmazásokkal. Röviden: <b>Zenét játszik le.</b>
<b>Funkciók</b>
- Lejátszás Media3 ExoPlayer alapú
- A legfrissebb anyagtervezési irányelvekből származó, lendületes felhasználói felület
- Véleményes UX, amely előnyben részesíti a könnyű használatot a szélső esetekben
- Lejátszás a Media3 ExoPlayer alapjain
- Gyors UI, amely a legújabb Material Design irányelvekből származik
- Szubjektív UX, amely a használhatóságot helyezi előtérbe a szélsőséges esetekkel szemben
- Testreszabható viselkedés
- Lemezszámok, több előadó, kiadástípusok támogatása,
pontos/eredeti dátumok, címkék rendezése stb
- Fejlett előadói rendszer, amely egyesíti az előadókat és az album előadókat
- SD-kártya-tudatos mappakezelés
- Támogatás a lemezszámokhoz, több előadóhoz, kiadási típusokhoz, pontos/eredeti dátumokhoz, rendezési címkékhez és még sok máshoz
- Fejlett előadói rendszer, amely egyesíti az előadókat és az albumelőadókat
- SD kártya-érzékeny mappa kezelés
- Megbízható lejátszási lista funkció
- Lejátszási állapot fennmaradása
- Android automatikus támogatás
- Automatikus hézagmentes lejátszás
- Teljes ReplayGain támogatás (MP3, FLAC, OGG, OPUS és MP4 fájlokon)
- Külső hangszínszabályzó támogatás (pl. Wavelet)
- Éltől szélig
- Lejátszási állapot megőrzése
- Android Auto támogatás
- Automatikus gapless lejátszás
- Teljes ReplayGain támogatás (MP3, FLAC, OGG, OPUS és MP4 fájlokhoz)
- Külső ekvalizátor támogatás (pl. Wavelet)
- Szélről-szélre
- Beágyazott borítók támogatása
- Keresés funkció
- Headset automatikus lejátszása
- Stílusos kütyük, amelyek automatikusan alkalmazkodnak a méretükhöz
- Keresési funkció
- Fejhallgató automatikus lejátszása
- Stílusos widgetek, amelyek automatikusan alkalmazkodnak a méretükhöz
- Teljesen privát és offline
- Nincsenek lekerekített albumborítók (alapértelmezés szerint)
- Nincsenek lekerekített albumborítók (ha nem szeretnél)
@@ -0,0 +1,24 @@
Auxio adalah pemutar musik lokal dengan antarmuka pengguna (UI/UX) yang cepat dan andal, tanpa fitur-fitur tidak berguna yang ada pada pemutar musik lainnya. Dibangun menggunakan pustaka pemutaran media modern, Auxio memiliki dukungan perpustakaan dan kualitas mendengarkan yang lebih unggul dibandingkan aplikasi lain yang menggunakan fungsionalitas Android yang sudah ketinggalan zaman. Singkatnya, <b>Ini memutar musik.</b>
<b>Fitur</b>
- Pemutaran berbasis Media3 ExoPlayer
- UI responsif yang mengikuti pedoman Material Design terbaru
- UX yang jelas dengan prioritas pada kemudahan penggunaan dibandingkan kasus-kasus ekstrim
- Perilaku yang dapat disesuaikan
- Dukungan untuk nomor disk, banyak artis, jenis rilisan, tanggal pasti/original, tag urut, dan lainnya
- Sistem artis canggih yang menyatukan artis dan artis album
- Manajemen folder yang peka terhadap kartu SD
- Fungsionalitas pemutaran daftar putar yang dapat diandalkan
- Persistensi status pemutaran
- Dukungan Android Auto
- Pemutaran tanpa jeda otomatis
- Dukungan penuh untuk ReplayGain (Pada file MP3, FLAC, OGG, OPUS, dan MP4)
- Dukungan equalizer eksternal (mis. Wavelet)
- Tampilan edge-to-edge
- Dukungan sampul yang tertanam
- Fungsionalitas pencarian
- Pemutaran otomatis dengan headset
- Widget bergaya yang secara otomatis menyesuaikan dengan ukuran mereka
- Sepenuhnya privat dan offline
- Tanpa sampul album bulat (jika Anda menginginkannya)
@@ -3,7 +3,7 @@ Auxio は、高速で信頼性の高い UI/UX を備えたローカル ミュー
<b>特徴</b>
- ExoPlayer ベースの再生
- 最新のマテリアル デザイン ガイドラインから派生したスナッピーな UI
- 最新のマテリアル・デザイン・ガイドラインに基づいたスマートなUI
- 特殊なケースよりも使いやすさを優先する独自の UX
- カスタマイズ可能な動作
- ディスク番号、複数のアーティスト、リリース タイプ、
@@ -19,4 +19,4 @@ Auxio は、高速で信頼性の高い UI/UX を備えたローカル ミュー
- ヘッドセットの自動再生
- サイズに自動的に適応するスタイリッシュなウィジェット
- 完全にプライベートでオフライン
- 丸みを帯びたアルバム カバーはありません (必要な場合を除きます。それならできます)
- 丸みを帯びたアルバム カバーはありません (お望みであれば)
@@ -21,4 +21,4 @@ exacte/originele data, sorteertags en meer
- Automatisch afspelen voor koptelefoon
- Stijlvolle widgets die zich automatisch aanpassen aan hun grootte
- Volledig privé en offline
- Geen afgeronde albumhoezen (standaard)
- Geen afgeronde albumhoezen (als u wilt)
@@ -2,23 +2,23 @@ Auxio é um reprodutor de música local com uma interface/experiência de usuár
<b>Recursos:</b>
- Reprodução baseada no Media3 ExoPlayer.
- Interface de usuário rápida derivada das últimas diretrizes do Material Design.
- Experiência de usuário opinativa que prioriza a facilidade de uso ao invés de priorizar situações incomuns.
- Comportamento customizável.
- Suporte a números de disco, vários artistas, tipos de lançamento, datas precisas/originais, metadados organizados e mais.
- Reprodução baseada no Media3 ExoPlayer
- Interface de usuário rápida derivada das últimas diretrizes do Material Design
- Experiência de usuário opinativa que prioriza a facilidade de uso ao invés de priorizar situações incomuns
- Comportamento customizável
- Suporte a números de disco, vários artistas, tipos de lançamento, datas precisas/originais, metadados organizados e mais
- Sistema de artistas avançado que unifica artistas e artistas de álbum.
- Gerenciamento de pastas com suporte a cartão SD.
- Funcionalidade confiável de criação de playlists.
- Persistência do estado de reprodução.
- Suporte ao Android Auto.
- Reprodução automática sem interrupções.
- Suporte completo a ReplayGain (nos arquivos FLAC, MP3, MP4, OGG e OPUS).
- Suporte externo a equalizador (por exemplo, Wavelet).
- De ponta a ponta.
- Suporte a capas embutidas.
- Função de pesquisa.
- Reprodução automática em fones de ouvido.
- Gerenciamento de pastas com suporte a cartão SD
- Funcionalidade confiável de criação de playlists
- Persistência do estado de reprodução
- Suporte ao Android Auto
- Reprodução automática sem interrupções
- Suporte completo a ReplayGain (nos arquivos FLAC, MP3, MP4, OGG e OPUS)
- Suporte externo a equalizador (por exemplo, Wavelet)
- De ponta a ponta
- Suporte a capas embutidas
- Função de pesquisa
- Reprodução automática em fones de ouvido
- Widgets elegantes que se adaptam automaticamente ao tamanho.
- Completamente privado e off-line.
- Sem capas de álbuns arredondadas (caso queira).
- Completamente privado e off-line
- Sem capas de álbuns arredondadas (caso queira)
@@ -1,23 +1,25 @@
Auxio 是一款本機音樂播放器,擁有快速且可靠的 UI/UX,不含其他音樂播放器中許多無用的功能。Auxio 基於現代媒體播放庫構建,與使用過時 Android 功能的其他應用相比,擁有更優越的庫支援和聆聽品質。簡而言之,<b>它播放音樂。</b>
Auxio 是一款本機音樂播放器,擁有快速穩定的 UI / UX,不含其他音樂播放器中許多無用的功能。
以現代媒體庫開發,和使用過時 Android 功能的其他播放器相比,擁有絕佳聆聽品質與核心支援。
總之,<b>它只專注播放音樂</b>。
<b>功能</b>
<b>特色</b>
- 基於 Media3 ExoPlayer 的播放功能
- 源自最新 Material Design 指南的靈敏 UI
- 優化 UX,重視易用性高於邊緣情況
- 可自訂的行為
- 支援碟數、多位藝術家、發行類型、精確/原始日期、排序標籤等等
- 進階藝術家系統,統一藝術家與專輯藝術家
- 支援 SD 卡的資料夾管理
- 可靠的播放列表功能
- Media3 ExoPlayer 為基礎的播放功能
- 遵循最新 Material Design 規範,時髦活潑的 UI
- 優化 UX,重視易用性而非極端需求
- 自訂動作
- 支援唱片編號、多位演出者、發行類型、精確 / 原始日期、標籤排序等
- 統一演出者與專輯演出者的進階系統
- SD 卡資料夾管理
- 可靠的播放清單功能
- 支援 Android Auto
- 播放狀態持久性
- 完整的 ReplayGain 支援(適用於 MP3、FLAC、OGG、OPUS 和 MP4 檔案)
- 外部均衡器支援(例如 Wavelet)
- 持續性播放狀態
- 完整 ReplayGain(適用 MP3、FLAC、OGG、OPUS 和 MP4 檔案)
- 外部等化器(例如 Wavelet)
- 無邊界設計
- 內嵌封面支援
- 內嵌專輯封面
- 搜尋功能
- 耳機自動播放
- 時尚的小工具,自動適應大小
- 完全私密且離線
- 默認不使用圓角專輯封面
- 時尚小工具,自動符合大小
- 完全離線隱密
- 預設無圓角專輯封面
+135
View File
@@ -0,0 +1,135 @@
# Musikr Architecture
## Overview
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 Components
### Pipeline 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
```
### Key Interfaces
- **Musikr** - Main entry point for the library
- **Storage** - Manages persistent storage needs
- **Library** - Represents the loaded music collection
- **MutableLibrary** - Modifiable version of the library
## Module Structure
### 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
### 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
### 3. Metadata (`metadata` package)
- **Metadata** - Extracted file metadata
- **MetadataExtractor** - Extracts metadata using TagLib
- **TagLibJNI** - JNI bridge to native TagLib library
### 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
### 5. Model (`model` package)
- **LibraryImpl** - Implementation of the music library
- **SongImpl**, **AlbumImpl**, **ArtistImpl**, **GenreImpl** - Music entity implementations
- **LibraryFactory** - Creates library instances from pipeline data
### 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
### 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
```
## Threading Model
Musikr uses Kotlin Coroutines for concurrent processing:
- 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
+4
View File
@@ -4,6 +4,7 @@ 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"
@@ -62,6 +63,8 @@ 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"
@@ -78,6 +81,7 @@ dependencies {
testImplementation "io.mockk:mockk:1.13.7"
testImplementation "org.robolectric:robolectric:4.11"
testImplementation 'androidx.test:core-ktx:1.6.1'
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlin_coroutines_version"
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
+90
View File
@@ -0,0 +1,90 @@
# 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,10 +21,15 @@ 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.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>)
/** Side-effect laden [Storage] for use during music loading and [MutableLibrary] operation. */
data class Storage(
/**
@@ -45,7 +50,10 @@ data class Storage(
* be used during music loading and mutated when creating, renaming, or deleting playlists in
* the library.
*/
val storedPlaylists: StoredPlaylists
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. */
@@ -19,13 +19,13 @@
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
import kotlinx.coroutines.flow.onCompletion
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.onStart
import org.oxycblt.musikr.fs.MusicLocation
import org.oxycblt.musikr.pipeline.EvaluateStep
import org.oxycblt.musikr.pipeline.ExploreStep
import org.oxycblt.musikr.pipeline.ExtractStep
@@ -47,13 +47,13 @@ interface Musikr {
/**
* Start loading music from the given [locations] and the configuration provided earlier.
*
* @param locations The [MusicLocation]s to search for music in.
* @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(
locations: List<MusicLocation>,
query: Query,
onProgress: suspend (IndexingProgress) -> Unit = {}
): LibraryResult
@@ -70,6 +70,7 @@ interface Musikr {
*/
fun new(context: Context, storage: Storage, interpretation: Interpretation): Musikr =
MusikrImpl(
context,
storage,
ExploreStep.from(context, storage, interpretation),
ExtractStep.from(context, storage),
@@ -96,7 +97,7 @@ sealed interface IndexingProgress {
/**
* Currently indexing and extracting tags from device music.
*
* @param explored The amount of music currently found from the given [MusicLocation]s.
* @param explored The amount of music currently found from the given [Query].
* @param loaded The amount of music that has had metadata extracted and parsed.
*/
data class Songs(val loaded: Int, val explored: Int) : IndexingProgress
@@ -110,32 +111,35 @@ sealed interface IndexingProgress {
}
private class MusikrImpl(
private val context: Context,
private val storage: Storage,
private val exploreStep: ExploreStep,
private val extractStep: ExtractStep,
private val evaluateStep: EvaluateStep
) : Musikr {
override suspend fun run(
locations: List<MusicLocation>,
onProgress: suspend (IndexingProgress) -> Unit
) = coroutineScope {
var exploredCount = 0
var extractedCount = 0
val explored =
exploreStep
.explore(locations)
.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(storage, library)
}
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)
}
}
private class LibraryResultImpl(
@@ -55,6 +55,8 @@ internal abstract class CacheDatabase : RoomDatabase() {
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>
}
@Dao
+15 -1
View File
@@ -19,6 +19,8 @@
package org.oxycblt.musikr.cache.db
import android.content.Context
import android.net.Uri
import kotlinx.coroutines.sync.Mutex
import org.oxycblt.musikr.cache.Cache
import org.oxycblt.musikr.cache.CacheResult
import org.oxycblt.musikr.cache.CachedSong
@@ -33,8 +35,20 @@ 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()
override suspend fun read(file: DeviceFile): CacheResult {
val dbSong = readDao.selectSong(file.uri.toString()) ?: return CacheResult.Miss(file)
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)
if (dbSong.modifiedMs != file.modifiedMs) {
return CacheResult.Stale(file, dbSong.addedMs)
}
@@ -0,0 +1,74 @@
# 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
@@ -25,6 +25,9 @@ import android.os.ParcelFileDescriptor
import androidx.core.net.toUri
import java.io.InputStream
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.filterIsInstance
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.withContext
import org.oxycblt.musikr.covers.Cover
import org.oxycblt.musikr.covers.CoverResult
@@ -96,11 +99,12 @@ class MutableFSCovers(private val context: Context) : MutableCovers<FDCover> {
override suspend fun create(file: DeviceFile, metadata: Metadata): CoverResult<FDCover> {
// Since DeviceFiles is a streaming API, we have to wait for the current recursive
// query to finally finish to be able to have a complete list of siblings to search for.
val parent = file.parent.await()
val parent = file.parent
val bestCover =
parent.children
.filterIsInstance<DeviceFile>()
.map { it to coverArtScore(it) }
.toList()
.maxBy { it.second }
if (bestCover.second > 0) {
return CoverResult.Hit(FolderCoverImpl(context, bestCover.first.uri))
@@ -128,7 +132,7 @@ class MutableFSCovers(private val context: Context) : MutableCovers<FDCover> {
// See if the name contains any of the preferred cover names. This helps weed out
// images that are not actually cover art and are just there.,
var score =
(preferredCoverNames + requireNotNull(file.parent.await().path.name))
(preferredCoverNames + requireNotNull(file.parent.path.name))
.withIndex()
.filter { name.contains(it.value, ignoreCase = true) }
.sumOf { it.index + 1 }
@@ -0,0 +1,76 @@
/*
* Copyright (c) 2024 Auxio Project
* Location.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.musikr.fs
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.provider.DocumentsContract
import org.oxycblt.musikr.fs.device.contentResolverSafe
import org.oxycblt.musikr.fs.path.DocumentPathFactory
sealed class Location(val uri: Uri, val path: Path) {
override fun equals(other: Any?) = other is Location && uri == other.uri
override fun hashCode() = 31 * uri.hashCode()
override fun toString(): String = uri.toString()
class Unopened private constructor(uri: Uri, path: Path) : Location(uri, path) {
fun open(context: Context): Opened? {
if (isUnopened(context, uri)) {
try {
context.contentResolverSafe.takePersistableUriPermission(
uri,
Intent.FLAG_GRANT_READ_URI_PERMISSION or
Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
} catch (e: Exception) {
// Not fully sure what happens if I'm disallowed to take the permission,
// check for both circumstances (error or no-op)
return null
}
if (isUnopened(context, uri)) {
return null
}
}
return Opened(uri, path)
}
private fun isUnopened(context: Context, uri: Uri) =
context.contentResolverSafe.persistedUriPermissions.none {
it.uri == uri && it.isReadPermission && it.isWritePermission
}
companion object {
fun from(context: Context, uri: Uri): Unopened? {
if (!DocumentsContract.isTreeUri(uri)) return null
val documentPathFactory = DocumentPathFactory.from(context)
val path = documentPathFactory.unpackDocumentTreeUri(uri) ?: return null
return Unopened(uri, path)
}
}
}
class Opened internal constructor(uri: Uri, path: Path) : Location(uri, path) {
override fun equals(other: Any?) = other is Opened && uri == other.uri && path == other.path
override fun hashCode() = 31 * uri.hashCode() + path.hashCode()
}
}
@@ -1,72 +0,0 @@
/*
* Copyright (c) 2024 Auxio Project
* MusicLocation.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.musikr.fs
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.provider.DocumentsContract
import org.oxycblt.musikr.fs.device.contentResolverSafe
import org.oxycblt.musikr.fs.path.DocumentPathFactory
import org.oxycblt.musikr.util.splitEscaped
class MusicLocation private constructor(val uri: Uri, val path: Path) {
override fun equals(other: Any?) = other is MusicLocation && uri == other.uri
override fun hashCode() = 31 * uri.hashCode()
override fun toString(): String = uri.toString()
companion object {
fun new(context: Context, uri: Uri): MusicLocation? {
if (!DocumentsContract.isTreeUri(uri)) return null
val documentPathFactory = DocumentPathFactory.from(context)
val path = documentPathFactory.unpackDocumentTreeUri(uri) ?: return null
val notPersisted =
context.contentResolverSafe.persistedUriPermissions.none {
it.uri == uri && it.isReadPermission && it.isWritePermission
}
if (notPersisted) {
context.contentResolverSafe.takePersistableUriPermission(
uri,
Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
}
return MusicLocation(uri, path)
}
fun existing(context: Context, uri: Uri): MusicLocation? {
val documentPathFactory = DocumentPathFactory.from(context)
if (!DocumentsContract.isTreeUri(uri)) return null
val notPersisted =
context.contentResolverSafe.persistedUriPermissions.none {
it.uri == uri && it.isReadPermission && it.isWritePermission
}
if (notPersisted) return null
val path = documentPathFactory.unpackDocumentTreeUri(uri) ?: return null
return MusicLocation(uri, path)
}
fun toString(list: List<MusicLocation>) =
list.joinToString(";") { it.uri.toString().replace(";", "\\;") }
fun existing(context: Context, string: String): List<MusicLocation> {
return string.splitEscaped { it == ';' }.mapNotNull { existing(context, Uri.parse(it)) }
}
}
}
@@ -0,0 +1,72 @@
# Filesystem Package
## Overview
The filesystem package provides abstraction layers for accessing music files on Android devices. It handles the complexities of the Storage Access Framework (SAF) and provides efficient caching mechanisms.
## Key Components
### Core Types
**Location.Opened** (`Location.Opened.kt`)
- Represents a location to search for music
- Can be a device storage location or content URI
**Path** (`Path.kt`)
- Abstract representation of a file path
- Handles both traditional file paths and content URIs
**Format** (`Format.kt`)
- Represents file formats and their properties
- Maps MIME types to file extensions
### Device Access
**DeviceFS** (`DeviceFS.kt`)
- Provides access to device storage
- Handles SAF permissions and access
- Performs filesystem traversal
**DeviceFSEntries** (`DeviceFSEntries.kt`)
- Represents filesystem entries (files and directories)
- Provides metadata about filesystem items
**DeviceFile** (in `DeviceFSEntries.kt`)
- Represents a music file on the device
- Contains file metadata needed for processing
### Caching
**FileTreeCache** (`FileTreeCache.kt`)
- Caches filesystem structure for faster indexing
- Provides incremental updates to avoid full rescans
### Path Interpretation
**Path Package** (`path/` directory)
- **DocumentPathFactory** - Creates paths from document URIs
- **MediaStorePathInterpreter** - Interprets MediaStore paths
- **VolumeManager** - Manages storage volumes
## Usage Flow
1. User provides `Location.Opened`s to scan
2. `DeviceFS` traverses these locations
3. `FileTreeCache` optimizes subsequent scans
4. Discovered files are passed to the pipeline for processing
## Key Features
- **Storage Access Framework** integration for modern Android storage access
- **Incremental scanning** to minimize resource usage
- **Path abstraction** to handle different Android storage mechanisms
- **Volume mapping** to resolve relative paths
## Extension Points
When extending the filesystem functionality:
1. For new storage types, implement appropriate Path implementations
2. For performance improvements, consider optimizing the FileTreeCache
3. For new file formats, update the Format class
4. For custom traversal strategies, extend DeviceFS
@@ -22,20 +22,33 @@ import android.content.ContentResolver
import android.content.Context
import android.net.Uri
import android.provider.DocumentsContract
import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.ExperimentalCoroutinesApi
import android.util.Log
import androidx.core.net.toUri
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.asFlow
import kotlinx.coroutines.flow.emitAll
import kotlinx.coroutines.flow.flatMapMerge
import kotlinx.coroutines.flow.flattenMerge
import kotlinx.coroutines.flow.emptyFlow
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.flow
import org.oxycblt.musikr.fs.MusicLocation
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapNotNull
import kotlinx.coroutines.flow.merge
import kotlinx.coroutines.flow.shareIn
import kotlinx.coroutines.flow.takeWhile
import kotlinx.coroutines.flow.transform
import org.oxycblt.musikr.Query
import org.oxycblt.musikr.fs.Location
import org.oxycblt.musikr.fs.Location.Opened
import org.oxycblt.musikr.fs.Path
internal interface DeviceFS {
fun explore(locations: Flow<MusicLocation>): Flow<DeviceFile>
fun explore(query: Query, fileTree: FileTree): Flow<DeviceDirectory>
companion object {
fun from(context: Context, withHidden: Boolean): DeviceFS =
@@ -43,101 +56,246 @@ internal interface DeviceFS {
}
}
sealed interface DeviceNode {
val uri: Uri
val path: Path
}
data class DeviceDirectory(
override val uri: Uri,
override val path: Path,
val parent: Deferred<DeviceDirectory>?,
var children: List<DeviceNode>
) : DeviceNode
data class DeviceFile(
override val uri: Uri,
override val path: Path,
val modifiedMs: Long,
val mimeType: String,
val size: Long,
val parent: Deferred<DeviceDirectory>
) : DeviceNode
@OptIn(ExperimentalCoroutinesApi::class)
private class DeviceFSImpl(
private val contentResolver: ContentResolver,
private val withHidden: Boolean
) : DeviceFS {
override fun explore(locations: Flow<MusicLocation>): Flow<DeviceFile> =
locations.flatMapMerge { location ->
exploreDirectoryImpl(
location.uri,
DocumentsContract.getTreeDocumentId(location.uri),
location.path,
null)
private val explorationScope = CoroutineScope(Dispatchers.IO + SupervisorJob())
override fun explore(query: Query, fileTree: FileTree) =
query.source.asFlow().mapNotNull { location ->
queryRoot(location, fileTree, query.exclude)
}
private fun exploreDirectoryImpl(
private suspend fun queryRoot(
location: Location.Opened,
fileTree: FileTree,
exclude: List<Location>
): DeviceDirectory? {
val treeDocumentId = DocumentsContract.getTreeDocumentId(location.uri)
val uri = DocumentsContract.buildDocumentUriUsingTree(location.uri, treeDocumentId)
val modifiedMs =
contentResolver.useQuery(
uri, arrayOf(DocumentsContract.Document.COLUMN_LAST_MODIFIED)) { cursor ->
if (!cursor.moveToFirst()) return@useQuery null
val lastModifiedIndex =
cursor.getColumnIndexOrThrow(
DocumentsContract.Document.COLUMN_LAST_MODIFIED)
cursor.getLong(lastModifiedIndex)
}
if (modifiedMs == null) {
return null
}
return query(
location.uri, treeDocumentId, location.path, modifiedMs, null, fileTree, exclude)
}
private suspend fun query(
rootUri: Uri,
treeDocumentId: String,
relativePath: Path,
parent: Deferred<DeviceDirectory>?
): Flow<DeviceFile> = flow {
// Make a kotlin future
val uri = DocumentsContract.buildChildDocumentsUriUsingTree(rootUri, treeDocumentId)
val directoryDeferred = CompletableDeferred<DeviceDirectory>()
val recursive = mutableListOf<Flow<DeviceFile>>()
val children = mutableListOf<DeviceNode>()
contentResolver.useQuery(uri, PROJECTION) { cursor ->
val childUriIndex =
cursor.getColumnIndexOrThrow(DocumentsContract.Document.COLUMN_DOCUMENT_ID)
val displayNameIndex =
cursor.getColumnIndexOrThrow(DocumentsContract.Document.COLUMN_DISPLAY_NAME)
val mimeTypeIndex =
cursor.getColumnIndexOrThrow(DocumentsContract.Document.COLUMN_MIME_TYPE)
val sizeIndex = cursor.getColumnIndexOrThrow(DocumentsContract.Document.COLUMN_SIZE)
val lastModifiedIndex =
cursor.getColumnIndexOrThrow(DocumentsContract.Document.COLUMN_LAST_MODIFIED)
while (cursor.moveToNext()) {
val childId = cursor.getString(childUriIndex)
val displayName = cursor.getString(displayNameIndex)
// Skip hidden files/directories if ignoreHidden is true
if (!withHidden && displayName.startsWith(".")) {
continue
}
val newPath = relativePath.file(displayName)
val mimeType = cursor.getString(mimeTypeIndex)
val lastModified = cursor.getLong(lastModifiedIndex)
if (mimeType == DocumentsContract.Document.MIME_TYPE_DIR) {
recursive.add(
exploreDirectoryImpl(rootUri, childId, newPath, directoryDeferred))
} else {
val size = cursor.getLong(sizeIndex)
val childUri = DocumentsContract.buildDocumentUriUsingTree(rootUri, childId)
val file =
DeviceFile(
uri = childUri,
mimeType = mimeType,
path = newPath,
size = size,
modifiedMs = lastModified,
parent = directoryDeferred)
children.add(file)
emit(file)
}
}
directoryDeferred.complete(DeviceDirectory(uri, relativePath, parent, children))
emitAll(recursive.asFlow().flattenMerge())
path: Path,
modifiedMs: Long,
parent: DeviceDirectory?,
fileTree: FileTree,
exclude: List<Location>
): DeviceDirectory = coroutineScope {
val uri = DocumentsContract.buildDocumentUriUsingTree(rootUri, treeDocumentId)
val cached = fileTree.queryDirectory(uri)
if (cached != null && cached.modifiedMs == modifiedMs) {
return@coroutineScope hydrateCached(
cached = cached, parentDir = parent, path = path, fileTree = fileTree, exclude)
}
val dir =
DeviceDirectoryImpl(
uri = uri,
path = path,
modifiedMs = modifiedMs,
parent = parent,
children = emptyFlow())
dir.children =
flow {
Log.d("DeviceFS", "Querying $uri")
contentResolver.useQuery(
DocumentsContract.buildChildDocumentsUriUsingTree(
rootUri,
treeDocumentId,
),
projection = PROJECTION,
sortOrder = "${DocumentsContract.Document.COLUMN_DISPLAY_NAME} DESC") {
cursor ->
val childUriIndex =
cursor.getColumnIndexOrThrow(
DocumentsContract.Document.COLUMN_DOCUMENT_ID)
val displayNameIndex =
cursor.getColumnIndexOrThrow(
DocumentsContract.Document.COLUMN_DISPLAY_NAME)
val mimeTypeIndex =
cursor.getColumnIndexOrThrow(
DocumentsContract.Document.COLUMN_MIME_TYPE)
val sizeIndex =
cursor.getColumnIndexOrThrow(DocumentsContract.Document.COLUMN_SIZE)
val lastModifiedIndex =
cursor.getColumnIndexOrThrow(
DocumentsContract.Document.COLUMN_LAST_MODIFIED)
val childSubdirUris = mutableListOf<String>()
val childFileUris = mutableListOf<String>()
val subqueries = mutableListOf<DeviceDirectory>()
while (cursor.moveToNext()) {
val childId = cursor.getString(childUriIndex)
val displayName = cursor.getString(displayNameIndex)
// Skip hidden files/directories if ignoreHidden is true
if (!withHidden && displayName.startsWith(".")) {
continue
}
val newPath = path.file(displayName)
val mimeType = cursor.getString(mimeTypeIndex)
val lastModified = cursor.getLong(lastModifiedIndex)
if (mimeType == DocumentsContract.Document.MIME_TYPE_DIR) {
// Check if this directory should be excluded
val shouldExclude =
exclude.any { excluded ->
// Check if the current path matches the excluded path
// exactly
excluded.path.volume == newPath.volume &&
excluded.path.components == newPath.components
}
if (shouldExclude) {
continue
}
val subdir =
query(
rootUri = rootUri,
treeDocumentId = childId,
path = newPath,
modifiedMs = modifiedMs,
parent = dir,
fileTree = fileTree,
exclude = exclude)
childSubdirUris.add(subdir.uri.toString())
emit(StreamedFile.More(subdir))
} else {
Log.d("DeviceFS", "Querying file $childId")
val size = cursor.getLong(sizeIndex)
val childUri =
DocumentsContract.buildDocumentUriUsingTree(
rootUri, childId)
val file =
DeviceFile(
uri = childUri,
mimeType = mimeType,
path = newPath,
size = size,
modifiedMs = lastModified,
parent = dir)
val write =
CachedFile(
uri = childUri.toString(),
name = displayName,
modifiedMs = lastModified,
mimeType = mimeType,
size = size)
fileTree.updateFile(childUri, write)
childFileUris.add(childUri.toString())
emit(StreamedFile.More(file))
}
}
val writeDir =
CachedDirectory(
uri = uri.toString(),
name = requireNotNull(path.name),
modifiedMs = modifiedMs,
subdirUris = childSubdirUris,
fileUris = childFileUris)
fileTree.updateDirectory(uri, writeDir)
emit(StreamedFile.Done)
}
}
.shareIn(explorationScope, SharingStarted.Lazily, replay = Int.MAX_VALUE)
.takeWhile { it is StreamedFile.More }
.map { (it as StreamedFile.More).value }
dir
}
private suspend fun hydrateCached(
cached: CachedDirectory,
parentDir: DeviceDirectory?,
path: Path,
fileTree: FileTree,
exclude: List<Location>
): DeviceDirectory = coroutineScope {
val dir =
DeviceDirectoryImpl(
uri = cached.uri.toUri(),
path = path,
modifiedMs = cached.modifiedMs,
parent = parentDir,
children = emptyFlow())
dir.children =
flow {
emitAll(
merge(
cached.subdirUris
.asFlow()
.transform { subdirUriString ->
val subdirUri = subdirUriString.toUri()
val cachedSubdir =
requireNotNull(fileTree.queryDirectory(subdirUri)) {
"No cached subdir for $subdirUri, malformed cache! Rescan needed."
}
val subdirPath = dir.path.file(cachedSubdir.name)
val shouldExclude =
exclude.any { excluded ->
excluded.path.volume == subdirPath.volume &&
excluded.path.components ==
subdirPath.components
}
if (shouldExclude) {
return@transform
}
emit(
hydrateCached(
cachedSubdir, dir, subdirPath, fileTree, exclude))
}
.filterNotNull(),
cached.fileUris.asFlow().map {
val cachedFile = requireNotNull(fileTree.queryFile(it.toUri()))
DeviceFile(
uri = it.toUri(),
path = dir.path.file(cachedFile.name),
modifiedMs = cachedFile.modifiedMs,
mimeType = cachedFile.mimeType,
size = cachedFile.size,
parent = dir)
})
.map { StreamedFile.More(it) })
emit(StreamedFile.Done)
}
.flowOn(Dispatchers.IO)
.shareIn(explorationScope, SharingStarted.Lazily, replay = Int.MAX_VALUE)
.takeWhile { it is StreamedFile.More }
.map { (it as StreamedFile.More).value }
dir
}
private sealed interface StreamedFile {
data class More(val value: DeviceFSEntry) : StreamedFile
data object Done : StreamedFile
}
private companion object {
val PROJECTION =
private val PROJECTION =
arrayOf(
DocumentsContract.Document.COLUMN_DOCUMENT_ID,
DocumentsContract.Document.COLUMN_DISPLAY_NAME,
@@ -146,3 +304,11 @@ private class DeviceFSImpl(
DocumentsContract.Document.COLUMN_LAST_MODIFIED)
}
}
private class DeviceDirectoryImpl(
override val uri: Uri,
override val path: Path,
override val modifiedMs: Long,
override val parent: DeviceDirectory?,
override var children: Flow<DeviceFSEntry>,
) : DeviceDirectory
@@ -0,0 +1,53 @@
/*
* Copyright (c) 2025 Auxio Project
* DeviceFSEntries.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.musikr.fs.device
import android.net.Uri
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.emitAll
import kotlinx.coroutines.flow.transform
import org.oxycblt.musikr.fs.Path
sealed interface DeviceFSEntry {
val uri: Uri
val path: Path
val modifiedMs: Long
}
interface DeviceDirectory : DeviceFSEntry {
val parent: DeviceDirectory?
val children: Flow<DeviceFSEntry>
}
data class DeviceFile(
override val uri: Uri,
override val path: Path,
override val modifiedMs: Long,
val mimeType: String,
val size: Long,
val parent: DeviceDirectory
) : DeviceFSEntry
fun DeviceDirectory.flatten(): Flow<DeviceFile> =
children.transform {
when (it) {
is DeviceDirectory -> emitAll(it.flatten())
is DeviceFile -> emit(it)
}
}
@@ -0,0 +1,165 @@
/*
* Copyright (c) 2024 Auxio Project
* FileTreeCache.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.musikr.fs.device
import android.content.Context
import android.net.Uri
import android.util.Log
import java.io.File
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import kotlinx.serialization.Serializable
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
interface FileTreeCache {
fun read(): FileTree
companion object {
fun from(context: Context): FileTreeCache = FileTreeCacheImpl(context)
}
}
interface FileTree {
suspend fun queryDirectory(uri: Uri): CachedDirectory?
suspend fun updateDirectory(uri: Uri, directory: CachedDirectory)
suspend fun queryFile(uri: Uri): CachedFile?
suspend fun updateFile(uri: Uri, file: CachedFile)
suspend fun write()
}
// Define the sealed interface
@Serializable
private sealed interface FileSystemEntry {
val uri: String
val modifiedMs: Long
}
@Serializable
data class CachedDirectory(
override val uri: String,
val name: String,
override val modifiedMs: Long,
val subdirUris: List<String>,
val fileUris: List<String>
) : FileSystemEntry
@Serializable
data class CachedFile(
override val uri: String,
val name: String,
override val modifiedMs: Long,
val mimeType: String,
val size: Long
) : FileSystemEntry
@Serializable
private data class FileTreeData(
val directories: Map<String, CachedDirectory> = mapOf(),
val files: Map<String, CachedFile> = mapOf()
)
private class FileTreeCacheImpl(private val context: Context) : FileTreeCache {
companion object {
private const val CACHE_FILENAME = "file_tree_cache.json"
private val json = Json {
ignoreUnknownKeys = true
prettyPrint = true
}
}
override fun read(): FileTree {
val cacheFile = File(context.cacheDir, CACHE_FILENAME)
return if (cacheFile.exists()) {
try {
val jsonContent = cacheFile.readText()
val fileTreeCache = json.decodeFromString<FileTreeData>(jsonContent)
FileTreeImpl(
context,
fileTreeCache.directories.toMutableMap(),
fileTreeCache.files.toMutableMap())
} catch (e: Exception) {
FileTreeImpl(context, mutableMapOf(), mutableMapOf())
}
} else {
FileTreeImpl(context, mutableMapOf(), mutableMapOf())
}
}
}
private class FileTreeImpl(
private val context: Context,
private val mutableDirectories: MutableMap<String, CachedDirectory> = mutableMapOf(),
private val mutableFiles: MutableMap<String, CachedFile> = mutableMapOf()
) : FileTree {
companion object {
private const val TAG = "FileTree"
private const val CACHE_FILENAME = "file_tree_cache.json"
private val json = Json {
ignoreUnknownKeys = true
prettyPrint = true
}
}
// Directory operations
override suspend fun queryDirectory(uri: Uri): CachedDirectory? {
val uriString = uri.toString()
return mutableDirectories[uriString]
}
override suspend fun updateDirectory(uri: Uri, directory: CachedDirectory) {
val uriString = uri.toString()
mutableDirectories[uriString] = directory
}
// File operations
override suspend fun queryFile(uri: Uri): CachedFile? {
val uriString = uri.toString()
return mutableFiles[uriString]
}
override suspend fun updateFile(uri: Uri, file: CachedFile) {
val uriString = uri.toString()
mutableFiles[uriString] = file
}
override suspend fun write() =
withContext(Dispatchers.IO) {
Log.d(TAG, "Writing cache to disk")
val cacheFile = File(context.cacheDir, CACHE_FILENAME)
try {
val fileTreeCache =
FileTreeData(
directories = mutableDirectories.toMap(), files = mutableFiles.toMap())
val jsonContent = json.encodeToString(fileTreeCache)
cacheFile.writeText(jsonContent)
Log.d(TAG, "Successfully wrote cache to disk")
} catch (e: Exception) {
Log.e(TAG, "Failed to write cache file", e)
}
Unit
}
}
@@ -46,8 +46,12 @@ internal fun ContentResolver.safeQuery(
uri: Uri,
projection: Array<out String>,
selector: String? = null,
args: Array<String>? = null
) = requireNotNull(query(uri, projection, selector, args, null)) { "ContentResolver query failed" }
args: Array<String>? = null,
sortOrder: String? = null
) =
requireNotNull(query(uri, projection, selector, args, sortOrder)) {
"ContentResolver query failed"
}
/**
* A shortcut for [safeQuery] with [use] applied, automatically cleaning up the [Cursor]'s resources
@@ -68,5 +72,6 @@ internal inline fun <reified R> ContentResolver.useQuery(
projection: Array<out String>,
selector: String? = null,
args: Array<String>? = null,
sortOrder: String? = null,
block: (Cursor) -> R
) = safeQuery(uri, projection, selector, args).use(block)
) = safeQuery(uri, projection, selector, args, sortOrder).use(block)
@@ -0,0 +1,64 @@
# Metadata Package
## Overview
The metadata package provides the native bridge to TagLib and handles extraction of metadata from music files. This is a critical component that enables accurate and comprehensive tag parsing.
## Key Components
### JNI Interface
**TagLibJNI** (`TagLibJNI.kt`)
- Loads the native library
- Provides JNI methods for interacting with TagLib
- Handles native memory management
**NativeTagMap** (`NativeTagMap.kt`)
- Maps between native C++ and Java tag structures
- Provides type conversion utilities
**NativeInputStream** (`NativeInputStream.kt`)
- Provides a stream interface for TagLib to read file data
- Bridges between Java I/O and native code
### Metadata Extraction
**MetadataExtractor** (`MetadataExtractor.kt`)
- Extracts metadata from music files using TagLib
- Handles error cases and format-specific extractions
- Manages native resource lifecycle
**Metadata** (`Metadata.kt`)
- Container for extracted audio metadata
- Includes both tags and audio properties
**Properties** (part of `Metadata.kt`)
- Audio-specific properties like duration, sample rate, etc.
- Format-specific information
## Native Implementation
The C++ side of the metadata extraction is implemented in the `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
## Usage Flow
1. File is discovered in the exploration step
2. MetadataExtractor is called with the file
3. NativeInputStream provides file access to TagLib
4. TagLib parses the file's metadata
5. JMetadataBuilder converts TagLib structures to Java objects
6. Metadata object is returned to the pipeline
## Extension Points
When extending the metadata functionality:
1. For new tag formats, extend the native JNI code in `taglib_jni.cpp`
2. For new metadata fields, add them to both Java and native interfaces
3. For performance improvements, consider caching strategies in MetadataExtractor
4. Always ensure proper resource management with native code
@@ -0,0 +1,79 @@
# Model Package
## Overview
The model package implements the core music entity model for Musikr. It provides the structures that represent songs, albums, artists, genres, and playlists, as well as their relationships.
## Key Components
### Core Interfaces
These interfaces are defined in the parent package (`org.oxycblt.musikr`) and implemented in the model package:
- **Library** - Read-only representation of the music library
- **MutableLibrary** - Modifiable version of the library
- **Song** - Represents a music track
- **Album** - Represents an album
- **Artist** - Represents an artist
- **Genre** - Represents a music genre
- **Playlist** - Represents a playlist
### Implementations
**LibraryImpl** (`LibraryImpl.kt`)
- Implementation of the Library and MutableLibrary interfaces
- Manages collections of songs, albums, artists, genres, and playlists
- Provides search and lookup functionality
**SongImpl** (`SongImpl.kt`)
- Implementation of the Song interface
- Contains metadata, file information, and relationships
**AlbumImpl** (`AlbumImpl.kt`)
- Implementation of the Album interface
- Contains songs, artists, and album metadata
**ArtistImpl** (`ArtistImpl.kt`)
- Implementation of the Artist interface
- Contains songs, albums, and artist metadata
**GenreImpl** (`GenreImpl.kt`)
- Implementation of the Genre interface
- Contains songs and genre metadata
**PlaylistImpl** (`PlaylistImpl.kt`)
- Implementation of the Playlist interface
- Contains ordered songs and playlist metadata
### Factory
**LibraryFactory** (`LibraryFactory.kt`)
- Creates library instances from pipeline data
- Builds the entity relationships
- Resolves duplicates and conflicts
## Entity Relationships
The music model implements a graph structure with these relationships:
- Songs belong to albums, artists, and genres
- Albums belong to artists
- Artists have songs and albums
- Genres have songs
- Playlists have songs
## Key Features
- **Identity resolution** - Properly identifies and merges duplicate entities
- **Relationship building** - Creates the connections between entities
- **Immutable interfaces** - Provides read-only access for safety
- **Mutable implementation** - Allows controlled modifications
## Extension Points
When extending the model:
1. For new entity types, create new interfaces and implementations
2. For new relationships, update the appropriate entities and LibraryFactory
3. For performance improvements, consider optimizing the graph structure
4. For custom sorting or grouping, extend the LibraryImpl functionality
@@ -20,17 +20,21 @@ package org.oxycblt.musikr.pipeline
import android.content.Context
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.asFlow
import kotlinx.coroutines.flow.buffer
import kotlinx.coroutines.flow.emitAll
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.flatMapMerge
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.merge
import kotlinx.coroutines.flow.onCompletion
import org.oxycblt.musikr.Interpretation
import org.oxycblt.musikr.Query
import org.oxycblt.musikr.Storage
import org.oxycblt.musikr.cache.Cache
import org.oxycblt.musikr.cache.CacheResult
@@ -38,20 +42,22 @@ import org.oxycblt.musikr.cache.CachedSong
import org.oxycblt.musikr.covers.Cover
import org.oxycblt.musikr.covers.CoverResult
import org.oxycblt.musikr.covers.Covers
import org.oxycblt.musikr.fs.MusicLocation
import org.oxycblt.musikr.fs.device.DeviceFS
import org.oxycblt.musikr.fs.device.FileTreeCache
import org.oxycblt.musikr.fs.device.flatten
import org.oxycblt.musikr.playlist.db.StoredPlaylists
import org.oxycblt.musikr.playlist.m3u.M3U
internal interface ExploreStep {
fun explore(locations: List<MusicLocation>): Flow<Explored>
fun explore(query: Query): Flow<Explored>
companion object {
fun from(context: Context, storage: Storage, interpretation: Interpretation): ExploreStep =
ExploreStepImpl(
DeviceFS.from(context, interpretation.withHidden),
DeviceFS.from(context = context, withHidden = interpretation.withHidden),
storage.cache,
storage.covers,
storage.fileTreeCache,
storage.storedPlaylists)
}
}
@@ -60,15 +66,18 @@ private class ExploreStepImpl(
private val deviceFS: DeviceFS,
private val cache: Cache,
private val covers: Covers<out Cover>,
private val fileTreeCache: FileTreeCache,
private val storedPlaylists: StoredPlaylists
) : ExploreStep {
override fun explore(locations: List<MusicLocation>): Flow<Explored> {
@OptIn(ExperimentalCoroutinesApi::class)
override fun explore(query: Query): Flow<Explored> {
val addingMs = System.currentTimeMillis()
val fileTree = fileTreeCache.read()
return merge(
deviceFS
.explore(
locations.asFlow(),
)
.explore(query, fileTree)
.flatMapMerge { it.flatten() }
.onCompletion { fileTree.write() }
.filter { it.mimeType.startsWith("audio/") || it.mimeType == M3U.MIME_TYPE }
.distributedMap(n = 8, on = Dispatchers.IO, buffer = Channel.UNLIMITED) { file ->
when (val cacheResult = cache.read(file)) {
@@ -0,0 +1,64 @@
# Pipeline Package
## Overview
The pipeline package implements a three-stage processing pipeline for music indexing in Musikr. It provides a concurrent, efficient way to discover, extract metadata from, and process music files.
## Key Components
### Pipeline Steps
1. **ExploreStep** (`ExploreStep.kt`)
- Discovers music files on the device
- Interfaces with filesystem caches
- Produces `Explored` items for processing
2. **ExtractStep** (`ExtractStep.kt`)
- Extracts metadata from discovered files
- Uses TagLib via JNI for metadata extraction
- Produces `Extracted` items with parsed tags
3. **EvaluateStep** (`EvaluateStep.kt`)
- Processes extracted data to build the music library
- Creates the song/album/artist/genre relationships
- Resolves cover art references
### Pipeline Items
The `PipelineItem.kt` defines the data types that flow through the pipeline:
- **Explored** - Files discovered in the filesystem
- `NewSong` - A newly discovered music file
- `RawPlaylist` - A discovered playlist file
- **Extracted** - Files with extracted metadata
- `RawSong` - A song with extracted metadata and tags
- `InvalidSong` - A file that couldn't be processed
### Exception Handling
`PipelineException.kt` defines exceptions specific to the pipeline process.
## Flow Utilities
`FlowUtil.kt` provides utility functions for working with Kotlin Flows in the pipeline context, including:
- `distributedMap` - Parallel mapping operations
- Flow merging and buffering utilities
## Pipeline Flow
```
Location.Opened → ExploreStep → ExtractStep → EvaluateStep → Library
```
Data flows through the pipeline using Kotlin's Flow API, with extensive use of parallel processing and buffering to optimize performance.
## Extension Points
When extending the pipeline:
1. Consider the stage where your functionality belongs
2. Follow the existing pattern of `Flow<In> → Flow<Out>` transformations
3. Use the appropriate dispatchers for I/O vs CPU work
4. Buffer appropriately to manage backpressure
@@ -0,0 +1,83 @@
# Tag Package
## Overview
The tag package handles parsing, interpreting, and managing music metadata tags. It provides structures for representing various tag types and interpreting them according to user preferences.
## Key Components
### Tag Parsing
**TagParser** (`parse/TagParser.kt`)
- Parses raw tag data from the metadata extractor
- Handles different tag formats and structures
- Normalizes tags across different formats
**ParsedTags** (`parse/ParsedTags.kt`)
- Container for parsed metadata tags
- Provides structured access to tag values
**TagFields** (`parse/TagFields.kt`)
- Defines standard tag fields and their mapping
- Handles format-specific field names
### Tag Interpretation
**TagInterpreter** (`interpret/TagInterpreter.kt`)
- Interprets tags based on user preferences
- Resolves ambiguities in tag data
- Creates structured music metadata
**Naming** (`interpret/Naming.kt`)
- Handles naming conventions for music entities
- Provides fallbacks for missing metadata
**Separators** (`interpret/Separators.kt`)
- Handles multi-value separators in tags
- Splits tags with multiple artists, genres, etc.
**PreMusic** (`interpret/PreMusic.kt`)
- Intermediate representation during tag interpretation
- Holds partially processed music data
### Tag Types
**Name** (`Name.kt`)
- Represents artist, album, and track names
- Handles normalization and comparison
**Date** (`Date.kt`)
- Represents release dates
- Handles various date formats and partial dates
**Disc** (`Disc.kt`)
- Represents disc and track numbers
- Handles various numbering formats
**ReleaseType** (`ReleaseType.kt`)
- Represents album release types (album, EP, single, etc.)
- Handles format-specific release type tags
### Format-Specific Handling
**ID3** (`format/ID3.kt`)
- Handles ID3v1 and ID3v2 tag specifics
**Vorbis** (`format/Vorbis.kt`)
- Handles Vorbis Comment tag specifics
## Tag Flow
1. Raw tags extracted by the metadata extractor
2. TagParser normalizes tags into ParsedTags
3. TagInterpreter interprets tags based on user preferences
4. Interpreted tags are used to build the music library
## Extension Points
When extending the tag functionality:
1. For new tag types, extend the TagParser and relevant format handlers
2. For new interpretation rules, modify the TagInterpreter
3. For format-specific handling, add new format classes
4. For new metadata types, add appropriate structures and update the tag flow
@@ -41,12 +41,12 @@ abstract class Naming {
}
}
private data object IntelligentNaming : Naming() {
override fun name(raw: String, sort: String?) = IntelligentKnownName(raw, sort)
data object IntelligentNaming : Naming() {
override fun name(raw: String, sort: String?): Name.Known = IntelligentKnownName(raw, sort)
}
private data object SimpleNaming : Naming() {
override fun name(raw: String, sort: String?) = SimpleKnownName(raw, sort)
data object SimpleNaming : Naming() {
override fun name(raw: String, sort: String?): Name.Known = SimpleKnownName(raw, sort)
}
private val collator: Collator = Collator.getInstance().apply { strength = Collator.PRIMARY }
@@ -22,11 +22,11 @@ import android.content.Context
import android.database.ContentObserver
import android.os.Handler
import android.os.Looper
import org.oxycblt.musikr.fs.MusicLocation
import org.oxycblt.musikr.fs.Location
internal class LocationObserver(
private val context: Context,
private val location: MusicLocation,
private val location: Location.Opened,
private val listener: UpdateTracker.Callback
) : ContentObserver(Handler(Looper.getMainLooper())), Runnable {
private val handler = Handler(Looper.getMainLooper())
@@ -19,15 +19,15 @@
package org.oxycblt.musikr.track
import android.content.Context
import org.oxycblt.musikr.fs.MusicLocation
import org.oxycblt.musikr.fs.Location
interface UpdateTracker {
fun track(locations: List<MusicLocation>)
fun track(locations: List<Location.Opened>)
fun release()
interface Callback {
fun onUpdate(location: MusicLocation)
fun onUpdate(location: Location.Opened)
}
companion object {
@@ -42,7 +42,7 @@ private class UpdateTrackerImpl(
) : UpdateTracker {
private val observers = mutableListOf<LocationObserver>()
override fun track(locations: List<MusicLocation>) {
override fun track(locations: List<Location.Opened>) {
release()
observers.addAll(locations.map { LocationObserver(context, it, callback) })
}
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2023 Auxio Project
* NameTest.kt is part of Auxio.
* NamingTest.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
@@ -16,14 +16,16 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.oxycblt.musikr.tag
package org.oxycblt.musikr.tag.interpret
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals
import org.junit.Test
import org.oxycblt.musikr.tag.interpret.Naming
import org.oxycblt.musikr.tag.Name
import org.oxycblt.musikr.tag.Placeholder
import org.oxycblt.musikr.tag.Token
class NameTest {
class NamingTest {
@Test
fun name_simple_withoutPunct() {
val name = Naming.simple().name("Loveless", null)
@@ -0,0 +1,298 @@
/*
* Copyright (c) 2024 Auxio Project
* TagFieldsTest.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.musikr.tag.parse
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Test
import org.junit.runner.RunWith
import org.oxycblt.musikr.metadata.Metadata
import org.oxycblt.musikr.metadata.Properties
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [30])
class TagFieldsTest {
@Test
fun metadata_name_formats() {
// Test ID3v2 format
var metadata = createTestMetadata(id3v2Tags = mapOf("TIT2" to listOf("ID3 Title")))
assertEquals("ID3 Title", metadata.name())
// Test MP4 format
metadata = createTestMetadata(mp4Tags = mapOf("©nam" to listOf("MP4 Title")))
assertEquals("MP4 Title", metadata.name())
// Test Xiph format
metadata = createTestMetadata(xiphTags = mapOf("TITLE" to listOf("Xiph Title")))
assertEquals("Xiph Title", metadata.name())
// Test priority (xiph > mp4 > id3v2)
metadata =
createTestMetadata(
id3v2Tags = mapOf("TIT2" to listOf("ID3 Title")),
mp4Tags = mapOf("©nam" to listOf("MP4 Title")),
xiphTags = mapOf("TITLE" to listOf("Xiph Title")))
assertEquals("Xiph Title", metadata.name())
}
@Test
fun metadata_track_formats() {
// Test ID3v2 format
var metadata = createTestMetadata(id3v2Tags = mapOf("TRCK" to listOf("5/10")))
assertEquals(5, metadata.track())
// Test ID3v2 format without total
metadata = createTestMetadata(id3v2Tags = mapOf("TRCK" to listOf("5")))
assertEquals(5, metadata.track())
// Test MP4 format
metadata = createTestMetadata(mp4Tags = mapOf("trkn" to listOf("7/12")))
assertEquals(7, metadata.track())
// Test Xiph format
metadata =
createTestMetadata(
xiphTags = mapOf("TRACKNUMBER" to listOf("9"), "TOTALTRACKS" to listOf("15")))
assertEquals(9, metadata.track())
// Test Xiph alternative total tracks
metadata =
createTestMetadata(
xiphTags = mapOf("TRACKNUMBER" to listOf("8"), "TRACKTOTAL" to listOf("16")))
assertEquals(8, metadata.track())
}
@Test
fun metadata_disc_formats() {
// Test ID3v2 format
var metadata = createTestMetadata(id3v2Tags = mapOf("TPOS" to listOf("2/3")))
assertEquals(2, metadata.disc())
// Test MP4 format
metadata = createTestMetadata(mp4Tags = mapOf("disk" to listOf("1/2")))
assertEquals(1, metadata.disc())
// Test Xiph format
metadata =
createTestMetadata(
xiphTags = mapOf("DISCNUMBER" to listOf("3"), "TOTALDISCS" to listOf("4")))
assertEquals(3, metadata.disc())
// Test Xiph alternative total discs
metadata =
createTestMetadata(
xiphTags = mapOf("DISCNUMBER" to listOf("2"), "DISCTOTAL" to listOf("5")))
assertEquals(2, metadata.disc())
}
@Test
fun metadata_subtitle() {
var metadata = createTestMetadata(id3v2Tags = mapOf("TSST" to listOf("Bonus Disc")))
assertEquals("Bonus Disc", metadata.subtitle())
metadata = createTestMetadata(xiphTags = mapOf("DISCSUBTITLE" to listOf("Rarities")))
assertEquals("Rarities", metadata.subtitle())
// Test priority
metadata =
createTestMetadata(
id3v2Tags = mapOf("TSST" to listOf("ID3 Subtitle")),
xiphTags = mapOf("DISCSUBTITLE" to listOf("Xiph Subtitle")))
assertEquals("Xiph Subtitle", metadata.subtitle())
}
@Test
fun metadata_date_formats() {
// Test simple year
var metadata = createTestMetadata(id3v2Tags = mapOf("TDRC" to listOf("2022")))
assertEquals("2022", metadata.date().toString())
// Test ISO-8601 date
metadata = createTestMetadata(id3v2Tags = mapOf("TDRC" to listOf("2022-05-17")))
assertEquals("2022-05-17", metadata.date().toString())
// Test ISO-8601 datetime
metadata = createTestMetadata(id3v2Tags = mapOf("TDRC" to listOf("2022-05-17T14:30:00")))
assertEquals("2022-05-17T14:30:00Z", metadata.date().toString())
// Test Xiph date
metadata = createTestMetadata(xiphTags = mapOf("DATE" to listOf("2021-12-25")))
assertEquals("2021-12-25", metadata.date().toString())
// Test date priority (ORIGINALDATE > DATE)
metadata =
createTestMetadata(
xiphTags =
mapOf("DATE" to listOf("2023-01-01"), "ORIGINALDATE" to listOf("2021-01-01")))
assertEquals("2021-01-01", metadata.date().toString())
// Test MP4 date
metadata = createTestMetadata(mp4Tags = mapOf("©day" to listOf("2020-11-30")))
assertEquals("2020-11-30", metadata.date().toString())
}
@Test
fun metadata_id3v23Date() {
// Test ID3v2.3 date components
val metadata =
createTestMetadata(
id3v2Tags =
mapOf(
"TYER" to listOf("2019"),
"TDAT" to listOf("0523"), // May 23
"TIME" to listOf("2145") // 21:45
))
val date = metadata.date()
assertEquals(2019, date?.year)
assertEquals(5, date?.month)
assertEquals(23, date?.day)
assertEquals(21, date?.hour)
assertEquals(45, date?.minute)
}
@Test
fun metadata_albumInfo() {
val metadata =
createTestMetadata(
id3v2Tags =
mapOf(
"TALB" to listOf("Album Name"),
"TSOA" to listOf("Sort Album Name"),
"TXXX:RELEASETYPE" to listOf("compilation")))
assertEquals("Album Name", metadata.albumName())
assertEquals("Sort Album Name", metadata.albumSortName())
assertEquals(listOf("compilation"), metadata.releaseTypes())
}
@Test
fun metadata_artistInfo() {
val metadata =
createTestMetadata(
id3v2Tags =
mapOf(
"TPE1" to listOf("Artist 1"),
"TPE2" to listOf("Album Artist 1"),
"TSOP" to listOf("Artist 1 Sort"),
"TSO2" to listOf("Album Artist 1 Sort")))
assertEquals(listOf("Artist 1"), metadata.artistNames())
assertEquals(listOf("Album Artist 1"), metadata.albumArtistNames())
assertEquals(listOf("Artist 1 Sort"), metadata.artistSortNames())
assertEquals(listOf("Album Artist 1 Sort"), metadata.albumArtistSortNames())
}
@Test
fun metadata_musicBrainzIds() {
// Test different formats and variants of MusicBrainz identifiers
val metadata =
createTestMetadata(
xiphTags =
mapOf(
"MUSICBRAINZ_RELEASETRACKID" to listOf("track-mb-id"),
"MUSICBRAINZ_ALBUMID" to listOf("album-mb-id")))
assertEquals("track-mb-id", metadata.musicBrainzId())
assertEquals("album-mb-id", metadata.albumMusicBrainzId())
// Test Apple iTunes MP4 variants
val metadata2 =
createTestMetadata(
mp4Tags =
mapOf(
"----:COM.APPLE.ITUNES:MUSICBRAINZ RELEASE TRACK ID" to
listOf("track-mb-id-2"),
"----:COM.APPLE.ITUNES:MUSICBRAINZ ALBUM ID" to listOf("album-mb-id-2")))
assertEquals("track-mb-id-2", metadata2.musicBrainzId())
assertEquals("album-mb-id-2", metadata2.albumMusicBrainzId())
}
@Test
fun metadata_isCompilation() {
// Test various compilation flags
var metadata = createTestMetadata(id3v2Tags = mapOf("TCMP" to listOf("1")))
assertTrue(metadata.isCompilation())
metadata = createTestMetadata(id3v2Tags = mapOf("TCMP" to listOf("0")))
assertFalse(metadata.isCompilation())
metadata = createTestMetadata(xiphTags = mapOf("COMPILATION" to listOf("1")))
assertTrue(metadata.isCompilation())
metadata = createTestMetadata(mp4Tags = mapOf("cpil" to listOf("1")))
assertTrue(metadata.isCompilation())
// Test invalid value
metadata = createTestMetadata(id3v2Tags = mapOf("TCMP" to listOf("yes")))
assertFalse(metadata.isCompilation())
}
@Test
fun metadata_replayGain() {
// Test ReplayGain track adjustment
var metadata =
createTestMetadata(xiphTags = mapOf("REPLAYGAIN_TRACK_GAIN" to listOf("-5.5 dB")))
assertEquals(-5.5f, metadata.replayGainTrackAdjustment())
// Test ReplayGain album adjustment
metadata = createTestMetadata(xiphTags = mapOf("REPLAYGAIN_ALBUM_GAIN" to listOf("3.2 dB")))
assertEquals(3.2f, metadata.replayGainAlbumAdjustment())
// Test R128 track gain
metadata = createTestMetadata(xiphTags = mapOf("R128_TRACK_GAIN" to listOf("-2560")))
// R128 is converted to match ReplayGain scale (-2560/256 + 5 = -5.0)
assertEquals(-5.0f, metadata.replayGainTrackAdjustment())
// Test zero value
metadata = createTestMetadata(xiphTags = mapOf("REPLAYGAIN_TRACK_GAIN" to listOf("0.0 dB")))
assertNull(metadata.replayGainTrackAdjustment())
}
@Test
fun metadata_genreNames() {
var metadata = createTestMetadata(id3v2Tags = mapOf("TCON" to listOf("Rock", "Electronic")))
assertEquals(listOf("Rock", "Electronic"), metadata.genreNames())
metadata = createTestMetadata(mp4Tags = mapOf("©gen" to listOf("Hip Hop", "Jazz")))
assertEquals(listOf("Hip Hop", "Jazz"), metadata.genreNames())
metadata = createTestMetadata(xiphTags = mapOf("GENRE" to listOf("Classical", "Ambient")))
assertEquals(listOf("Classical", "Ambient"), metadata.genreNames())
}
private fun createTestMetadata(
id3v2Tags: Map<String, List<String>> = emptyMap(),
xiphTags: Map<String, List<String>> = emptyMap(),
mp4Tags: Map<String, List<String>> = emptyMap(),
cover: ByteArray? = null,
durationMs: Long = 1000,
bitrateKbps: Int = 320,
sampleRateHz: Int = 44100,
mimeType: String = "audio/mpeg"
): Metadata {
val properties = Properties(mimeType, durationMs, bitrateKbps, sampleRateHz)
return Metadata(id3v2Tags, xiphTags, mp4Tags, cover, properties)
}
}
@@ -0,0 +1,161 @@
/*
* Copyright (c) 2024 Auxio Project
* TagParserTest.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.musikr.tag.parse
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
import org.junit.runner.RunWith
import org.oxycblt.musikr.metadata.Metadata
import org.oxycblt.musikr.metadata.Properties
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [30])
class TagParserTest {
private val tagParser = TagParser.new()
@Test
fun tagParser_parse_basic() {
val metadata =
createTestMetadata(
id3v2Tags =
mapOf(
"TIT2" to listOf("Test Song"),
"TALB" to listOf("Test Album"),
"TPE1" to listOf("Test Artist"),
"TPE2" to listOf("Test Album Artist"),
"TYER" to listOf("2020"),
"TRCK" to listOf("1/10"),
"TPOS" to listOf("1/2"),
"TCON" to listOf("Rock", "Electronic")))
val tags = tagParser.parse(metadata)
assertEquals("Test Song", tags.name)
assertEquals("Test Album", tags.albumName)
assertEquals(listOf("Test Artist"), tags.artistNames)
assertEquals(listOf("Test Album Artist"), tags.albumArtistNames)
assertEquals(2020, tags.date?.year)
assertEquals(1, tags.track)
assertEquals(1, tags.disc)
assertEquals(listOf("Rock", "Electronic"), tags.genreNames)
}
@Test
fun tagParser_parse_multipleFormats() {
// Test priority handling between different tag formats
val metadata =
createTestMetadata(
id3v2Tags = mapOf("TIT2" to listOf("ID3 Song"), "TALB" to listOf("ID3 Album")),
xiphTags = mapOf("TITLE" to listOf("Xiph Song"), "ALBUM" to listOf("Xiph Album")),
mp4Tags = mapOf("©nam" to listOf("MP4 Song"), "©alb" to listOf("MP4 Album")))
val tags = tagParser.parse(metadata)
// Check priority: xiph > mp4 > id3v2
assertEquals("Xiph Song", tags.name)
assertEquals("Xiph Album", tags.albumName)
}
@Test
fun tagParser_parse_compilation() {
// Test compilation album behavior
val metadata = createTestMetadata(id3v2Tags = mapOf("TCMP" to listOf("1")))
val tags = tagParser.parse(metadata)
assertEquals(listOf("Various Artists"), tags.albumArtistNames)
assertEquals(listOf("compilation"), tags.releaseTypes)
}
@Test
fun tagParser_parse_compilationWithReleaseType() {
// Test compilation album with explicit release type
val metadata =
createTestMetadata(
id3v2Tags =
mapOf("TCMP" to listOf("1"), "TXXX:RELEASETYPE" to listOf("soundtrack")))
val tags = tagParser.parse(metadata)
assertEquals(listOf("Various Artists"), tags.albumArtistNames)
assertEquals(listOf("soundtrack"), tags.releaseTypes)
}
@Test
fun tagParser_parse_empty() {
// Test handling of empty metadata
val metadata = createTestMetadata()
val tags = tagParser.parse(metadata)
assertNull(tags.name)
assertNull(tags.albumName)
assertEquals(emptyList<String>(), tags.artistNames)
}
@Test
fun tagParser_musicBrainzIds() {
val metadata =
createTestMetadata(
id3v2Tags =
mapOf(
"TXXX:MUSICBRAINZ RELEASE TRACK ID" to listOf("track-id-123"),
"TXXX:MUSICBRAINZ ALBUM ID" to listOf("album-id-456"),
"TXXX:MUSICBRAINZ ARTIST ID" to listOf("artist-id-789"),
"TXXX:MUSICBRAINZ ALBUM ARTIST ID" to listOf("album-artist-id-012")))
val tags = tagParser.parse(metadata)
assertEquals("track-id-123", tags.musicBrainzId)
assertEquals("album-id-456", tags.albumMusicBrainzId)
assertEquals(listOf("artist-id-789"), tags.artistMusicBrainzIds)
assertEquals(listOf("album-artist-id-012"), tags.albumArtistMusicBrainzIds)
}
@Test
fun tagParser_replayGain() {
val metadata =
createTestMetadata(
xiphTags =
mapOf(
"REPLAYGAIN_TRACK_GAIN" to listOf("-3.5 dB"),
"REPLAYGAIN_ALBUM_GAIN" to listOf("-2.1 dB")))
val tags = tagParser.parse(metadata)
assertEquals(-3.5f, tags.replayGainTrackAdjustment)
assertEquals(-2.1f, tags.replayGainAlbumAdjustment)
}
private fun createTestMetadata(
id3v2Tags: Map<String, List<String>> = emptyMap(),
xiphTags: Map<String, List<String>> = emptyMap(),
mp4Tags: Map<String, List<String>> = emptyMap(),
cover: ByteArray? = null,
durationMs: Long = 1000,
bitrateKbps: Int = 320,
sampleRateHz: Int = 44100,
mimeType: String = "audio/mpeg"
): Metadata {
val properties = Properties(mimeType, durationMs, bitrateKbps, sampleRateHz)
return Metadata(id3v2Tags, xiphTags, mp4Tags, cover, properties)
}
}
@@ -0,0 +1,236 @@
/*
* Copyright (c) 2024 Auxio Project
* TagParsingEdgeCasesTest.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.musikr.tag.parse
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Test
import org.junit.runner.RunWith
import org.oxycblt.musikr.metadata.Metadata
import org.oxycblt.musikr.metadata.Properties
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [30])
class TagParsingEdgeCasesTest {
private val tagParser = TagParser.new()
@Test
fun tagParser_emptyTags() {
// Test behavior with completely empty tag maps
val metadata = createTestMetadata()
val parsedTags = tagParser.parse(metadata)
// Check that all fields have their default values
assertNull(parsedTags.name)
assertNull(parsedTags.sortName)
assertNull(parsedTags.track)
assertNull(parsedTags.disc)
assertNull(parsedTags.subtitle)
assertNull(parsedTags.date)
assertNull(parsedTags.albumName)
assertNull(parsedTags.albumSortName)
assertTrue(parsedTags.releaseTypes.isEmpty())
assertTrue(parsedTags.artistNames.isEmpty())
assertTrue(parsedTags.artistSortNames.isEmpty())
assertTrue(parsedTags.albumArtistNames.isEmpty())
assertTrue(parsedTags.albumArtistSortNames.isEmpty())
assertTrue(parsedTags.genreNames.isEmpty())
}
@Test
fun tagParser_malformedTags() {
// Test behavior with malformed tags
val metadata =
createTestMetadata(
id3v2Tags =
mapOf(
"TRCK" to listOf("not-a-number"),
"TPOS" to listOf("also-not-a-number"),
"TYER" to listOf("invalid-year"),
"REPLAYGAIN_TRACK_GAIN" to listOf("not-a-float dB")))
val parsedTags = tagParser.parse(metadata)
// Verify all numeric fields are null when given invalid values
assertNull(parsedTags.track)
assertNull(parsedTags.disc)
assertNull(parsedTags.date)
assertNull(parsedTags.replayGainTrackAdjustment)
}
@Test
fun tagParser_priorityHandling() {
// Test that field priority is handled correctly when multiple formats have the same field
val metadata =
createTestMetadata(
id3v2Tags = mapOf("TIT2" to listOf("ID3 Title"), "TALB" to listOf("ID3 Album")),
mp4Tags = mapOf("©nam" to listOf("MP4 Title"), "©alb" to listOf("MP4 Album")),
xiphTags = mapOf("TITLE" to listOf("Xiph Title"), "ALBUM" to listOf("Xiph Album")))
// Individual field extraction
assertEquals("Xiph Title", metadata.name())
assertEquals("Xiph Album", metadata.albumName())
// Full tag parsing
val parsedTags = tagParser.parse(metadata)
assertEquals("Xiph Title", parsedTags.name)
assertEquals("Xiph Album", parsedTags.albumName)
}
@Test
fun tagParser_fieldBackoffHandling() {
// Test that when a format doesn't have a field, it falls back to the next format
val metadata =
createTestMetadata(
id3v2Tags = mapOf("TIT2" to listOf("ID3 Title"), "TALB" to listOf("ID3 Album")),
mp4Tags =
mapOf(
"©nam" to listOf("MP4 Title")
// No album in MP4
),
xiphTags =
mapOf(
// No title in Xiph
"ALBUM" to listOf("Xiph Album")))
// Individual field extraction
assertEquals("MP4 Title", metadata.name()) // Xiph missing, falls back to MP4
assertEquals("Xiph Album", metadata.albumName()) // Xiph has it, no fallback needed
// Full tag parsing
val parsedTags = tagParser.parse(metadata)
assertEquals("MP4 Title", parsedTags.name)
assertEquals("Xiph Album", parsedTags.albumName)
}
@Test
fun tagParser_compilationBehavior() {
// Test the special behavior for compilation albums
// Case 1: Compilation flag only
var metadata = createTestMetadata(id3v2Tags = mapOf("TCMP" to listOf("1")))
var tags = tagParser.parse(metadata)
assertEquals(listOf("Various Artists"), tags.albumArtistNames)
assertEquals(listOf("compilation"), tags.releaseTypes)
// Case 2: Compilation flag with explicit album artist
metadata =
createTestMetadata(
id3v2Tags = mapOf("TCMP" to listOf("1"), "TPE2" to listOf("Custom Album Artist")))
tags = tagParser.parse(metadata)
assertEquals(listOf("Custom Album Artist"), tags.albumArtistNames)
assertEquals(listOf("compilation"), tags.releaseTypes)
// Case 3: Compilation flag with explicit release type
metadata =
createTestMetadata(
id3v2Tags =
mapOf("TCMP" to listOf("1"), "TXXX:RELEASETYPE" to listOf("soundtrack")))
tags = tagParser.parse(metadata)
assertEquals(listOf("Various Artists"), tags.albumArtistNames)
assertEquals(listOf("soundtrack"), tags.releaseTypes)
}
@Test
fun tagFields_replayGainEdgeCases() {
// Test various ReplayGain edge cases
// Non-numeric characters filtered out
var metadata =
createTestMetadata(
xiphTags = mapOf("REPLAYGAIN_TRACK_GAIN" to listOf("+2.5 dB some text")))
assertEquals(2.5f, metadata.replayGainTrackAdjustment())
// Zero values filtered
metadata = createTestMetadata(xiphTags = mapOf("REPLAYGAIN_ALBUM_GAIN" to listOf("0.0 dB")))
assertNull(metadata.replayGainAlbumAdjustment())
// R128 value with special parsing
metadata = createTestMetadata(xiphTags = mapOf("R128_TRACK_GAIN" to listOf("-1280")))
assertEquals(0.0f, metadata.replayGainTrackAdjustment()) // -1280/256 + 5 = 0.0
// Completely invalid value
metadata =
createTestMetadata(xiphTags = mapOf("REPLAYGAIN_TRACK_GAIN" to listOf("not a number")))
assertNull(metadata.replayGainTrackAdjustment())
}
@Test
fun tagFields_id3v23DateEdgeCases() {
// Test ID3v2.3 date edge cases
// Just year
var metadata = createTestMetadata(id3v2Tags = mapOf("TYER" to listOf("2018")))
assertEquals("2018", metadata.date().toString())
// Year and date
metadata =
createTestMetadata(
id3v2Tags =
mapOf(
"TYER" to listOf("2018"), "TDAT" to listOf("0315") // March 15
))
assertEquals("2018-03-15", metadata.date().toString())
// Year, date and time
metadata =
createTestMetadata(
id3v2Tags =
mapOf(
"TYER" to listOf("2018"),
"TDAT" to listOf("0315"), // March 15
"TIME" to listOf("1422") // 14:22
))
assertEquals("2018-03-15T14:22Z", metadata.date().toString())
// Original year
metadata = createTestMetadata(id3v2Tags = mapOf("TORY" to listOf("1995")))
assertEquals("1995", metadata.date().toString())
// Invalid date components
metadata =
createTestMetadata(
id3v2Tags =
mapOf(
"TYER" to listOf("2018"),
"TDAT" to listOf("invalid"),
"TIME" to listOf("invalid")))
assertEquals("2018", metadata.date().toString())
// Non-numeric date components
metadata = createTestMetadata(id3v2Tags = mapOf("TYER" to listOf("year")))
assertNull(metadata.date())
}
private fun createTestMetadata(
id3v2Tags: Map<String, List<String>> = emptyMap(),
xiphTags: Map<String, List<String>> = emptyMap(),
mp4Tags: Map<String, List<String>> = emptyMap(),
cover: ByteArray? = null,
durationMs: Long = 1000,
bitrateKbps: Int = 320,
sampleRateHz: Int = 44100,
mimeType: String = "audio/mpeg"
): Metadata {
val properties = Properties(mimeType, durationMs, bitrateKbps, sampleRateHz)
return Metadata(id3v2Tags, xiphTags, mp4Tags, cover, properties)
}
}