Code Monkey home page Code Monkey logo

Comments (42)

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024 2

Oh. I know what's going on there.

FLAC titles are encoded using UTF-8, so the umlaut u is encoded as the bytes "C3 BC", where C3 is just a lowercase u and BC is the special character that adds the two dots to make it an umlaut.

What android is doing is that it's treating that album title metadata as if it was encoded in Latin-1, which is a much older and more restricted character set that isn't outlined the FLAC specification at all. In this case, the "C3 BC" bytes will be individually interpreted as the characters à and ¼.

MP3 files don't have this issue since they use a different metadata format that explicitly specifies the encoding. The way VLC gets around this is by parsing the metadata themselves, but that is a nightmare to implement and would ruin Auxio's user experience. Theoretically, I could remedy this by parsing the albums database instead of the songs database for album names so that they are encoded correctly, but that causes even more problems since OEM's seemingly break that database on a whim.

There is nothing I can do about this since it's a flaw within Android's ancient metadata parser. You might want to take this to the LineageOS devs, but even then I'm not sure how much they can do since the metadata parser is part of the upstream android project. This problem is so wide-spread that I'm considering just submitting a patch to AOSP myself that tries to fix some of this insanity.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024 1

I've done a refactor to the music loader for the next Auxio release.

The new system is a bit slower, but now it has album artist support! Auxio will now always use the Album Artist tag when it comes to grouping artists, defaulting to the normal Artist tag when it isn't present. This system isn't exactly ideal, as it will ignore any collaborator information and only show the album artist, but it's still an improvement from a bunch of fragmented artists.

This change also fixes the artist mis-assignment issue that occurs on some Samsung devices with crippled MediaStore tables.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024 1

Android's metadata parser doesn't read dates from any file that is not an MP3 audio with ID3v2.3 metadata. This issue has been around for over a decade. There is nothing I can do about it.

Also, I already finished the new loader, it was released with Auxio 2.0.0. Currently the loader is in the best place it can be and I have no plans to change it.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024 1

Update: I've done some work on parallelizing a possible manual metadata parser and have been able to get throughputs of ~16ms per song loaded, which is in line with other apps. It also has the bonus of not having to bring in any redundant metadata libraries that don't play along with android, as the whole system relies on ExoPlayer's metadata system. This is actually really exciting, as I can eliminate much of the "unfixable" metadata issues by parsing metadata myself. No idea when this might land in Auxio, as it was just a prototype.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024 1

Update: Dates will actually work on FLAC/Vorbis files as long as you use the YEAR field instead of DATE. Again, this is because android's metadata parser has not been updated in upwards of 10-15 years.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024 1

#72 is now in Auxio as an experimental option called "Automatic reloading". It's not like the behavior that you see in other music players (It will show a persistent notification), but this is to enable much more reliable music updates.

@hakmad @Naverim

from auxio.

itsmusictomyears avatar itsmusictomyears commented on May 18, 2024

Just chiming in to say #3 does indeed cause problems with large libraries: Auxio 1.4.2 takes about 55 seconds to get up and running with my library of 29.000 tracks. Everything's fine once it's all loaded up, though.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

Yeah, I figured. The problem is both systems make tradeoffs.

Loading everything on the fly results in a fast startup time, but really slow operation time whenever you want to shuffle all songs and results in problems with properly restoring things

Loading everything at once takes really long at the beginning and maybe risks an OOM if a library is big enough, but seems to work pretty well in everything else.

Personally, if my library grows to the size where it becomes a problem loading it in, I'll likely create some flavor of Auxio with SoundPod support [or something similar] to stop this issue.

from auxio.

itsmusictomyears avatar itsmusictomyears commented on May 18, 2024

Would it be possible to create a custom indexer, bypassing the native one? I don't know whether it would fix the startup times, but it would probably be able to do a better job at reading the tags than the native indexer.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

