From 98a19f0235f40377be7d402330e8f45269e112da Mon Sep 17 00:00:00 2001 From: egsavage Date: Sun, 7 Oct 2018 19:23:34 -0400 Subject: [PATCH] Resolves #2829 - Make queue remaining time sensitive to playback speed --- .../java/de/danoeh/antennapod/fragment/QueueFragment.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java index bae77d58b..f5fdd4f9c 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -21,7 +21,6 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ProgressBar; import android.widget.TextView; -import android.widget.Toast; import com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration; @@ -46,7 +45,6 @@ import de.danoeh.antennapod.core.service.download.Downloader; import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.core.storage.DBTasks; import de.danoeh.antennapod.core.storage.DBWriter; -import de.danoeh.antennapod.core.storage.DownloadRequestException; import de.danoeh.antennapod.core.storage.DownloadRequester; import de.danoeh.antennapod.core.util.Converter; import de.danoeh.antennapod.core.util.FeedItemUtil; @@ -535,9 +533,12 @@ public class QueueFragment extends Fragment { String info = queue.size() + getString(R.string.episodes_suffix); if(queue.size() > 0) { long timeLeft = 0; + float playbackSpeed = Float.valueOf(UserPreferences.getPlaybackSpeed()); for(FeedItem item : queue) { if(item.getMedia() != null) { - timeLeft += item.getMedia().getDuration() - item.getMedia().getPosition(); + timeLeft += + (item.getMedia().getDuration() - item.getMedia().getPosition()) + / playbackSpeed; } } info += " \u2022 ";