smithdtyler / prettygoodmusicplayer

A music player app for Android hits the basics hard
GNU General Public License v3.0
51 stars 23 forks source link

FLAC support? #110

Closed timur-j-alpin closed 8 years ago

timur-j-alpin commented 8 years ago

Using version 3.3.0 i see directories containing .flac files as empty. Other players play flacs with no problems. Looks similar to issue#95, but that one seemed format-independent. Tested on two different devices.

smithdtyler commented 8 years ago

Huh... This has worked in the past, perhaps we've had a regression... I'll check it out. On Feb 25, 2016 08:26, "hatul-madan" notifications@github.com wrote:

Using version 3.3.0 i see directories containing .flac files as empty. Other players play flacs with no problems. Looks similar to issue#95, but that one seemed format-independent. Tested on two different devices.

— Reply to this email directly or view it on GitHub https://github.com/smithdtyler/prettygoodmusicplayer/issues/110.

undu commented 8 years ago

This is probably my fault: https://github.com/smithdtyler/prettygoodmusicplayer/pull/106 I'll see if I missed some flac media type. Otherwise can just merge the generated extension list with the static we had before, not ideal but it'll work.

undu commented 8 years ago

I missed the audio/x-flac media type, but I don't know if that will fix it.

Here's an apk with the fix: https://github.com/undu/prettygoodmusicplayer/releases/download/3.3.0a/prettygoodmusicplayer-debug.apk

You'll have to delete the existing app to be able to install this one.

Check back if it works, otherwise we can apply a fix that merges the two extension lists.

timur-j-alpin commented 8 years ago

undu, thank you for your help! I tried your apk, but flacs are still invisible.

undu commented 8 years ago

I've uploaded another binary to the same direction, let me know if it fixes the issue.

timur-j-alpin commented 8 years ago

Tried it. No, unfortunately it doesn't.

undu commented 8 years ago

Have you tried putting mp3 files to the same directory? This isn't a regression caused by my patch, I feel the issue you're having is due to https://github.com/smithdtyler/prettygoodmusicplayer/issues/104

timur-j-alpin commented 8 years ago

I tried to put mp3 in the directory that contained flac files only. Initially in PGMP I saw it as empty, after mp3 addition I was able to see the added mp3 file in this folder, but nothing more. It's not #104, the folder now is "music/flac/album", and #104 manifests itself in mixing tracks from different albums.

undu commented 8 years ago

Let's try one more time: https://github.com/undu/prettygoodmusicplayer/releases/download/3.3.0b/prettygoodmusicplayer-debug.apk

timur-j-alpin commented 8 years ago

Still the same thing, sadly.

undu commented 8 years ago

I'm sorry, for some reason the last change didn't go through, can you re-download and try again?

timur-j-alpin commented 8 years ago

Tried again - no difference yet.

undu commented 8 years ago

Have you tried the previous stable version?

https://f-droid.org/repo/com.smithdtyler.prettygoodmusicplayer_67.apk

smithdtyler commented 8 years ago

Can you post the folder structure you have? A sample file would be good too. On Feb 26, 2016 2:43 PM, "undu" notifications@github.com wrote:

Have you tried the previous stable version?

https://f-droid.org/repo/com.smithdtyler.prettygoodmusicplayer_67.apk

— Reply to this email directly or view it on GitHub https://github.com/smithdtyler/prettygoodmusicplayer/issues/110#issuecomment-189476557 .

timur-j-alpin commented 8 years ago

Have you tried the previous stable version?

Tried: this one worked.

Can you post the folder structure you have?

It's large, but can be seen here: http://pastebin.com/HjvYwdZ7

A sample file would be good too.

A sample flac file? For example, this one was invisible as any other: http://www.lindberg.no/hires/test/2L-111_15_stereo-44k-16b.flac

smithdtyler commented 8 years ago

Sharing my debugging notes:

Utils.decodableMediaTypes is resolving to

decodablemediatypes

MediaTypeUtils.extensionToMimeTypeMap resolves to

extensiontomimetypemap

Looks like we're claiming it's not supported because the media type for flac doesn't exactly match the MimeType.

smithdtyler commented 8 years ago

When I originally added the file type filter, it was mostly to avoid showing the user files that were in the folder by accident, or were added by some OS level nonsense (like OS X's .DS_Store files). The player will fail gracefully if it tries to play a file and fails. Unless I'm convinced otherwise, I'm going to relax the restriction so that if the extension shows up in MediaTypeUtils, we call it good.

smithdtyler commented 8 years ago

That test file is working for me with version 3.3.1 (just tagged). I've not tested it with your folder structure yet. Please let me know if this solves the issue.

3.3.1 APK

timur-j-alpin commented 8 years ago

Tried it, now it works! All flacs are visible and playable. Thank you!

smithdtyler commented 8 years ago

This fix is included in 3.3.2