I've thought about this in the past, but theres a number of problems with the idea:

  1. Integrating the indexer itself. JVM indexers are slow and cumbersome, but trying to run native code on android is a nightmare, and I'm not too keen on adding unsafe C++ code to Auxio. I do have a metadata parsing side-project called musikr that would be memory safe, but there's no good rust toolchain for android apps yet.
  2. File handles. Parsing music metadata is actually really fast, it's the process of getting a file handle from the android system thats the real bottleneck. MediaStore is a system-level daemon, so it doesn't have that restriction, but I do. This is why Vanilla and VLC take so long to load media, not because the metadata indexer is slow but because reading files is slow. Google prefers this as it furthers their quest to kill the filesystem, so there's nothing I can do about it.
  3. Caching metadata. Since indexing takes so long, I'm would be forced to cache music metadata in a database of my own. However, keeping this database up to date would be a chore. What if files are removed? What if files had their metadata changed? What if the music ID is invalidated? Making a database work without issues is extremely hard, which is the reason why I've largely ignored it.
  4. It's impractical. A custom database would only be as fast as android's database, with the added runtime cost of having to parse all those files one by one. While it would bypass the issues of MediaStore, it's so impractical as to not be worth it.

I'm really stuck between a rock and a hard place here. MediaStore is an awful API that google has no incentive to improve given that allowing people to listen to music files they own is completely against their interests. However, a custom media indexer only replaces MediaStore's problems with a new set of problems.

If I were to do anything to Auxio to make music indexing better, it would be to turn the app into a SubSonic client that could communicate with a SoundPod/FunkWhale/MPD instance and sidestep all the problems with indexing, state, and loading that my current system has. I will only do this if local indexing becomes too impractical for my use, and only when the app is "done" [e.g Playlists are added and most QoL stuff has been added].

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

Something I may do in a future update is split my media indexer into three modes a la Simple Gallery:

  • Correct: This is the media indexer Auxio will use in 2.0.0. Index only the song database with full album artist/genre support. Good for well-tagged libraries, but is much slower.
  • Compromise: Effectively the media indexer from 1.4.2. Support genres, but split queries across the song and album database for speed and only rely on the artist field.
  • Speed: Like compromise, but drop pre-sorting and genre support as well [which is a huge bottleneck if you've read my massive screed in the MusicLoader class]. This is the best for large libraries, but at the cost of good metadata support.

from auxio.

itsmusictomyears avatar itsmusictomyears commented on May 18, 2024

I don't know if you've made any big changes to the indexing yet, but I just noticed in v2.0.1 that the song count in the library, at least on the genre tab, is often way off. For example, the library says I have 2 songs for the genre 'Power Electronics', but there's actually 24 songs. However, for some genres the count is correct.

There are also genres with 0 songs, and indeed no songs show up at all. I checked, and I don't have any music files belonging to those genres on my device. However, I think I had some music of those genres on the device in the past, so it would seem some cached stuff is not getting cleared.

Additionally, it appears that the indexer also struggles with certain special characters, displaying them as completely different characters. Sometimes it only happens for some tracks on an album (with the album title glitched) whereas other tracks on the album are fine (with the album title displayed the way it should).

Maybe all of these problems are Google problems :)

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

Auxio 2.0.(0/1) uses a new music loader that only indexes songs and genres and creates everything based off of that. I imagined that it would fix a lot of the strange OEM-specific indexing issues, as previously I would query the less reliable Album database for speed.

For example, the library says I have 2 songs for the genre 'Power Electronics', but there's actually 24 songs. However, for some genres the count is correct.

That is extremely weird. I get the amount of songs based off of the list of songs I attach to each genre. That means that somehow the list of songs is not being truthful about it's size. I imagine that it might be Auxio buckling under the size of your music library, as the genre loading process is basically repeatedly iterating through the entire list of songs repeatedly to link each song with their genre. Not sure what to do here.

There are also genres with 0 songs, and indeed no songs show up at all. I checked, and I don't have any music files belonging to those genres on my device. However, I think I had some music of those genres on the device in the past, so it would seem some cached stuff is not getting cleared.

Completely a caching issue. I could add another check to the music loader that culls empty genres to fix this though.

Additionally, it appears that the indexer also struggles with certain special characters, displaying them as completely different characters. Sometimes it only happens for some tracks on an album (with the album title glitched) whereas other tracks on the album are fine (with the album title displayed the way it should).

