Local feeds: Do not display streaming confirmation (#4468)
This commit is contained in:
parent
1d77ad472b
commit
41580b57cc
@ -35,6 +35,7 @@ import android.util.Log;
|
|||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.SurfaceHolder;
|
import android.view.SurfaceHolder;
|
||||||
|
import android.webkit.URLUtil;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
@ -482,7 +483,8 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
|||||||
if (allowStreamAlways) {
|
if (allowStreamAlways) {
|
||||||
UserPreferences.setAllowMobileStreaming(true);
|
UserPreferences.setAllowMobileStreaming(true);
|
||||||
}
|
}
|
||||||
if (stream && !NetworkUtils.isStreamingAllowed() && !allowStreamThisTime) {
|
boolean localFeed = URLUtil.isContentUrl(playable.getStreamUrl());
|
||||||
|
if (stream && !NetworkUtils.isStreamingAllowed() && !allowStreamThisTime && !localFeed) {
|
||||||
displayStreamingNotAllowedNotification(intent);
|
displayStreamingNotAllowedNotification(intent);
|
||||||
PlaybackPreferences.writeNoMediaPlaying();
|
PlaybackPreferences.writeNoMediaPlaying();
|
||||||
stateManager.stopService();
|
stateManager.stopService();
|
||||||
@ -668,7 +670,8 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
|||||||
private void startPlayingFromPreferences() {
|
private void startPlayingFromPreferences() {
|
||||||
Playable playable = Playable.PlayableUtils.createInstanceFromPreferences(getApplicationContext());
|
Playable playable = Playable.PlayableUtils.createInstanceFromPreferences(getApplicationContext());
|
||||||
if (playable != null) {
|
if (playable != null) {
|
||||||
if (PlaybackPreferences.getCurrentEpisodeIsStream() && !NetworkUtils.isStreamingAllowed()) {
|
boolean localFeed = URLUtil.isContentUrl(playable.getStreamUrl());
|
||||||
|
if (PlaybackPreferences.getCurrentEpisodeIsStream() && !NetworkUtils.isStreamingAllowed() && !localFeed) {
|
||||||
displayStreamingNotAllowedNotification(
|
displayStreamingNotAllowedNotification(
|
||||||
new PlaybackServiceStarter(this, playable)
|
new PlaybackServiceStarter(this, playable)
|
||||||
.prepareImmediately(true)
|
.prepareImmediately(true)
|
||||||
@ -957,7 +960,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!nextItem.getMedia().localFileAvailable() && !NetworkUtils.isStreamingAllowed()
|
if (!nextItem.getMedia().localFileAvailable() && !NetworkUtils.isStreamingAllowed()
|
||||||
&& UserPreferences.isFollowQueue()) {
|
&& UserPreferences.isFollowQueue() && !nextItem.getFeed().isLocalFeed()) {
|
||||||
displayStreamingNotAllowedNotification(
|
displayStreamingNotAllowedNotification(
|
||||||
new PlaybackServiceStarter(this, nextItem.getMedia())
|
new PlaybackServiceStarter(this, nextItem.getMedia())
|
||||||
.prepareImmediately(true)
|
.prepareImmediately(true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user