amugofjava / anytime_podcast_player

Simple, easy to use Podcast player app written in Flutter and Dart.
BSD 3-Clause "New" or "Revised" License
433 stars 101 forks source link

can not download an episode while press back button and going to app again #18

Closed A-Eric-J closed 3 years ago

A-Eric-J commented 3 years ago

Hi,I hope you are well. I found out something that I think it's a bug of this app. when you go to the application and want to download an episode, it downloads very well, when you are in(in the app), you press back button after that you go out of the app, when you want to come in again, you will see that you can not download a new episode(the progress does not complete the task) and you have to close the app and start it again and it works fine. do you know why it happens? here is a video of what I said that I put in dropbox: https://www.dropbox.com/s/cz5hmsntywknd0f/anytime.mp4?dl=0

amugofjava commented 3 years ago

Hi @amiirrallii,

Thanks for raising the issue and for the video - it makes it so much easier to see the problem.

When you back out of the app using the back button the app is killed. Anytime isn't correctly tidying up its connection to the download process. When you go back into Anytime it fails to reconnect to the download process and, whilst the podcasts will continue to download, Anytime cannot monitor them. This should be fairly straightforward to fix.

Thanks.

A-Eric-J commented 3 years ago

Hi again @amugofjava, thanks for your attention. do you have any solution in your mind because you told it is fairly straightforward to fix?

amugofjava commented 3 years ago

Hi @amiirrallii,

The solution is to ensure that when the app is suspended, or destroyed, the method channel open to the downloader is closed so that it can be re-opened correctly when the app resumes. I will include the fix in the current round of enhancements I am working on which hopefully I'll push within the next week.

amugofjava commented 3 years ago

Hi @amiirrallii,

When Anytime is started it now checks for any downloads that have been completed whilst the app has been closed. If it finds any, it will update the status of each episode to reflect the download status.

This fix has been pushed in the code, but I have not yet deployed a new binary to the Google Play Store.