Seems like an encoding issue. ID3 is notoriously finicky with encodings and I wouldn't be surprised if googles ancient metadata parser is trying to decode UTF-16 without handling surrogate pairs (or other wacky Unicode nonsense).

I am working on introducing loader customization in Auxio 2.1.0. You'll be able to revert to something resembling the old 1.4.2 system, and you'll also be able to disable genres entirely, which will likely half your loading times if my benchmarks are correct.

from auxio.

itsmusictomyears avatar itsmusictomyears commented on May 18, 2024

Oh, perhaps I made myself misunderstood, I think the new way is actually better than before - I'd say it's faster, or at least not slower, than before, and the fact that the main UI now shows up immediately is certainly an improvement, too - so I don't think there's any need to revert to the old behaviour.

One thing I do wonder about, though, is if doing the indexing every time the app is loaded (at least once every boot) is not straining the battery? On devices with a big battery and a small library, it's probably negligible either way, but does it make sense on devices with a big library and a small battery (like mine)? I genuinely don't know if it could or does impact battery life. If it does, could you add an option to disable the automatic (re)indexing on boot, keep the information from the previous indexing cached, and only reindex when explicitly selected (or after a certain amount of time has passed, or after an update to Auxio has been installed, ...)?

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

Oh, perhaps I made myself misunderstood, I think the new way is actually better than before - I'd say it's faster, or at least not slower, than before, and the fact that the main UI now shows up immediately is certainly an improvement,

I was more arguing that being able to swap back to the old system would help solve some of the strange metadata issues. Through if the new system works well for large libraries like yours, I'll just shelve the idea of customizing the music loader until there's demand for it.

One thing I do wonder about, though, is if doing the indexing every time the app is loaded (at least once every boot) is not straining the battery?

Auxio re-indexes music every time it has a "cold start", which basically means when you open the app for the first time after a reboot or after the phone kills it to save battery. The android system does most of the heavy lifting here, and Auxio just uses whatever it's given, so I'd imagine that it's not too intensive.

f it does, could you add an option to disable the automatic (re)indexing on boot, keep the information from the previous indexing cached, and only reindex when explicitly selected (or after a certain amount of time has passed, or after an update to Auxio has been installed, ...)?

The android system already does that. It's just that querying the media database takes so long. All caching on my end would do is make Auxio more unstable, which is something I don't want.

from auxio.

itsmusictomyears avatar itsmusictomyears commented on May 18, 2024

Thanks, I think I understand now!

from auxio.

 avatar commented on May 18, 2024

This problem is present in all audio players on Android except VLC on Android. But there is also an issue with ö, ü, ä which are partially displayed weird (only FLAC, not with MP3s).

LineageOS 18.1 with Auxio:
1

Gentoo Linux with GNOME and Lollypop
2

from auxio.

132ikl avatar 132ikl commented on May 18, 2024

Are there any plans for the new loader to be able to read dates from FLAC files?

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

Confirmed that with the current loader, every single metadata tag that's in UTF-8 will have any non-ASCII characters corrupted. This is probably because during the conversion to a java string, it tries to dynamically determine the encoding. This usually ends up with it choosing Latin-1, Shift JIS, or UTF-16 for backwards compatibility, because god forbid breaking some 25-year-old business application.

As for what I recommend, just rewrite your tags. Convert accented characters to their phonetic forms. Convert symbols to their names or similar. I don't see anything that can be done about this that doesn't involve creating my own metadata parser, and at that point I may as well go "screw it" and just add SoundPod support instead of trying to salvage the dying android file APIs.

from auxio.

s4b0n avatar s4b0n commented on May 18, 2024

Screenshot_20220226-034018_Auxio
Latest version

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

@Sabonk Can you take a logcat from this debug build? Rename the extension from ZIP.

app-debug.zip

If you don't know how to take a logcat, do the following:

