diff options
author | ByteHamster <info@bytehamster.com> | 2020-02-22 00:21:20 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-02-22 00:21:20 +0100 |
commit | 1433446738889ce01233447fc86fe732ac9c5a02 (patch) | |
tree | 26305cc220e93be1fe48bf23dec4e93b172cfb63 /core/src | |
parent | 930642cb36b262196ac4f56a1e8e9e582cd42ec8 (diff) | |
download | AntennaPod-1433446738889ce01233447fc86fe732ac9c5a02.zip |
Fixed resuming when episode was streamed
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index bf59b0ffd..0ec325e85 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -643,7 +643,18 @@ public class PlaybackService extends MediaBrowserServiceCompat { private void startPlayingFromPreferences() { Playable playable = Playable.PlayableUtils.createInstanceFromPreferences(getApplicationContext()); if (playable != null) { - mediaPlayer.playMediaObject(playable, false, true, true); + if (PlaybackPreferences.getCurrentEpisodeIsStream() && !NetworkUtils.isStreamingAllowed()) { + displayStreamingNotAllowedNotification( + new PlaybackServiceStarter(this, playable) + .prepareImmediately(true) + .startWhenPrepared(true) + .shouldStream(true) + .getIntent()); + PlaybackPreferences.writeNoMediaPlaying(); + stateManager.stopService(); + return; + } + mediaPlayer.playMediaObject(playable, PlaybackPreferences.getCurrentEpisodeIsStream(), true, true); stateManager.validStartCommandWasReceived(); PlaybackService.this.updateMediaSessionMetadata(playable); } else { |