gateship-one / odyssey

Odyssey music player
GNU General Public License v3.0
232 stars 39 forks source link

Showing multiple Titles, can't play all of them #139

Open patrickschulz opened 6 years ago

patrickschulz commented 6 years ago

My player is showing each title of an interpret three times, but i can only play one of them. Playing a 'wrong' one shows OdysseyPlaybackService:IOError. I put a .nomedia file in my music library directory and updated the database there (in odyssey). Now there are only two entries per title remaining, only the broken ones. It seems to me that there is a link stored somewhere, but the file is not actually present on my device. Any idea how to fix this? Is it possible to reset the state of odyssey to its default?

gnome17 commented 6 years ago

Hi, it seems to me that there is something wrong with the android mediadatabase on your phone. Do you see these tracks in other music players as well? A reset of odyssey will not help because we didn't hold our own database and just use the mediadatabase provided by the system.

patrickschulz commented 6 years ago

I actually have no other music player on my phone, but I will try. Since there are music players maintaining their own database, can you recommend any player i can test this on?

gnome17 commented 6 years ago

Hi, you could try this one https://f-droid.org/packages/ch.blinkenlights.android.vanilla/

patrickschulz commented 6 years ago

I tried it with vanilla and here it works fine. In Odyssey, i still get the error. I attached a screenshot showing the same title three times, only the last one is actually playable. screenshot_20180301-112159

djselbeck commented 6 years ago

An logcat output of this situation would be nice 😉

patrickschulz commented 6 years ago

Sorry, i'm new to android development, so i am not sure what one should include. Here is the logcat output while clicking on a title that produces an error. The filter i used is: ExtMediaPlayer-JNI:V MediaPlayer-JNI:V OdysseyPlaybackService:V audio_hw_primary:V MusicFXControlPanelReceiver:V *:S'

Here is the output:

03-02 07:39:35.518 30043 30669 E ExtMediaPlayer-JNI: env->IsInstanceOf fails
03-02 07:39:35.518 30043 30669 E MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
03-02 07:39:35.518 30043 30669 E ExtMediaPlayer-JNI: env->IsInstanceOf fails
03-02 07:39:35.518 30043 30669 E MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
03-02 07:39:35.518 30043 30669 V OdysseyPlaybackService: Exception occured: IOError
03-02 07:39:35.522   315 11096 E audio_hw_primary: offload_thread_loop: Next track returned error -1
03-02 07:39:35.530 29834 29834 V MusicFXControlPanelReceiver: onReceive
03-02 07:39:35.530 29834 29834 V MusicFXControlPanelReceiver: Action: android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION
03-02 07:39:35.530 29834 29834 V MusicFXControlPanelReceiver: Package name: org.gateshipone.odyssey
03-02 07:39:35.530 29834 29834 V MusicFXControlPanelReceiver: Audio session: 397
03-02 07:39:35.533   315 11098 D audio_hw_primary: out_set_parameters: enter: usecase(3: compress-offload-playback) kvpairs: routing=0
03-02 07:39:35.543   315 11098 D audio_hw_primary: out_set_parameters: enter: usecase(3: compress-offload-playback) kvpairs: closing=true
03-02 07:39:35.544   315  3134 D audio_hw_primary: out_set_parameters: enter: usecase(3: compress-offload-playback) kvpairs: exiting=1
03-02 07:39:35.553   315 11098 D audio_hw_primary: out_standby: enter: stream (0xb3c9c180) usecase(3: compress-offload-playback)
03-02 07:39:35.581   315 11096 E audio_hw_primary: offload_thread_loop: Compress handle is NULL
03-02 07:39:35.582   315  3134 D audio_hw_primary: adev_close_output_stream: enter:stream_handle(0xb3c9c180)
03-02 07:39:35.582   315  3134 D audio_hw_primary: out_standby: enter: stream (0xb3c9c180) usecase(3: compress-offload-playback)

The OdysseyPlaybackService says something about an IOError Exception, but there is not much more to that.

djselbeck commented 6 years ago

Thanks for your help.

It looks like the error is not caused by the track you want to play but the next in queue. Unfortunately we have no useful debug output for exceptions in the current stable version. I've added a debug output to the exception that should help. An test apk is located here: https://owncloud.cs.tu-dortmund.de/index.php/s/KmGBi4yYcxMJXfN

patrickschulz commented 6 years ago

Sorry i took so long for the reply. I tried the debug version, but i can't see anything else in the logcat and the application. How can i access the debug output?

djselbeck commented 6 years ago

Logcat should print the paths that causes problems. Try filtering for GaplessPlayer

patrickschulz commented 6 years ago

I'm sorry i took so long for this answer. Thank you for your help, unfortunately, i can't reproduce the error anymore. Now only one title "per title" is shown and they can be happily played. Strange. I guess i updated my media database somehow, although i don't really recall to do something else than before. If i find something i will post it here.