To take a logcat, you must do the following:
1. Use a desktop/laptop to download the android platform tools from https://developer.android.com/studio/releases/platform-tools.
2. Extract the downloaded file to a folder
3. Enable USB debugging on your phone [See https://developer.android.com/studio/command-line/adb#Enabling], and then connect your
phone to a laptop. You will get a prompt to "Allow USB debugging" when you run the logcat command. Accept this.
4. Open up a terminal/command prompt in that folder and run the following when reproducing the issue:
	- `./adb -d logcat | grep -i "[DWE] Auxio"` [may require some changes on windows]
5. Copy and paste the output to this area of the issue.

If you don't have the external hardware needed to do this, then you will have to wait for me to implement an error screen.

from auxio.

s4b0n avatar s4b0n commented on May 18, 2024

su -c logcat | grep -i "[DWE] Auxio"
02-26 04:00:19.124 15613 15613 D Auxio.MainActivity: Applying normal theme [accent Accent(index=5)]
02-26 04:00:19.557 15613 15613 D Auxio.MainActivity: Doing legacy edge-to-edge
02-26 04:00:19.557 15613 15613 D Auxio.MainActivity: Activity created
02-26 04:00:19.659 15613 15613 D Auxio.FrameLayout: Disabling drop shadows
02-26 04:00:20.029 15613 15613 D Auxio.PlaybackLayout: Applying panel state HIDDEN
02-26 04:00:20.373 15613 15613 D Auxio.MainFragment: Fragment Created
02-26 04:00:20.374 15613 15635 D Auxio.MusicStore: Starting initial music load
02-26 04:00:20.948 15613 15613 D Auxio.AdaptiveTabStrategy: Using icon-only configuration
02-26 04:00:21.019 15613 15613 D Auxio.AdaptiveTabStrategy: Using icon-only configuration
02-26 04:00:21.033 15613 15613 D Auxio.HomeFragment: Fragment Created
02-26 04:00:21.344 15613 15613 D Auxio.PlaybackFragment: Fragment Created
02-26 04:00:21.598 15613 15613 W Auxio.MaterialTextView: Song was null, not applying info
02-26 04:00:22.168 15613 15613 D Auxio.HomeViewModel: Updating current tab to SHOW_SONGS
02-26 04:00:22.181 15613 15613 W Auxio.MainFragment: Received Error
02-26 04:00:22.626 15613 15613 D Auxio.PlaybackSessionConnector: Updating media session state
02-26 04:00:22.663 15613 15613 D Auxio.PlaybackService: Service created
02-26 04:00:26.255 15613 15613 D Auxio.MusicViewModel: Reloading music library
02-26 04:00:26.262 15613 15637 D Auxio.MusicStore: Starting initial music load
02-26 04:00:26.316 15613 15637 D Auxio.ExcludedDatabase: Successfully read 0 paths from db
02-26 04:00:26.363 15613 15637 E Auxio.MusicStore: Something went horribly wrong
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at java.lang.String.substring(String.java:2036)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at kotlin.text.StringsKt__StringsKt.substring(Strings.kt:393)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicLoader.loadSongs(MusicLoader.kt:180)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicLoader.load(MusicLoader.kt:84)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicStore.load(MusicStore.kt:73)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicStore.access$load(MusicStore.kt:42)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicStore$Companion$initInstance$response$1.invokeSuspend(MusicStore.kt:148)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:39)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
02-26 04:00:26.366 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
02-26 04:00:26.367 15613 15613 W Auxio.MainFragment: Received Error
02-26 04:01:04.006 15613 15613 D Auxio.MainActivity: Applying normal theme [accent Accent(index=5)]
02-26 04:01:04.059 15613 15613 D Auxio.MainActivity: Doing legacy edge-to-edge
02-26 04:01:04.059 15613 15613 D Auxio.MainActivity: Activity created
02-26 04:01:04.081 15613 15613 D Auxio.FrameLayout: Disabling drop shadows
02-26 04:01:04.170 15613 15613 D Auxio.PlaybackLayout: Applying panel state HIDDEN
02-26 04:01:04.173 15613 15613 D Auxio.MainFragment: Fragment Created
02-26 04:01:04.173 15613 15637 D Auxio.MusicStore: Starting initial music load
02-26 04:01:04.176 15613 15637 D Auxio.ExcludedDatabase: Successfully read 0 paths from db
02-26 04:01:04.209 15613 15637 E Auxio.MusicStore: Something went horribly wrong
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at java.lang.String.substring(String.java:2036)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at kotlin.text.StringsKt__StringsKt.substring(Strings.kt:393)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicLoader.loadSongs(MusicLoader.kt:180)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicLoader.load(MusicLoader.kt:84)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicStore.load(MusicStore.kt:73)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicStore.access$load(MusicStore.kt:42)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicStore$Companion$initInstance$response$1.invokeSuspend(MusicStore.kt:148)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:39)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
02-26 04:01:04.211 15613 15637 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
02-26 04:01:04.410 15613 15613 D Auxio.AdaptiveTabStrategy: Using icon-only configuration
02-26 04:01:04.466 15613 15613 D Auxio.AdaptiveTabStrategy: Using icon-only configuration
02-26 04:01:04.476 15613 15613 D Auxio.HomeFragment: Fragment Created
02-26 04:01:04.637 15613 15613 D Auxio.PlaybackFragment: Fragment Created
02-26 04:01:04.740 15613 15613 W Auxio.MaterialTextView: Song was null, not applying info
02-26 04:01:05.095 15613 15613 D Auxio.HomeViewModel: Updating current tab to SHOW_SONGS
02-26 04:01:05.107 15613 15613 W Auxio.MainFragment: Received Error
02-26 04:02:07.499 15613 15613 D Auxio.WidgetController: Releasing instance
02-26 04:02:07.499 15613 15613 D Auxio.WidgetProvider: Resetting widget
02-26 04:02:07.506 15613 15613 D Auxio.PlaybackService: Service destroyed
02-26 04:02:07.509 15613 15613 D Auxio.PlaybackStateManager: Saving state to DB
02-26 04:02:07.543 15613 15636 D Auxio.PlaybackStateDatabase: Wiped state db
02-26 04:02:07.548 15613 15636 D Auxio.PlaybackStateDatabase: Wrote state to database
02-26 04:02:07.554 15613 15636 D Auxio.PlaybackStateDatabase: Wiped queue db
02-26 04:02:07.554 15613 15636 D Auxio.PlaybackStateDatabase: Beginning queue write [start: 0]
02-26 04:02:07.554 15613 15636 D Auxio.PlaybackStateManager: State save completed successfully in 42ms
02-26 04:06:45.261 16048 16048 D Auxio.MainActivity: Applying normal theme [accent Accent(index=5)]
02-26 04:06:45.688 16048 16048 D Auxio.MainActivity: Doing legacy edge-to-edge
02-26 04:06:45.688 16048 16048 D Auxio.MainActivity: Activity created
02-26 04:06:45.797 16048 16048 D Auxio.FrameLayout: Disabling drop shadows
02-26 04:06:46.166 16048 16048 D Auxio.PlaybackLayout: Applying panel state HIDDEN
02-26 04:06:46.505 16048 16048 D Auxio.MainFragment: Fragment Created
02-26 04:06:46.506 16048 16073 D Auxio.MusicStore: Starting initial music load
02-26 04:06:46.527 16048 16073 D Auxio.ExcludedDatabase: Successfully read 0 paths from db
02-26 04:06:46.564 16048 16073 E Auxio.MusicStore: Something went horribly wrong
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at java.lang.String.substring(String.java:2036)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at kotlin.text.StringsKt__StringsKt.substring(Strings.kt:393)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicLoader.loadSongs(MusicLoader.kt:180)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicLoader.load(MusicLoader.kt:84)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicStore.load(MusicStore.kt:73)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicStore.access$load(MusicStore.kt:42)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at org.oxycblt.auxio.music.MusicStore$Companion$initInstance$response$1.invokeSuspend(MusicStore.kt:148)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:39)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
02-26 04:06:46.566 16048 16073 E Auxio.MusicStore: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
02-26 04:06:47.080 16048 16048 D Auxio.AdaptiveTabStrategy: Using icon-only configuration
02-26 04:06:47.105 16048 16048 D Auxio.AdaptiveTabStrategy: Using icon-only configuration
02-26 04:06:47.127 16048 16048 D Auxio.AdaptiveTabStrategy: Using icon-only configuration
02-26 04:06:47.150 16048 16048 D Auxio.AdaptiveTabStrategy: Using icon-only configuration
02-26 04:06:47.165 16048 16048 D Auxio.HomeFragment: Fragment Created
02-26 04:06:47.463 16048 16048 D Auxio.PlaybackFragment: Fragment Created
02-26 04:06:47.717 16048 16048 W Auxio.MaterialTextView: Song was null, not applying info
02-26 04:06:48.285 16048 16048 D Auxio.HomeViewModel: Updating current tab to SHOW_SONGS
02-26 04:06:48.302 16048 16048 W Auxio.MainFragment: Received Error
02-26 04:06:48.735 16048 16048 D Auxio.PlaybackSessionConnector: Updating media session state
02-26 04:06:48.772 16048 16048 D Auxio.PlaybackService: Service created
02-26 04:07:52.991 16048 16048 D Auxio.WidgetController: Releasing instance
02-26 04:07:52.991 16048 16048 D Auxio.WidgetProvider: Resetting widget
02-26 04:07:52.998 16048 16048 D Auxio.PlaybackService: Service destroyed
02-26 04:07:53.000 16048 16048 D Auxio.PlaybackStateManager: Saving state to DB
02-26 04:07:53.026 16048 16075 D Auxio.PlaybackStateDatabase: Wiped state db
02-26 04:07:53.033 16048 16075 D Auxio.PlaybackStateDatabase: Wrote state to database
02-26 04:07:53.039 16048 16075 D Auxio.PlaybackStateDatabase: Wiped queue db
02-26 04:07:53.040 16048 16075 D Auxio.PlaybackStateDatabase: Beginning queue write [start: 0]
02-26 04:07:53.040 16048 16075 D Auxio.PlaybackStateManager: State save completed successfully in 38ms

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

