fastlane: fix image metadata
Fix slight screenshot discrepancies where shot7 would show the old song sub-heading.
This commit is contained in:
parent
bb1d660eae
commit
5bc5afa162
7 changed files with 12 additions and 17 deletions
|
@ -12,11 +12,13 @@
|
||||||
- Fixed bug where music would be incorrectly reloaded on a hot restart
|
- Fixed bug where music would be incorrectly reloaded on a hot restart
|
||||||
- Fixed issue where the album/artist/genre would not be correctly restored
|
- Fixed issue where the album/artist/genre would not be correctly restored
|
||||||
- Fixed issue where items would not highlight properly in the detail UI
|
- Fixed issue where items would not highlight properly in the detail UI
|
||||||
|
- Fixed hypothetical issue where widget would cause an OOM on large devices
|
||||||
|
|
||||||
#### Dev/Meta
|
#### Dev/Meta
|
||||||
- New translations [yurical -> Korean, qwerty287 -> German]
|
- New translations [yurical -> Korean, qwerty287 -> German]
|
||||||
- Switched from `LiveData` to `StateFlow`
|
- Switched from `LiveData` to `StateFlow`
|
||||||
- Use `notifyItemChanged` instead of directly mutating `ViewHolder` instances.
|
- Use `notifyItemChanged` instead of directly mutating `ViewHolder` instances.
|
||||||
|
- Added highly experimental ExoPlayer metadata backend (not enabled in-app)
|
||||||
|
|
||||||
## v2.3.0
|
## v2.3.0
|
||||||
|
|
||||||
|
|
|
@ -321,6 +321,7 @@ class HomeFragment : ViewBindingFragment<FragmentHomeBinding>(), Toolbar.OnMenuI
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleLoadEvent(binding: FragmentHomeBinding, event: MusicStore.LoadState?) {
|
private fun handleLoadEvent(binding: FragmentHomeBinding, event: MusicStore.LoadState?) {
|
||||||
|
binding.homeFab.hide()
|
||||||
binding.homePager.visibility = View.INVISIBLE
|
binding.homePager.visibility = View.INVISIBLE
|
||||||
binding.homeLoadingContainer.visibility = View.VISIBLE
|
binding.homeLoadingContainer.visibility = View.VISIBLE
|
||||||
binding.homeLoadingProgress.visibility = View.VISIBLE
|
binding.homeLoadingProgress.visibility = View.VISIBLE
|
||||||
|
|
|
@ -110,7 +110,7 @@ private constructor(
|
||||||
private val genre: Genre,
|
private val genre: Genre,
|
||||||
) : BaseFetcher() {
|
) : BaseFetcher() {
|
||||||
override suspend fun fetch(): FetchResult? {
|
override suspend fun fetch(): FetchResult? {
|
||||||
// Don't sort here to preserve compatibility with previous versions of this image.
|
// Don't sort here to preserve compatibility with previous versions of this images
|
||||||
val albums = genre.songs.groupBy { it.album }.keys
|
val albums = genre.songs.groupBy { it.album }.keys
|
||||||
val results = albums.mapAtMost(4) { album -> fetchArt(context, album) }
|
val results = albums.mapAtMost(4) { album -> fetchArt(context, album) }
|
||||||
return createMosaic(context, results, size)
|
return createMosaic(context, results, size)
|
||||||
|
|
|
@ -25,7 +25,6 @@ import android.provider.OpenableColumns
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import java.lang.Exception
|
import java.lang.Exception
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.delay
|
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import org.oxycblt.auxio.music.indexer.Indexer
|
import org.oxycblt.auxio.music.indexer.Indexer
|
||||||
import org.oxycblt.auxio.music.indexer.useQuery
|
import org.oxycblt.auxio.music.indexer.useQuery
|
||||||
|
|
|
@ -32,6 +32,7 @@ import java.util.concurrent.Executors
|
||||||
import java.util.concurrent.Future
|
import java.util.concurrent.Future
|
||||||
import org.oxycblt.auxio.music.MusicStore
|
import org.oxycblt.auxio.music.MusicStore
|
||||||
import org.oxycblt.auxio.music.Song
|
import org.oxycblt.auxio.music.Song
|
||||||
|
import org.oxycblt.auxio.util.logD
|
||||||
import org.oxycblt.auxio.util.logW
|
import org.oxycblt.auxio.util.logW
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -113,9 +114,12 @@ class ExoPlayerBackend(private val inner: MediaStoreBackend) : Indexer.Backend {
|
||||||
private val onComplete: (Song) -> Unit,
|
private val onComplete: (Song) -> Unit,
|
||||||
) : FutureCallback<TrackGroupArray> {
|
) : FutureCallback<TrackGroupArray> {
|
||||||
override fun onSuccess(result: TrackGroupArray) {
|
override fun onSuccess(result: TrackGroupArray) {
|
||||||
val metadata = result[0].getFormat(0).metadata
|
val metadata = result[0].getFormat(0)
|
||||||
if (metadata != null) {
|
|
||||||
completeAudio(audio, metadata)
|
logD("${metadata.sampleMimeType} ${metadata.averageBitrate} ${metadata.sampleRate}")
|
||||||
|
|
||||||
|
if (metadata.metadata != null) {
|
||||||
|
completeAudio(audio, metadata.metadata!!)
|
||||||
} else {
|
} else {
|
||||||
logW("No metadata was found for ${audio.title}")
|
logW("No metadata was found for ${audio.title}")
|
||||||
}
|
}
|
||||||
|
@ -131,10 +135,6 @@ class ExoPlayerBackend(private val inner: MediaStoreBackend) : Indexer.Backend {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun completeAudio(audio: MediaStoreBackend.Audio, metadata: Metadata) {
|
private fun completeAudio(audio: MediaStoreBackend.Audio, metadata: Metadata) {
|
||||||
if (metadata.length() == 0) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExoPlayer only exposes ID3v2 and Vorbis metadata, which constitutes the vast majority
|
// ExoPlayer only exposes ID3v2 and Vorbis metadata, which constitutes the vast majority
|
||||||
// of audio formats. Some formats (like FLAC) can contain both ID3v2 and vorbis tags, but
|
// of audio formats. Some formats (like FLAC) can contain both ID3v2 and vorbis tags, but
|
||||||
// this isn't too big of a deal, as we generally let the "source of truth" for metadata
|
// this isn't too big of a deal, as we generally let the "source of truth" for metadata
|
||||||
|
|
|
@ -54,14 +54,6 @@ object Indexer {
|
||||||
else -> Api21MediaStoreBackend()
|
else -> Api21MediaStoreBackend()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disabled until direct parsing is fully capable of integration into Auxio's
|
|
||||||
// architecture.
|
|
||||||
// val backend = if (settingsManager.useQualityMetadata) {
|
|
||||||
// ExoPlayerBackend(mediaStoreBackend)
|
|
||||||
// } else {
|
|
||||||
// mediaStoreBackend
|
|
||||||
// }
|
|
||||||
|
|
||||||
val songs = buildSongs(context, mediaStoreBackend, callback)
|
val songs = buildSongs(context, mediaStoreBackend, callback)
|
||||||
if (songs.isEmpty()) {
|
if (songs.isEmpty()) {
|
||||||
return null
|
return null
|
||||||
|
@ -71,6 +63,7 @@ object Indexer {
|
||||||
|
|
||||||
val albums = buildAlbums(songs)
|
val albums = buildAlbums(songs)
|
||||||
val artists = buildArtists(albums)
|
val artists = buildArtists(albums)
|
||||||
|
|
||||||
val genres = buildGenres(songs)
|
val genres = buildGenres(songs)
|
||||||
|
|
||||||
// Sanity check: Ensure that all songs are linked up to albums/artists/genres.
|
// Sanity check: Ensure that all songs are linked up to albums/artists/genres.
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 245 KiB |
Loading…
Reference in a new issue