Local feeds: Do not display streaming confirmation (#4468)

This commit is contained in:
Herbert Reiter 2020-10-02 23:03:30 +02:00 committed by GitHub
parent 1d77ad472b
commit 41580b57cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -35,6 +35,7 @@ import android.util.Log;
import android.util.Pair;
import android.view.KeyEvent;
import android.view.SurfaceHolder;
import android.webkit.URLUtil;
import android.widget.Toast;
import com.bumptech.glide.Glide;
@ -482,7 +483,8 @@ public class PlaybackService extends MediaBrowserServiceCompat {
if (allowStreamAlways) {
UserPreferences.setAllowMobileStreaming(true);
}
if (stream && !NetworkUtils.isStreamingAllowed() && !allowStreamThisTime) {
boolean localFeed = URLUtil.isContentUrl(playable.getStreamUrl());
if (stream && !NetworkUtils.isStreamingAllowed() && !allowStreamThisTime && !localFeed) {
displayStreamingNotAllowedNotification(intent);
PlaybackPreferences.writeNoMediaPlaying();
stateManager.stopService();
@ -668,7 +670,8 @@ public class PlaybackService extends MediaBrowserServiceCompat {
private void startPlayingFromPreferences() {
Playable playable = Playable.PlayableUtils.createInstanceFromPreferences(getApplicationContext());
if (playable != null) {
if (PlaybackPreferences.getCurrentEpisodeIsStream() && !NetworkUtils.isStreamingAllowed()) {
boolean localFeed = URLUtil.isContentUrl(playable.getStreamUrl());
if (PlaybackPreferences.getCurrentEpisodeIsStream() && !NetworkUtils.isStreamingAllowed() && !localFeed) {
displayStreamingNotAllowedNotification(
new PlaybackServiceStarter(this, playable)
.prepareImmediately(true)
@ -957,7 +960,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
}
if (!nextItem.getMedia().localFileAvailable() && !NetworkUtils.isStreamingAllowed()
&& UserPreferences.isFollowQueue()) {
&& UserPreferences.isFollowQueue() && !nextItem.getFeed().isLocalFeed()) {
displayStreamingNotAllowedNotification(
new PlaybackServiceStarter(this, nextItem.getMedia())
.prepareImmediately(true)