@Sabonk Seems to be an unexpected bug with path parsing. Can you tell me the path where your music files are?

from auxio.

s4b0n avatar s4b0n commented on May 18, 2024

@Sabonk Seems to be an unexpected bug with path parsing. Can you tell me the path where your music files are?

/storage/FB3B-1EEE/Music/

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

@Sabonk Seems like it's specific to external storage. I'm spinning this off into #84.

from auxio.

ygregw avatar ygregw commented on May 18, 2024

Whenever I adb push new music files to my phone, running lineage os 18.1, auxio is not able to detect them upon restarting, unless I hackily/clumsily rename the pushed folders on my phone. Is this yet another eccentric annoyance of Android's filesystem?

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

Kind of, @ygregw. It seems like your issue is composed of two smaller issues:

  1. Making Auxio rescan music on it's own. This is being worked on under #72, however it will likely require a constantly-running background task in order to automatically detect music in a way that newer versions of android will accept. In the mean time, you can try the Reload Music option in settings.
  2. Getting Android to reindex the new music. This is a system issue and I'm not sure how much Auxio can mitigate that.

from auxio.

ygregw avatar ygregw commented on May 18, 2024

I don't think issue 1 is pertinent since new folders are not detected even after Auxio is killed and restarted. Somehow it seems adb-pushed folders are not visible to Auxio until they are renamed. This issue can be reproduced for another music player, Simple Music Player, in F-Droid which is why I suspect it's not an Auxio bug.

