Resolves #2829 - Make queue remaining time sensitive to playback speed
This commit is contained in:
parent
a59e5223af
commit
98a19f0235
|
@ -21,7 +21,6 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration;
|
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.DBReader;
|
||||||
import de.danoeh.antennapod.core.storage.DBTasks;
|
import de.danoeh.antennapod.core.storage.DBTasks;
|
||||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
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.storage.DownloadRequester;
|
||||||
import de.danoeh.antennapod.core.util.Converter;
|
import de.danoeh.antennapod.core.util.Converter;
|
||||||
import de.danoeh.antennapod.core.util.FeedItemUtil;
|
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);
|
String info = queue.size() + getString(R.string.episodes_suffix);
|
||||||
if(queue.size() > 0) {
|
if(queue.size() > 0) {
|
||||||
long timeLeft = 0;
|
long timeLeft = 0;
|
||||||
|
float playbackSpeed = Float.valueOf(UserPreferences.getPlaybackSpeed());
|
||||||
for(FeedItem item : queue) {
|
for(FeedItem item : queue) {
|
||||||
if(item.getMedia() != null) {
|
if(item.getMedia() != null) {
|
||||||
timeLeft += item.getMedia().getDuration() - item.getMedia().getPosition();
|
timeLeft +=
|
||||||
|
(item.getMedia().getDuration() - item.getMedia().getPosition())
|
||||||
|
/ playbackSpeed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info += " \u2022 ";
|
info += " \u2022 ";
|
||||||
|
|
Loading…
Reference in New Issue