mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 19:12:45 +01:00
Merge pull request #2198 from Redirion/directOnBackground
Directplay on Background
This commit is contained in:
commit
f9e771f8f7
@ -255,6 +255,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
|
|||||||
if (context == null || context.getResources() == null || getActivity() == null) return;
|
if (context == null || context.getResources() == null || getActivity() == null) return;
|
||||||
|
|
||||||
final String[] commands = new String[]{
|
final String[] commands = new String[]{
|
||||||
|
context.getResources().getString(R.string.direct_on_background),
|
||||||
context.getResources().getString(R.string.enqueue_on_background),
|
context.getResources().getString(R.string.enqueue_on_background),
|
||||||
context.getResources().getString(R.string.enqueue_on_popup),
|
context.getResources().getString(R.string.enqueue_on_popup),
|
||||||
context.getResources().getString(R.string.append_playlist),
|
context.getResources().getString(R.string.append_playlist),
|
||||||
@ -264,18 +265,21 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
|
|||||||
final DialogInterface.OnClickListener actions = (dialogInterface, i) -> {
|
final DialogInterface.OnClickListener actions = (dialogInterface, i) -> {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0:
|
case 0:
|
||||||
NavigationHelper.enqueueOnBackgroundPlayer(context, new SinglePlayQueue(item));
|
NavigationHelper.playOnBackgroundPlayer(context, new SinglePlayQueue(item));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
NavigationHelper.enqueueOnPopupPlayer(activity, new SinglePlayQueue(item));
|
NavigationHelper.enqueueOnBackgroundPlayer(context, new SinglePlayQueue(item));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
NavigationHelper.enqueueOnPopupPlayer(activity, new SinglePlayQueue(item));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
if (getFragmentManager() != null) {
|
if (getFragmentManager() != null) {
|
||||||
PlaylistAppendDialog.fromStreamInfoItems(Collections.singletonList(item))
|
PlaylistAppendDialog.fromStreamInfoItems(Collections.singletonList(item))
|
||||||
.show(getFragmentManager(), TAG);
|
.show(getFragmentManager(), TAG);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 4:
|
||||||
shareUrl(item.getName(), item.getUrl());
|
shareUrl(item.getName(), item.getUrl());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -419,6 +419,7 @@
|
|||||||
<string name="play_queue_stream_detail">Details</string>
|
<string name="play_queue_stream_detail">Details</string>
|
||||||
<string name="play_queue_audio_settings">Audio Settings</string>
|
<string name="play_queue_audio_settings">Audio Settings</string>
|
||||||
<string name="hold_to_append">Hold To enqueue</string>
|
<string name="hold_to_append">Hold To enqueue</string>
|
||||||
|
<string name="direct_on_background">Play directly in Background</string>
|
||||||
<string name="enqueue_on_background">Enqueue when backgrounded</string>
|
<string name="enqueue_on_background">Enqueue when backgrounded</string>
|
||||||
<string name="enqueue_on_popup">Enqueue on new popup</string>
|
<string name="enqueue_on_popup">Enqueue on new popup</string>
|
||||||
<string name="start_here_on_main">Start playing here</string>
|
<string name="start_here_on_main">Start playing here</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user