On a side note, I actually quite like the fact that there is no constant and wasteful rescanning on the background especially because my music repository tends to be rather stable and subject to very infrequent changes.

from auxio.

ygregw avatar ygregw commented on May 18, 2024

Issue solved by using Syncthing to add and tag music files. Friendship ends with adb push and pull...
Thanks a lot for all your work developing this great program!

from auxio.

hakmad avatar hakmad commented on May 18, 2024

I'm not sure if this is the right place for this or if I should create a new issue, but I have a problem loading some music on my device when using Auxio: specifically, Auxio doesn't load newly downloaded music.

Expected behaviour:

  1. Specify folder to load music from in Auxio (e.g. the Music folder)
  2. Download music as an MP3 file (e.g. use youtube-dl and Termux) to above folder
  3. Select "Reload Music" from "Settings"
  4. Music should now appear in list of music

To reproduce: perform steps 1 to 3 above. Auxio (and the default music app) refuse to load new music in this way. Another music app, Vinyl Music Player, does load new music properly.

Strangely enough, selecting the reload option in Vinyl ("Scan Media" from the sidebar) also causes Auxio and the default app to load the music correctly.

I have no idea why either of these happen. Sorry if this is the wrong place to put this issue, I'm not very good at this haha. 😅

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

This is tracked by #72 @hakmad. Basically, reloading music like that is a bit of a difficult technical problem, especially when you do not query the database in the UI but instead create an in-memory representation of the music library (Auxio is somewhat forced to do this due to all of the QoL improvements I have made). I am working on it though.

