Directplay on Background

This commit is contained in:
Robin 2019-03-08 22:52:17 +01:00
parent 15eb7f3186
commit 5b64743987
2 changed files with 8 additions and 3 deletions

View File

@ -255,6 +255,7 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
if (context == null || context.getResources() == null || getActivity() == null) return;
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_popup),
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) -> {
switch (i) {
case 0:
NavigationHelper.enqueueOnBackgroundPlayer(context, new SinglePlayQueue(item));
NavigationHelper.playOnBackgroundPlayer(context, new SinglePlayQueue(item));
break;
case 1:
NavigationHelper.enqueueOnPopupPlayer(activity, new SinglePlayQueue(item));
NavigationHelper.enqueueOnBackgroundPlayer(context, new SinglePlayQueue(item));
break;
case 2:
NavigationHelper.enqueueOnPopupPlayer(activity, new SinglePlayQueue(item));
break;
case 3:
if (getFragmentManager() != null) {
PlaylistAppendDialog.fromStreamInfoItems(Collections.singletonList(item))
.show(getFragmentManager(), TAG);
}
break;
case 3:
case 4:
shareUrl(item.getName(), item.getUrl());
break;
default:

View File

@ -419,6 +419,7 @@
<string name="play_queue_stream_detail">Details</string>
<string name="play_queue_audio_settings">Audio Settings</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_popup">Enqueue on new popup</string>
<string name="start_here_on_main">Start playing here</string>