mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-23 07:25:25 +01:00
Fixed info bar ignoring 'time respects playback speed' setting
This commit is contained in:
parent
19a6f613e9
commit
6c7d5e167b
@ -653,14 +653,16 @@ public class QueueFragment extends Fragment {
|
||||
|
||||
private void refreshInfoBar() {
|
||||
String info = queue.size() + getString(R.string.episodes_suffix);
|
||||
if(queue.size() > 0) {
|
||||
if (queue.size() > 0) {
|
||||
long timeLeft = 0;
|
||||
for(FeedItem item : queue) {
|
||||
float playbackSpeed = PlaybackSpeedUtils.getCurrentPlaybackSpeed(item.getMedia());
|
||||
if(item.getMedia() != null) {
|
||||
timeLeft +=
|
||||
(long) ((item.getMedia().getDuration() - item.getMedia().getPosition())
|
||||
/ playbackSpeed);
|
||||
for (FeedItem item : queue) {
|
||||
float playbackSpeed = 1;
|
||||
if (UserPreferences.timeRespectsSpeed()) {
|
||||
playbackSpeed = PlaybackSpeedUtils.getCurrentPlaybackSpeed(item.getMedia());
|
||||
}
|
||||
if (item.getMedia() != null) {
|
||||
long itemTimeLeft = item.getMedia().getDuration() - item.getMedia().getPosition();
|
||||
timeLeft += itemTimeLeft / playbackSpeed;
|
||||
}
|
||||
}
|
||||
info += " • ";
|
||||
|
Loading…
Reference in New Issue
Block a user