from auxio.

hakmad avatar hakmad commented on May 18, 2024

Ah, sorry! I didn't realise there was an issue for this already, that's my bad.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

#128 is implemented! No longer are Auxio users stuck with android's unfixable metadata issues. As soon as a release is made, this thread will be retired for a new one that should be more comprehensive for all of the new features arriving in 2.5.0.

As for #72, while Auxio has the ability to rescan music at runtime, more work needs to be done there. Definitely arriving in the same version though.

from auxio.

animaldaydream avatar animaldaydream commented on May 18, 2024

I think this is a better place to track these rather than opening new issues, but I thought I'd ask anyways.

I use Quod Libet on my PC and have disambiguation provided by MusicBrainz UUIDs that are stored in the tags when you use a compatible tagger like MusicBrainz Picard.

When there's two artists with the same name, or two different releases with the same artist and album tag, it successfully disambiguates them and offers them separately, with different artwork, release date, and so on.

Second, Picard also stores in the tags the first release date of a release group, which means all releases of an album will have both the original release date, and the release date of that particular album.

Third, Picard and many other audio taggers and metadata standards support storing multiple values in a single field. Picard stores multiple artist values in the "artists" field (mind the 's'), and stores them concatenated as credited officially in the "artist" field, among others.

I currently set up my library to contain multiple values in the regular Artist and Album Artist fields, and they're standardised too so different spellings on different releases are all combined into one. Thing is, Auxio only takes the first tag it finds, and apparently, it's the first tag that it finds in the first file found that contains it.

In this case, it found the "Björk" tag in an earlier file, and on an album with both the tags "Dirty Projectors" and "Björk" (in that order), it completely discarded the tag "Dirty Projectors" on the release.

In summary:

  1. Consider using MusicBrainz IDs if present, so that artists and releases are disambiguated and fused properly.
  2. Some other tags provided by Picard could be useful to further sort and group the albums of a particular artist as the user chooses.
  3. Currently, when a file has multiple artist/albumartist tags, only one is used and the rest is discarded.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

Okay, a lot to unpack @animaldaydream.

Consider using MusicBrainz IDs if present, so that artists and releases are disambiguated and fused properly.

While this is technically possible with #128 now, the implementation specifics would be a bit weird. Auxio sort of replicates an ID by hashing metadata together, and theoretically I could just throw in the MusicBrainz ID into the hash calculation. However, this comes with a major issue: I can only extract MusicBrainz IDs using #128, and that setting can be toggled. I want to make sure that the hashes stay relatively consistent to reduce playback state wipes, but adding such a tag would completely break that if one were to switch from one setting to the other (or vice versa).

I think I would re-consider it if #128 graduates from experimental setting to Auxio's default, unchangeable behavior. Then, the tags I can only extract with it can be thrown into the hash calculation without issue. Depends on performance and memory usage on a wider scale.

Some other tags provided by Picard could be useful to further sort and group the albums of a particular artist as the user chooses.

I think this is already supported by #128, assuming you are talking about Original Years (TORY/TDOR for mp3, ORIGINALDATE for opus/vorbis/flac`). Fine-grained dates (YYYY-MM-DD HH:MM:SS) and release types are also supported with #128, if you like those.

