diff options
author | ByteHamster <info@bytehamster.com> | 2020-03-26 17:12:00 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-03-26 17:12:00 +0100 |
commit | 5a3778e2f03bafd5f30be189b9725e8a7e0d6a93 (patch) | |
tree | 84452b8e5844f90865b6565df0ca11d782217a6f | |
parent | b4b2b45247a92e7f7e43ab224598ef646608c7be (diff) | |
download | AntennaPod-5a3778e2f03bafd5f30be189b9725e8a7e0d6a93.zip |
Do not show buffering indicator when playing local file
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java | 6 | ||||
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java index ed136af3c..0be59904d 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java @@ -265,7 +265,11 @@ public class AudioPlayerFragment extends Fragment implements @Override public void onBufferUpdate(float progress) { - sbPosition.setSecondaryProgress((int) (progress * sbPosition.getMax())); + if (isStreaming()) { + sbPosition.setSecondaryProgress((int) (progress * sbPosition.getMax())); + } else { + sbPosition.setSecondaryProgress(0); + } } @Override diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java index 8f21437b0..baf5d924f 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java @@ -743,6 +743,10 @@ public class PlaybackController { } } + public boolean isStreaming() { + return playbackService != null && playbackService.isStreaming(); + } + private void initServiceNotRunning() { if (getPlayButton() == null) { return; |