pragha-music-player / pragha

Pragha is a Lightweight Music Player for GNU/Linux.
GNU General Public License v3.0
178 stars 35 forks source link

Corrupt files should not block advancing in play list #129

Closed triorr closed 5 years ago

triorr commented 6 years ago

The error dialog in pragha-window.c in function gui_backend_error_show_dialog_cb is stopping the music whenever a corrupt file is found . I disabled it by adding : gui_backend_error_update_current_playlist_cb (backend, pragha_backend_get_error (backend),pragha); backend_error_dialog_response_cb (G_OBJECT(dialog), GTK_RESPONSE_APPLY, pragha); at the end of the function . But I think there should be a more elegant way to do it.

matiasdelellis commented 6 years ago

Hi @triorr in case the corrupt files should show a dialog to skip the song or stop playback..

Can you make a more detailed description of the problem? Steps to reproduce the error? Pleaase provide a corrupt file to test.. :disappointed:

triorr commented 6 years ago

Create an empty file rename it something.mp3 , add it to the playlist and try to play it. The error message pop-up disrupting your work flow or whatever you are doing. This is relevant with big playlists. The error should be resolved gracefully.

np2048 commented 5 years ago

This bug is really annoying, it just drives me crazy every time pragha findes a corrupted file in the playlist and stops playing showing an error message that is completely useless. What can I do with this information... If a file cannot be played while going throu the playlist so it should be skipped, and that's what all the common players do. Because now I cannot even be sure that if I press Play it will be playing tracks from the playlist until I stop it. The message could be useful only if user explicitly selects a file and presses the Play button but the file cannot be played.

np2048 commented 5 years ago

I had a look to the code and didn't find a simple way to get rid of this message while playing the playlist but leave it at the attempt of explicit file playback start. Backend just doesn't know if it is playing a playlist or just a certain file selected from the playlist manually.

I think to solve this issue gracefully we have to add some kind of "meta status" variable that will indicate the overage player status and not just current status of the playback stream. Or... just get rid of the annoying message because it is completely useless and even harmful, as it duplicates the gui_backend_error_update_current_playlist_cb function that marks bad files in the playlist without stopping the playback.

matiasdelellis commented 5 years ago

Hi both, I apologize again.. :sweat_smile:

I found the patch interesting, but finally I added a checkbox to the error dialog, to ignore the errors and continue playback. See last commit: https://github.com/pragha-music-player/pragha/commit/31813a55122df603dac2de4a779a0fd833133026 I hope it meets your needs.