Currently, when a file has multiple artist/albumartist tags, only one is used and the rest is discarded.

This is intentional behavior. Personally, I add collaborator information to the "artist" field, and then choose the most major collaborator in the "album artist" field, and so I designed Auxio with that in mind. To make songs correspond to multiple artists is a technical nightmare both internally (All music is in-memory, so I need to keep the the library data-structure simple to lower memory usage), and in the UI (Navigation in particular would be completely broken, as "go to artist" could apply to one of several artists).

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

As for this thread, I'm planning to retire it when #128 is finally released. This was originally meant as a dumping ground for insane issues with MediaStore, but #128 solves many of those issues, and it's likely Auxio's future anyway. Hence, standalone issues will be more appropriate.

from auxio.

animaldaydream avatar animaldaydream commented on May 18, 2024

This is intentional behavior. Personally, I add collaborator information to the "artist" field, and then choose the most major collaborator in the "album artist" field, and so I designed Auxio with that in mind.

Man, I'll be honest, this is extremely weird and unexpected behaviour. I'd rather all the artists were completely concatenated. Which I'm gonna do myself with a Picard script instead. [By the way, that particular album has the same two artists on both the 'album artist' and 'artist' tags, on every track, and even still only one is shown.]

To make songs correspond to multiple artists is a technical nightmare both internally (All music is in-memory, so I need to keep the the library data-structure simple to lower memory usage), and in the UI (Navigation in particular would be completely broken, as "go to artist" could apply to one of several artists).

Well I don't know how that works, so I'll just believe you. Poweramp handles that fine though, I don't know how the dev does that, though it concatenates the values and then you have to separate them placing the hard-coded connector in a separate setting that splits them back up, etc.

Quod Libet handles that fine too, but I'm starting to nitpick.

I'll open a new issue though. I just need to collect my thoughts, I think.

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

By the way, that particular album has the same two artists on both the 'album artist' and 'artist' tags, on every track, and even still only one is shown.

That's a lot weirder @animaldaydream. Can I have a sample file and the behavior you expect in particular? I swear, if android is being "helpful" again and mangling your artists I am going to lose it.

Poweramp handles that fine though, I don't know how the dev does that, though it concatenates the values and then you have to separate them placing the hard-coded connector in a separate setting that splits them back up, etc.

Then again, poweramp has a team of people behind it that can handle the many edge cases of such a setting (And force the android OS to do what they want), while I'm just one guy. Not saying I can't handle it, it's mostly navigation that is my major concern. Perhaps some other time.

from auxio.

animaldaydream avatar animaldaydream commented on May 18, 2024

Then again, poweramp has a team of people behind it that can handle the many edge cases of such a setting (And force the android OS to do what they want), while I'm just one guy

Poweramp has exclusively one developer who refuses to allow anybody else to even look at the code :D

It's his job, though. He actually gets paid to do this. Even if his community hates it because resolving basic issues takes months and even years, while new features still come in.

I'm being annoying though. I'd help you, but all I have to offer is advice on how other 'decent' players handle this 'decently'. But believe me, from an UI standpoint, it's totally doable; some music players do pull this off as long as the tags are correct. I don't think open source devs would usually mind you taking a hint from their UIs, would they?

So long as it behaves, I'm open. I'm extremely annoyed at the current state of music players and I know exactly how an UI should handle this properly without compromises.

I'm gonna make a file tree that replicates this bug in a while, and I'll open a new issue afterwards.

from auxio.

animaldaydream avatar animaldaydream commented on May 18, 2024

I swear, if android is being "helpful" again and mangling your artists I am going to lose it.

Actually, you still use MediaStore, right? Because this fork of Phonograph runs into the exact same issue.

https://github.com/chr56/Phonograph_Plus

from auxio.

animaldaydream avatar animaldaydream commented on May 18, 2024

OK, here it is: #195

from auxio.

OxygenCobalt avatar OxygenCobalt commented on May 18, 2024

2.6.0 is released, so this issue is bring retired. Please file new, individual issues with a particular problem.

from auxio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.