Merge remote-tracking branch 'origin/dev' into notifications

This commit is contained in:
TobiGr 2021-10-14 21:15:43 +02:00
commit 16d4a034e2
82 changed files with 324 additions and 264 deletions

View File

@ -17,8 +17,8 @@ android {
resValue "string", "app_name", "NewPipe"
minSdkVersion 19
targetSdkVersion 29
versionCode 977
versionName "0.21.11"
versionCode 978
versionName "0.21.12"
multiDexEnabled true
@ -209,7 +209,7 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-livedata:${androidxLifecycleVersion}"
implementation "androidx.lifecycle:lifecycle-viewmodel:${androidxLifecycleVersion}"
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
implementation 'androidx.media:media:1.3.1'
implementation 'androidx.media:media:1.4.2'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0'

View File

@ -43,8 +43,6 @@ import io.reactivex.rxjava3.exceptions.UndeliverableException;
import io.reactivex.rxjava3.functions.Consumer;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService;
/*
* Copyright (C) Hans-Christoph Steiner 2016 <hans@eds.org>
* App.java is part of NewPipe.
@ -113,8 +111,6 @@ public class App extends MultiDexApplication {
&& prefs.getBoolean(getString(R.string.show_image_indicators_key), false));
configureRxJavaErrorHandler();
// Check for new version
startNewVersionCheckService();
}
@Override

View File

@ -20,6 +20,9 @@
package org.schabi.newpipe;
import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@ -92,8 +95,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
public class MainActivity extends AppCompatActivity {
private static final String TAG = "MainActivity";
@SuppressWarnings("ConstantConditions")
@ -163,10 +164,50 @@ public class MainActivity extends AppCompatActivity {
FocusOverlayView.setupFocusObserver(this);
}
openMiniPlayerUponPlayerStarted();
// Check for new version
startNewVersionCheckService();
// shedule worker for checking for new streans and creating corresponding notifications
NotificationWorker.schedule(this);
}
private void setupDrawer() throws Exception {
private void setupDrawer() throws ExtractionException {
addDrawerMenuForCurrentService();
toggle = new ActionBarDrawerToggle(this, mainBinding.getRoot(),
toolbarLayoutBinding.toolbar, R.string.drawer_open, R.string.drawer_close);
toggle.syncState();
mainBinding.getRoot().addDrawerListener(toggle);
mainBinding.getRoot().addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
private int lastService;
@Override
public void onDrawerOpened(final View drawerView) {
lastService = ServiceHelper.getSelectedServiceId(MainActivity.this);
}
@Override
public void onDrawerClosed(final View drawerView) {
if (servicesShown) {
toggleServices();
}
if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) {
ActivityCompat.recreate(MainActivity.this);
}
}
});
drawerLayoutBinding.navigation.setNavigationItemSelectedListener(this::drawerItemSelected);
setupDrawerHeader();
}
/**
* Builds the drawer menu for the current service.
*
* @throws ExtractionException
*/
private void addDrawerMenuForCurrentService() throws ExtractionException {
//Tabs
final int currentServiceId = ServiceHelper.getSelectedServiceId(this);
final StreamingService service = NewPipe.getService(currentServiceId);
@ -205,32 +246,6 @@ public class MainActivity extends AppCompatActivity {
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_options_about_group, ITEM_ID_ABOUT, ORDER, R.string.tab_about)
.setIcon(R.drawable.ic_info_outline);
toggle = new ActionBarDrawerToggle(this, mainBinding.getRoot(),
toolbarLayoutBinding.toolbar, R.string.drawer_open, R.string.drawer_close);
toggle.syncState();
mainBinding.getRoot().addDrawerListener(toggle);
mainBinding.getRoot().addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
private int lastService;
@Override
public void onDrawerOpened(final View drawerView) {
lastService = ServiceHelper.getSelectedServiceId(MainActivity.this);
}
@Override
public void onDrawerClosed(final View drawerView) {
if (servicesShown) {
toggleServices();
}
if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) {
ActivityCompat.recreate(MainActivity.this);
}
}
});
drawerLayoutBinding.navigation.setNavigationItemSelectedListener(this::drawerItemSelected);
setupDrawerHeader();
}
private boolean drawerItemSelected(final MenuItem item) {
@ -338,11 +353,15 @@ public class MainActivity extends AppCompatActivity {
drawerLayoutBinding.navigation.getMenu().removeGroup(R.id.menu_tabs_group);
drawerLayoutBinding.navigation.getMenu().removeGroup(R.id.menu_options_about_group);
// Show up or down arrow
drawerHeaderBinding.drawerArrow.setImageResource(
servicesShown ? R.drawable.ic_arrow_drop_up : R.drawable.ic_arrow_drop_down);
if (servicesShown) {
showServices();
} else {
try {
showTabs();
addDrawerMenuForCurrentService();
} catch (final Exception e) {
ErrorActivity.reportUiErrorInSnackbar(this, "Showing main page tabs", e);
}
@ -350,8 +369,6 @@ public class MainActivity extends AppCompatActivity {
}
private void showServices() {
drawerHeaderBinding.drawerArrow.setImageResource(R.drawable.ic_arrow_drop_up);
for (final StreamingService s : NewPipe.getServices()) {
final String title = s.getServiceInfo().getName()
+ (ServiceHelper.isBeta(s) ? " (beta)" : "");
@ -415,48 +432,6 @@ public class MainActivity extends AppCompatActivity {
menuItem.setActionView(spinner);
}
private void showTabs() throws ExtractionException {
drawerHeaderBinding.drawerArrow.setImageResource(R.drawable.ic_arrow_drop_down);
//Tabs
final int currentServiceId = ServiceHelper.getSelectedServiceId(this);
final StreamingService service = NewPipe.getService(currentServiceId);
int kioskId = 0;
for (final String ks : service.getKioskList().getAvailableKiosks()) {
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, kioskId, ORDER,
KioskTranslator.getTranslatedKioskName(ks, this))
.setIcon(KioskTranslator.getKioskIcon(ks, this));
kioskId++;
}
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, ITEM_ID_SUBSCRIPTIONS, ORDER, R.string.tab_subscriptions)
.setIcon(R.drawable.ic_tv);
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, ITEM_ID_FEED, ORDER, R.string.fragment_feed_title)
.setIcon(R.drawable.ic_rss_feed);
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, ITEM_ID_BOOKMARKS, ORDER, R.string.tab_bookmarks)
.setIcon(R.drawable.ic_bookmark);
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, ITEM_ID_DOWNLOADS, ORDER, R.string.downloads)
.setIcon(R.drawable.ic_file_download);
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_tabs_group, ITEM_ID_HISTORY, ORDER, R.string.action_history)
.setIcon(R.drawable.ic_history);
//Settings and About
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_options_about_group, ITEM_ID_SETTINGS, ORDER, R.string.settings)
.setIcon(R.drawable.ic_settings);
drawerLayoutBinding.navigation.getMenu()
.add(R.id.menu_options_about_group, ITEM_ID_ABOUT, ORDER, R.string.tab_about)
.setIcon(R.drawable.ic_info_outline);
}
@Override
protected void onDestroy() {
super.onDestroy();

View File

@ -9,8 +9,8 @@ import android.widget.PopupMenu;
import androidx.fragment.app.FragmentManager;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.local.dialog.PlaylistCreationDialog;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.local.dialog.PlaylistDialog;
import org.schabi.newpipe.player.playqueue.PlayQueue;
import org.schabi.newpipe.player.playqueue.PlayQueueItem;
import org.schabi.newpipe.util.NavigationHelper;
@ -47,13 +47,15 @@ public final class QueueItemMenuUtil {
false);
return true;
case R.id.menu_item_append_playlist:
final PlaylistAppendDialog d = PlaylistAppendDialog.fromPlayQueueItems(
Collections.singletonList(item)
PlaylistDialog.createCorrespondingDialog(
context,
Collections.singletonList(new StreamEntity(item)),
dialog -> dialog.show(
fragmentManager,
"QueueItemMenuUtil@append_playlist"
)
);
PlaylistAppendDialog.onPlaylistFound(context,
() -> d.show(fragmentManager, "QueueItemMenuUtil@append_playlist"),
() -> PlaylistCreationDialog.newInstance(d)
.show(fragmentManager, "QueueItemMenuUtil@append_playlist"));
return true;
case R.id.menu_item_share:
shareText(context, item.getTitle(), item.getUrl(),

View File

@ -1,5 +1,8 @@
package org.schabi.newpipe;
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.AUDIO;
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.VIDEO;
import android.annotation.SuppressLint;
import android.app.IntentService;
import android.content.Context;
@ -30,6 +33,7 @@ import androidx.core.widget.TextViewCompat;
import androidx.fragment.app.FragmentManager;
import androidx.preference.PreferenceManager;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.databinding.ListRadioIconItemBinding;
import org.schabi.newpipe.databinding.SingleChoiceDialogViewBinding;
import org.schabi.newpipe.download.DownloadDialog;
@ -56,6 +60,7 @@ import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.VideoStream;
import org.schabi.newpipe.ktx.ExceptionUtils;
import org.schabi.newpipe.local.dialog.PlaylistDialog;
import org.schabi.newpipe.player.MainPlayer;
import org.schabi.newpipe.player.helper.PlayerHelper;
import org.schabi.newpipe.player.helper.PlayerHolder;
@ -69,14 +74,15 @@ import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.ListHelper;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.PermissionHelper;
import org.schabi.newpipe.util.external_communication.ShareUtils;
import org.schabi.newpipe.util.ThemeHelper;
import org.schabi.newpipe.util.external_communication.ShareUtils;
import org.schabi.newpipe.util.urlfinder.UrlFinder;
import org.schabi.newpipe.views.FocusOverlayView;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import icepick.Icepick;
@ -89,9 +95,6 @@ import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.functions.Consumer;
import io.reactivex.rxjava3.schedulers.Schedulers;
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.AUDIO;
import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.VIDEO;
/**
* Get the url from the intent and open it in the chosen preferred player.
*/
@ -107,6 +110,7 @@ public class RouterActivity extends AppCompatActivity {
protected String currentUrl;
private StreamingService currentService;
private boolean selectionIsDownload = false;
private boolean selectionIsAddToPlaylist = false;
private AlertDialog alertDialogChoice = null;
@Override
@ -350,7 +354,7 @@ public class RouterActivity extends AppCompatActivity {
.setNegativeButton(R.string.just_once, dialogButtonsClickListener)
.setPositiveButton(R.string.always, dialogButtonsClickListener)
.setOnDismissListener((dialog) -> {
if (!selectionIsDownload) {
if (!selectionIsDownload && !selectionIsAddToPlaylist) {
finish();
}
})
@ -446,6 +450,10 @@ public class RouterActivity extends AppCompatActivity {
final AdapterChoiceItem backgroundPlayer = new AdapterChoiceItem(
getString(R.string.background_player_key), getString(R.string.background_player),
R.drawable.ic_headset);
final AdapterChoiceItem addToPlaylist = new AdapterChoiceItem(
getString(R.string.add_to_playlist_key), getString(R.string.add_to_playlist),
R.drawable.ic_add);
if (linkType == LinkType.STREAM) {
if (isExtVideoEnabled) {
@ -482,6 +490,10 @@ public class RouterActivity extends AppCompatActivity {
getString(R.string.download),
R.drawable.ic_file_download));
// Add to playlist is not necessary for CHANNEL and PLAYLIST linkType since those can
// not be added to a playlist
returnList.add(addToPlaylist);
} else {
returnList.add(showInfo);
if (capabilities.contains(VIDEO) && !isExtVideoEnabled) {
@ -547,6 +559,12 @@ public class RouterActivity extends AppCompatActivity {
return;
}
if (selectedChoiceKey.equals(getString(R.string.add_to_playlist_key))) {
selectionIsAddToPlaylist = true;
openAddToPlaylistDialog();
return;
}
// stop and bypass FetcherService if InfoScreen was selected since
// StreamDetailFragment can fetch data itself
if (selectedChoiceKey.equals(getString(R.string.show_info_key))) {
@ -572,6 +590,41 @@ public class RouterActivity extends AppCompatActivity {
finish();
}
private void openAddToPlaylistDialog() {
// Getting the stream info usually takes a moment
// Notifying the user here to ensure that no confusion arises
Toast.makeText(
getApplicationContext(),
getString(R.string.processing_may_take_a_moment),
Toast.LENGTH_SHORT)
.show();
disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, false)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
info -> PlaylistDialog.createCorrespondingDialog(
getThemeWrapperContext(),
Collections.singletonList(new StreamEntity(info)),
playlistDialog -> {
playlistDialog.setOnDismissListener(dialog -> finish());
playlistDialog.show(
this.getSupportFragmentManager(),
"addToPlaylistDialog"
);
}
),
throwable -> handleError(this, new ErrorInfo(
throwable,
UserAction.REQUESTED_STREAM,
"Tried to add " + currentUrl + " to a playlist",
currentService.getServiceId())
)
)
);
}
@SuppressLint("CheckResult")
private void openDownloadDialog() {
disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, true)

View File

@ -52,6 +52,7 @@ import com.squareup.picasso.Callback;
import org.schabi.newpipe.App;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.databinding.FragmentVideoDetailBinding;
import org.schabi.newpipe.download.DownloadDialog;
import org.schabi.newpipe.error.ErrorActivity;
@ -73,8 +74,7 @@ import org.schabi.newpipe.fragments.EmptyFragment;
import org.schabi.newpipe.fragments.list.comments.CommentsFragment;
import org.schabi.newpipe.fragments.list.videos.RelatedItemsFragment;
import org.schabi.newpipe.ktx.AnimationType;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.local.dialog.PlaylistCreationDialog;
import org.schabi.newpipe.local.dialog.PlaylistDialog;
import org.schabi.newpipe.local.history.HistoryRecordManager;
import org.schabi.newpipe.player.MainPlayer;
import org.schabi.newpipe.player.MainPlayer.PlayerType;
@ -99,6 +99,7 @@ import org.schabi.newpipe.util.external_communication.KoreUtils;
import org.schabi.newpipe.util.external_communication.ShareUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@ -444,12 +445,11 @@ public final class VideoDetailFragment
break;
case R.id.detail_controls_playlist_append:
if (getFM() != null && currentInfo != null) {
final PlaylistAppendDialog d = PlaylistAppendDialog.fromStreamInfo(currentInfo);
disposables.add(
PlaylistAppendDialog.onPlaylistFound(getContext(),
() -> d.show(getFM(), TAG),
() -> PlaylistCreationDialog.newInstance(d).show(getFM(), TAG)
PlaylistDialog.createCorrespondingDialog(
getContext(),
Collections.singletonList(new StreamEntity(currentInfo)),
dialog -> dialog.show(getFM(), TAG)
)
);
}

View File

@ -1,6 +1,5 @@
package org.schabi.newpipe.local.dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@ -17,20 +16,14 @@ import org.schabi.newpipe.R;
import org.schabi.newpipe.database.LocalItem;
import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.local.LocalItemListAdapter;
import org.schabi.newpipe.local.playlist.LocalPlaylistManager;
import org.schabi.newpipe.player.playqueue.PlayQueueItem;
import org.schabi.newpipe.util.OnClickGesture;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.disposables.CompositeDisposable;
import io.reactivex.rxjava3.disposables.Disposable;
public final class PlaylistAppendDialog extends PlaylistDialog {
private static final String TAG = PlaylistAppendDialog.class.getCanonicalName();
@ -40,47 +33,8 @@ public final class PlaylistAppendDialog extends PlaylistDialog {
private final CompositeDisposable playlistDisposables = new CompositeDisposable();
public static Disposable onPlaylistFound(
final Context context, final Runnable onSuccess, final Runnable onFailed
) {
final LocalPlaylistManager playlistManager =
new LocalPlaylistManager(NewPipeDatabase.getInstance(context));
return playlistManager.hasPlaylists()
.observeOn(AndroidSchedulers.mainThread())
.subscribe(hasPlaylists -> {
if (hasPlaylists) {
onSuccess.run();
} else {
onFailed.run();
}
});
}
public static PlaylistAppendDialog fromStreamInfo(final StreamInfo info) {
final PlaylistAppendDialog dialog = new PlaylistAppendDialog();
dialog.setInfo(Collections.singletonList(new StreamEntity(info)));
return dialog;
}
public static PlaylistAppendDialog fromStreamInfoItems(final List<StreamInfoItem> items) {
final PlaylistAppendDialog dialog = new PlaylistAppendDialog();
final List<StreamEntity> entities = new ArrayList<>(items.size());
for (final StreamInfoItem item : items) {
entities.add(new StreamEntity(item));
}
dialog.setInfo(entities);
return dialog;
}
public static PlaylistAppendDialog fromPlayQueueItems(final List<PlayQueueItem> items) {
final PlaylistAppendDialog dialog = new PlaylistAppendDialog();
final List<StreamEntity> entities = new ArrayList<>(items.size());
for (final PlayQueueItem item : items) {
entities.add(new StreamEntity(item));
}
dialog.setInfo(entities);
return dialog;
public PlaylistAppendDialog(final List<StreamEntity> streamEntities) {
super(streamEntities);
}
/*//////////////////////////////////////////////////////////////////////////
@ -104,11 +58,15 @@ public final class PlaylistAppendDialog extends PlaylistDialog {
playlistAdapter.setSelectedListener(new OnClickGesture<LocalItem>() {
@Override
public void selected(final LocalItem selectedItem) {
if (!(selectedItem instanceof PlaylistMetadataEntry) || getStreams() == null) {
if (!(selectedItem instanceof PlaylistMetadataEntry)
|| getStreamEntities() == null) {
return;
}
onPlaylistSelected(playlistManager, (PlaylistMetadataEntry) selectedItem,
getStreams());
onPlaylistSelected(
playlistManager,
(PlaylistMetadataEntry) selectedItem,
getStreamEntities()
);
}
});
@ -146,11 +104,17 @@ public final class PlaylistAppendDialog extends PlaylistDialog {
//////////////////////////////////////////////////////////////////////////*/
public void openCreatePlaylistDialog() {
if (getStreams() == null || !isAdded()) {
if (getStreamEntities() == null || !isAdded()) {
return;
}
PlaylistCreationDialog.newInstance(getStreams()).show(getParentFragmentManager(), TAG);
final PlaylistCreationDialog playlistCreationDialog =
new PlaylistCreationDialog(getStreamEntities());
// Move the dismissListener to the new dialog.
playlistCreationDialog.setOnDismissListener(this.getOnDismissListener());
this.setOnDismissListener(null);
playlistCreationDialog.show(getParentFragmentManager(), TAG);
requireDialog().dismiss();
}
@ -165,7 +129,7 @@ public final class PlaylistAppendDialog extends PlaylistDialog {
private void onPlaylistSelected(@NonNull final LocalPlaylistManager manager,
@NonNull final PlaylistMetadataEntry playlist,
@NonNull final List<StreamEntity> streams) {
if (getStreams() == null) {
if (getStreamEntities() == null) {
return;
}

View File

@ -7,29 +7,22 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AlertDialog.Builder;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.databinding.DialogEditTextBinding;
import org.schabi.newpipe.local.playlist.LocalPlaylistManager;
import org.schabi.newpipe.util.ThemeHelper;
import java.util.List;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
public final class PlaylistCreationDialog extends PlaylistDialog {
public static PlaylistCreationDialog newInstance(final List<StreamEntity> streams) {
final PlaylistCreationDialog dialog = new PlaylistCreationDialog();
dialog.setInfo(streams);
return dialog;
}
public static PlaylistCreationDialog newInstance(final PlaylistAppendDialog appendDialog) {
final PlaylistCreationDialog dialog = new PlaylistCreationDialog();
dialog.setInfo(appendDialog.getStreams());
return dialog;
public PlaylistCreationDialog(final List<StreamEntity> streamEntities) {
super(streamEntities);
}
/*//////////////////////////////////////////////////////////////////////////
@ -39,16 +32,18 @@ public final class PlaylistCreationDialog extends PlaylistDialog {
@NonNull
@Override
public Dialog onCreateDialog(@Nullable final Bundle savedInstanceState) {
if (getStreams() == null) {
if (getStreamEntities() == null) {
return super.onCreateDialog(savedInstanceState);
}
final DialogEditTextBinding dialogBinding
= DialogEditTextBinding.inflate(getLayoutInflater());
dialogBinding.getRoot().getContext().setTheme(ThemeHelper.getDialogTheme(requireContext()));
dialogBinding.dialogEditText.setHint(R.string.name);
dialogBinding.dialogEditText.setInputType(InputType.TYPE_CLASS_TEXT);
final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(requireContext())
final Builder dialogBuilder = new Builder(requireContext(),
ThemeHelper.getDialogTheme(requireContext()))
.setTitle(R.string.create_playlist)
.setView(dialogBinding.getRoot())
.setCancelable(true)
@ -61,11 +56,10 @@ public final class PlaylistCreationDialog extends PlaylistDialog {
R.string.playlist_creation_success,
Toast.LENGTH_SHORT);
playlistManager.createPlaylist(name, getStreams())
playlistManager.createPlaylist(name, getStreamEntities())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(longs -> successToast.show());
});
return dialogBuilder.create();
}
}

View File

@ -1,6 +1,8 @@
package org.schabi.newpipe.local.dialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.Window;
@ -8,23 +10,29 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.local.playlist.LocalPlaylistManager;
import org.schabi.newpipe.util.StateSaver;
import java.util.List;
import java.util.Queue;
import java.util.function.Consumer;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.disposables.Disposable;
public abstract class PlaylistDialog extends DialogFragment implements StateSaver.WriteRead {
@Nullable
private DialogInterface.OnDismissListener onDismissListener = null;
private List<StreamEntity> streamEntities;
private org.schabi.newpipe.util.SavedState savedState;
protected void setInfo(final List<StreamEntity> entities) {
this.streamEntities = entities;
}
protected List<StreamEntity> getStreams() {
return streamEntities;
public PlaylistDialog(final List<StreamEntity> streamEntities) {
this.streamEntities = streamEntities;
}
/*//////////////////////////////////////////////////////////////////////////
@ -43,6 +51,10 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave
StateSaver.onDestroy(savedState);
}
public List<StreamEntity> getStreamEntities() {
return streamEntities;
}
@NonNull
@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
@ -55,6 +67,14 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave
return dialog;
}
@Override
public void onDismiss(@NonNull final DialogInterface dialog) {
super.onDismiss(dialog);
if (onDismissListener != null) {
onDismissListener.onDismiss(dialog);
}
}
/*//////////////////////////////////////////////////////////////////////////
// State Saving
//////////////////////////////////////////////////////////////////////////*/
@ -84,4 +104,47 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave
savedState, outState, this);
}
}
/*//////////////////////////////////////////////////////////////////////////
// Getter + Setter
//////////////////////////////////////////////////////////////////////////*/
@Nullable
public DialogInterface.OnDismissListener getOnDismissListener() {
return onDismissListener;
}
public void setOnDismissListener(
@Nullable final DialogInterface.OnDismissListener onDismissListener
) {
this.onDismissListener = onDismissListener;
}
/*//////////////////////////////////////////////////////////////////////////
// Dialog creation
//////////////////////////////////////////////////////////////////////////*/
/**
* Creates a {@link PlaylistAppendDialog} when playlists exists,
* otherwise a {@link PlaylistCreationDialog}.
*
* @param context context used for accessing the database
* @param streamEntities used for crating the dialog
* @param onExec execution that should occur after a dialog got created, e.g. showing it
* @return Disposable
*/
public static Disposable createCorrespondingDialog(
final Context context,
final List<StreamEntity> streamEntities,
final Consumer<PlaylistDialog> onExec
) {
return new LocalPlaylistManager(NewPipeDatabase.getInstance(context))
.hasPlaylists()
.observeOn(AndroidSchedulers.mainThread())
.subscribe(hasPlaylists ->
onExec.accept(hasPlaylists
? new PlaylistAppendDialog(streamEntities)
: new PlaylistCreationDialog(streamEntities))
);
}
}

View File

@ -23,11 +23,11 @@ import androidx.recyclerview.widget.RecyclerView;
import com.google.android.exoplayer2.PlaybackParameters;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.databinding.ActivityPlayerQueueControlBinding;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.fragments.OnScrollBelowItemsListener;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.local.dialog.PlaylistCreationDialog;
import org.schabi.newpipe.local.dialog.PlaylistDialog;
import org.schabi.newpipe.player.event.PlayerEventListener;
import org.schabi.newpipe.player.helper.PlaybackParameterDialog;
import org.schabi.newpipe.player.playqueue.PlayQueue;
@ -43,6 +43,7 @@ import org.schabi.newpipe.util.ServiceHelper;
import org.schabi.newpipe.util.ThemeHelper;
import java.util.List;
import java.util.stream.Collectors;
import static org.schabi.newpipe.QueueItemMenuUtil.openPopupMenu;
import static org.schabi.newpipe.player.helper.PlayerHelper.formatSpeed;
@ -452,12 +453,12 @@ public final class PlayQueueActivity extends AppCompatActivity
}
}
private void openPlaylistAppendDialog(final List<PlayQueueItem> playlist) {
final PlaylistAppendDialog d = PlaylistAppendDialog.fromPlayQueueItems(playlist);
PlaylistAppendDialog.onPlaylistFound(getApplicationContext(),
() -> d.show(getSupportFragmentManager(), TAG),
() -> PlaylistCreationDialog.newInstance(d).show(getSupportFragmentManager(), TAG));
private void openPlaylistAppendDialog(final List<PlayQueueItem> playQueueItems) {
PlaylistDialog.createCorrespondingDialog(
getApplicationContext(),
playQueueItems.stream().map(StreamEntity::new).collect(Collectors.toList()),
dialog -> dialog.show(getSupportFragmentManager(), TAG)
);
}
////////////////////////////////////////////////////////////////////////////

View File

@ -146,7 +146,9 @@ public final class NavigationHelper {
return;
}
Toast.makeText(context, R.string.popup_playing_toast, Toast.LENGTH_SHORT).show();
if (PlayerHolder.getInstance().getType() != PlayerType.POPUP) {
Toast.makeText(context, R.string.popup_playing_toast, Toast.LENGTH_SHORT).show();
}
final Intent intent = getPlayerIntent(context, MainPlayer.class, queue, resumePlayback);
intent.putExtra(Player.PLAYER_TYPE, MainPlayer.PlayerType.POPUP.ordinal());
ContextCompat.startForegroundService(context, intent);
@ -155,8 +157,10 @@ public final class NavigationHelper {
public static void playOnBackgroundPlayer(final Context context,
final PlayQueue queue,
final boolean resumePlayback) {
Toast.makeText(context, R.string.background_player_playing_toast, Toast.LENGTH_SHORT)
.show();
if (PlayerHolder.getInstance().getType() != MainPlayer.PlayerType.AUDIO) {
Toast.makeText(context, R.string.background_player_playing_toast, Toast.LENGTH_SHORT)
.show();
}
final Intent intent = getPlayerIntent(context, MainPlayer.class, queue, resumePlayback);
intent.putExtra(Player.PLAYER_TYPE, MainPlayer.PlayerType.AUDIO.ordinal());
ContextCompat.startForegroundService(context, intent);

View File

@ -8,9 +8,10 @@ import androidx.fragment.app.Fragment;
import org.schabi.newpipe.NewPipeDatabase;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.local.dialog.PlaylistCreationDialog;
import org.schabi.newpipe.local.dialog.PlaylistDialog;
import org.schabi.newpipe.local.history.HistoryRecordManager;
import org.schabi.newpipe.player.playqueue.SinglePlayQueue;
import org.schabi.newpipe.util.external_communication.KoreUtils;
@ -81,14 +82,16 @@ public enum StreamDialogEntry {
delete(R.string.delete, (fragment, item) -> {
}), // has to be set manually
append_playlist(R.string.append_playlist, (fragment, item) -> {
final PlaylistAppendDialog d = PlaylistAppendDialog
.fromStreamInfoItems(Collections.singletonList(item));
PlaylistAppendDialog.onPlaylistFound(fragment.getContext(),
() -> d.show(fragment.getParentFragmentManager(), "StreamDialogEntry@append_playlist"),
() -> PlaylistCreationDialog.newInstance(d)
.show(fragment.getParentFragmentManager(), "StreamDialogEntry@create_playlist")
append_playlist(R.string.add_to_playlist, (fragment, item) -> {
PlaylistDialog.createCorrespondingDialog(
fragment.getContext(),
Collections.singletonList(new StreamEntity(item)),
dialog -> dialog.show(
fragment.getParentFragmentManager(),
"StreamDialogEntry@"
+ (dialog instanceof PlaylistAppendDialog ? "append" : "create")
+ "_playlist"
)
);
}),

View File

@ -444,7 +444,7 @@
android:layout_weight="1"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/append_playlist"
android:contentDescription="@string/add_to_playlist"
android:focusable="true"
android:gravity="center"
android:paddingVertical="@dimen/detail_control_padding"

View File

@ -430,7 +430,7 @@
android:layout_weight="1"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/append_playlist"
android:contentDescription="@string/add_to_playlist"
android:focusable="true"
android:gravity="center"
android:paddingVertical="@dimen/detail_control_padding"

View File

@ -6,7 +6,7 @@
<item
android:id="@+id/action_append_playlist"
android:icon="@drawable/ic_playlist_add"
android:title="@string/append_playlist"
android:title="@string/add_to_playlist"
android:visible="true"
app:showAsAction="ifRoom" />

View File

@ -9,7 +9,7 @@
android:title="@string/play_queue_stream_detail" />
<item
android:id="@+id/menu_item_append_playlist"
android:title="@string/append_playlist" />
android:title="@string/add_to_playlist" />
<item
android:id="@+id/menu_item_share"
android:title="@string/share" />

View File

@ -235,7 +235,7 @@
<string name="create_playlist">إنشاء قائمة تشغيل جديدة</string>
<string name="rename_playlist">إعادة تسمية</string>
<string name="name">التسمية</string>
<string name="append_playlist">إضافة إلى قائمة التشغيل</string>
<string name="add_to_playlist">إضافة إلى قائمة التشغيل</string>
<string name="delete_playlist_prompt">هل تريد حذف قائمة التشغيل هذه؟</string>
<string name="playlist_creation_success">تم إنشاء قائمة التشغيل</string>
<string name="playlist_add_stream_success">تمت إضافتها إلى قائمة التشغيل</string>

View File

@ -132,7 +132,7 @@
<string name="dismiss">Escartar</string>
<string name="create_playlist">Llista de reproducción nueva</string>
<string name="name">Nome</string>
<string name="append_playlist">Amestar a una llista de reproducción</string>
<string name="add_to_playlist">Amestar a una llista de reproducción</string>
<string name="delete_playlist_prompt">¿Desanicair esta llista de reproducción\?</string>
<string name="caption_none">Ensin sotítulos</string>
<string name="resize_fit">Axustar</string>

View File

@ -534,7 +534,7 @@
<string name="set_as_playlist_thumbnail">Pleylist eskizi sifatida o\'rnating</string>
<string name="unmute">Unmute rejimi</string>
<string name="mute">Mute rejimi</string>
<string name="append_playlist">Playlist qo\'shish</string>
<string name="add_to_playlist">Playlist qo\'shish</string>
<string name="name">Nomi</string>
<string name="rename_playlist">Nomni o\'zgartirish</string>
<string name="create_playlist">Yangi Playlist</string>

View File

@ -259,7 +259,7 @@
<string name="create_playlist">新建播放列表</string>
<string name="rename_playlist">重命名</string>
<string name="name">名称</string>
<string name="append_playlist">添加至播放列表</string>
<string name="add_to_playlist">添加至播放列表</string>
<string name="set_as_playlist_thumbnail">设为播放列表封面</string>
<string name="bookmark_playlist">收藏播放列表</string>
<string name="unbookmark_playlist">删除收藏</string>

View File

@ -274,7 +274,7 @@
<string name="create_playlist">Стварыць плэйліст</string>
<string name="rename_playlist">Перайменаваць</string>
<string name="name">Імя</string>
<string name="append_playlist">Дадаць у плэйліст</string>
<string name="add_to_playlist">Дадаць у плэйліст</string>
<string name="set_as_playlist_thumbnail">На мініяцюру плэйліста</string>
<string name="bookmark_playlist">Дадаць плэйліст у закладкі</string>
<string name="unbookmark_playlist">Выдаліць закладку</string>

View File

@ -267,7 +267,7 @@
<string name="create_playlist">Нов Плейлист</string>
<string name="rename_playlist">Преименувай</string>
<string name="name">Име</string>
<string name="append_playlist">Добави Към Плейлист</string>
<string name="add_to_playlist">Добави Към Плейлист</string>
<string name="set_as_playlist_thumbnail">Задай като миниатюра на плейлиста</string>
<string name="bookmark_playlist">Миниатюрата на плейлиста е сменена</string>
<string name="unbookmark_playlist">Премахни отметката</string>

View File

@ -188,7 +188,7 @@
<string name="unbookmark_playlist">বুকমার্ক মুছুন</string>
<string name="unmute">আন মিউট</string>
<string name="mute">মিউট</string>
<string name="append_playlist">প্লে লিস্ট এ যুক্ত করুন</string>
<string name="add_to_playlist">প্লে লিস্ট এ যুক্ত করুন</string>
<string name="name">নাম</string>
<string name="create_playlist">নতুন প্লে লিস্ট</string>
<string name="always_ask_open_action">সবসময় জিজ্ঞেস করুন</string>

View File

@ -167,7 +167,7 @@
<string name="delete_playlist_prompt">প্লে লিস্ট ডিলিট করতে চান\?</string>
<string name="unmute">আন মিউট</string>
<string name="mute">মিউট</string>
<string name="append_playlist">প্লে লিস্ট এ যুক্ত করুন</string>
<string name="add_to_playlist">প্লে লিস্ট এ যুক্ত করুন</string>
<string name="always_ask_open_action">সবসময় জিজ্ঞেস করুন</string>
<string name="video_player">ভিডিও প্লেয়ার</string>
<string name="drawer_close">ড্রয়ার বন্ধ করুন</string>

View File

@ -37,7 +37,7 @@
<string name="unbookmark_playlist">বুকমার্ক মুছুন</string>
<string name="unmute">আন মিউট</string>
<string name="mute">মিউট</string>
<string name="append_playlist">প্লে লিস্ট এ যুক্ত করুন</string>
<string name="add_to_playlist">প্লে লিস্ট এ যুক্ত করুন</string>
<string name="name">নাম</string>
<string name="rename_playlist">নাম পাল্টাও</string>
<string name="create_playlist">নতুন প্লে লিস্ট</string>

View File

@ -86,7 +86,7 @@
<string name="create_playlist">Crea una llista de reproducció</string>
<string name="rename_playlist">Canvia el nom</string>
<string name="name">Nom</string>
<string name="append_playlist">Afegeix a una llista de reproducció</string>
<string name="add_to_playlist">Afegeix a una llista de reproducció</string>
<string name="import_title">Importa</string>
<string name="import_from">Importa des de</string>
<string name="export_to">Exporta a</string>

View File

@ -403,7 +403,7 @@
<string name="msg_name">ناوفایل</string>
<string name="set_as_playlist_thumbnail">دانان لەسەر وێنۆچکەی خشتەلێدان</string>
<string name="title_activity_about">دەربارەی نیوپایپ</string>
<string name="append_playlist">زیادکردن بۆ خشتەلێدان</string>
<string name="add_to_playlist">زیادکردن بۆ خشتەلێدان</string>
<string name="unknown_content">(نەزانراو)</string>
<string name="app_language_title">زمانی به‌رنامه‌</string>
<string name="kiosk_page_summary">پەڕەی کیۆسک</string>

View File

@ -234,7 +234,7 @@
<string name="create_playlist">Nový playlist</string>
<string name="rename_playlist">Přejmenovat</string>
<string name="name">Jméno</string>
<string name="append_playlist">Přidat do playlistu</string>
<string name="add_to_playlist">Přidat do playlistu</string>
<string name="set_as_playlist_thumbnail">Nastavit jako miniaturu playlistu</string>
<string name="bookmark_playlist">Přidat playlist do záložek</string>
<string name="unbookmark_playlist">Smazat záložku</string>

View File

@ -270,7 +270,7 @@
<string name="create_playlist">Ny spilleliste</string>
<string name="rename_playlist">Omdøb</string>
<string name="name">Navn</string>
<string name="append_playlist">Føj til spilleliste</string>
<string name="add_to_playlist">Føj til spilleliste</string>
<string name="delete_playlist_prompt">Slet denne spilleliste\?</string>
<string name="playlist_creation_success">Spilleliste oprettet</string>
<string name="caption_none">Ingen undertekster</string>

View File

@ -228,7 +228,7 @@
<string name="always_ask_open_action">Immer fragen</string>
<string name="create_playlist">Neue Wiedergabeliste</string>
<string name="rename_playlist">Umbenennen</string>
<string name="append_playlist">Zur Wiedergabeliste hinzufügen</string>
<string name="add_to_playlist">Zur Wiedergabeliste hinzufügen</string>
<string name="set_as_playlist_thumbnail">Als Vorschaubild der Wiedergabeliste festlegen</string>
<string name="unbookmark_playlist">Lesezeichen entfernen</string>
<string name="delete_playlist_prompt">Diese Wiedergabeliste löschen?</string>

View File

@ -270,7 +270,7 @@
<string name="create_playlist">Νέα λίστα αναπαραγωγής</string>
<string name="rename_playlist">Μετονομασία</string>
<string name="name">Όνομα</string>
<string name="append_playlist">Προσθήκη σε λίστα αναπαραγωγής</string>
<string name="add_to_playlist">Προσθήκη σε λίστα αναπαραγωγής</string>
<string name="set_as_playlist_thumbnail">Ορισμός ως μικρογραφία λίστας αναπαραγωγής</string>
<string name="bookmark_playlist">Προσθήκη σελιδοδείκτη στη λίστα</string>
<string name="unbookmark_playlist">Διαγραφή σελιδοδείκτη</string>

View File

@ -153,7 +153,7 @@
<string name="create_playlist">Nova ludlisto</string>
<string name="rename_playlist">Alinomi</string>
<string name="name">Nomo</string>
<string name="append_playlist">Aldoni al la ludlisto</string>
<string name="add_to_playlist">Aldoni al la ludlisto</string>
<string name="set_as_playlist_thumbnail">Meti kiel bildeto de ludlisto</string>
<string name="bookmark_playlist">Legosigno Ludlisto</string>
<string name="unbookmark_playlist">Forviŝi Legosignon</string>

View File

@ -231,7 +231,7 @@
<string name="create_playlist">Lista de reproducción nueva</string>
<string name="rename_playlist">Cambiar nombre</string>
<string name="name">Nombre</string>
<string name="append_playlist">Añadir a la lista de reproducción</string>
<string name="add_to_playlist">Añadir a la lista de reproducción</string>
<string name="set_as_playlist_thumbnail">Definir como miniatura de lista de reproducción</string>
<string name="bookmark_playlist">Marcar lista de reproducción</string>
<string name="unbookmark_playlist">Quitar marcador</string>

View File

@ -256,7 +256,7 @@
<string name="create_playlist">Uus esitusloend</string>
<string name="rename_playlist">Nimeta ümber</string>
<string name="name">Nimi</string>
<string name="append_playlist">Lisa esitusloendisse</string>
<string name="add_to_playlist">Lisa esitusloendisse</string>
<string name="set_as_playlist_thumbnail">Määra esitusloendi pisipildiks</string>
<string name="bookmark_playlist">Lisa esitusloend järjehoidjaks</string>
<string name="unbookmark_playlist">Eemalda järjehoidja</string>

View File

@ -259,7 +259,7 @@
<string name="create_playlist">Erreprodukzio-zerrenda berria</string>
<string name="rename_playlist">Aldatu izena</string>
<string name="name">Izena</string>
<string name="append_playlist">Gehitu erreprodukzio-zerrendara</string>
<string name="add_to_playlist">Gehitu erreprodukzio-zerrendara</string>
<string name="set_as_playlist_thumbnail">Ezarri erreprodukzio-zerrendaren iruditxo gisa</string>
<string name="bookmark_playlist">Gogoko erreprodukzio-zerrenda</string>
<string name="unbookmark_playlist">Kendu gogokoa</string>

View File

@ -217,7 +217,7 @@
<string name="create_playlist">فهرست پخش جدید</string>
<string name="rename_playlist">تغییر نام</string>
<string name="name">نام</string>
<string name="append_playlist">افزودن به سیاههٔ پخش</string>
<string name="add_to_playlist">افزودن به سیاههٔ پخش</string>
<string name="set_as_playlist_thumbnail">تنظیم برای تصویر سیاههٔ پخش</string>
<string name="delete_playlist_prompt">این فهرست پخش پاک شود؟</string>
<string name="playlist_creation_success">فهرست پخش ایجاد شد</string>

View File

@ -271,7 +271,7 @@
<string name="create_playlist">Uusi soittolista</string>
<string name="rename_playlist">Uudelleennimeä</string>
<string name="name">Nimi</string>
<string name="append_playlist">Lisää soittolistaan</string>
<string name="add_to_playlist">Lisää soittolistaan</string>
<string name="set_as_playlist_thumbnail">Aseta soittolistan kuvakkeeksi</string>
<string name="bookmark_playlist">Tallenna soittolista kirjanmerkkeihin</string>
<string name="unbookmark_playlist">Poista kirjanmerkki</string>

View File

@ -230,7 +230,7 @@
<string name="create_playlist">Nouvelle liste de lecture</string>
<string name="rename_playlist">Renommer</string>
<string name="name">Nom</string>
<string name="append_playlist">Ajouter à la liste de lecture</string>
<string name="add_to_playlist">Ajouter à la liste de lecture</string>
<string name="set_as_playlist_thumbnail">Définir comme miniature de la liste de lecture</string>
<string name="bookmark_playlist">Enregister la liste de lecture</string>
<string name="unbookmark_playlist">Supprimer le signet</string>

View File

@ -270,7 +270,7 @@
<string name="create_playlist">Nova lista de reprodución</string>
<string name="rename_playlist">Renomear</string>
<string name="name">Nome</string>
<string name="append_playlist">Engadir á lista de reprodución</string>
<string name="add_to_playlist">Engadir á lista de reprodución</string>
<string name="set_as_playlist_thumbnail">Estabelecer como miniatura da lista de reprodución</string>
<string name="bookmark_playlist">Gardar a lista de reprodución nos marcadores</string>
<string name="unbookmark_playlist">Eliminar o marcador</string>

View File

@ -240,7 +240,7 @@
<string name="create_playlist">רשימת נגינה חדשה</string>
<string name="rename_playlist">שינוי שם</string>
<string name="name">שם</string>
<string name="append_playlist">הוספה לרשימת נגינה</string>
<string name="add_to_playlist">הוספה לרשימת נגינה</string>
<string name="bookmark_playlist">הוספת רשימת נגינה לסימניות</string>
<string name="unbookmark_playlist">הסרת סימנייה</string>
<string name="delete_playlist_prompt">למחוק רשימת נגינה זו\?</string>

View File

@ -230,7 +230,7 @@
<string name="create_playlist">नई प्लेलिस्ट</string>
<string name="rename_playlist">नाम बदलें</string>
<string name="name">नाम</string>
<string name="append_playlist">प्लेलिस्ट में जोड़ें</string>
<string name="add_to_playlist">प्लेलिस्ट में जोड़ें</string>
<string name="set_as_playlist_thumbnail">प्लेलिस्ट थंबनेल के रूप में सेट करें</string>
<string name="bookmark_playlist">प्लेलिस्ट बुकमार्क करें</string>
<string name="unbookmark_playlist">बुकमार्क हटायें</string>

View File

@ -202,7 +202,7 @@
<string name="create_playlist">Nova playlista</string>
<string name="rename_playlist">Preimenuj</string>
<string name="name">Ime</string>
<string name="append_playlist">Dodaj u playlistu</string>
<string name="add_to_playlist">Dodaj u playlistu</string>
<string name="set_as_playlist_thumbnail">Postavi kao minijaturu playliste</string>
<string name="bookmark_playlist">Zabilježi playlistu</string>
<string name="unbookmark_playlist">Ukloni zabilješku</string>

View File

@ -254,7 +254,7 @@
<string name="create_playlist">Új lejátszási lista</string>
<string name="rename_playlist">Átnevezés</string>
<string name="name">Név</string>
<string name="append_playlist">Lejátszási listához adás</string>
<string name="add_to_playlist">Lejátszási listához adás</string>
<string name="set_as_playlist_thumbnail">Beállítás lejátszási lista indexképeként</string>
<string name="unbookmark_playlist">Könyvjelző törlése</string>
<string name="delete_playlist_prompt">Törlődjön ez a lejátszási lista\?</string>

View File

@ -229,7 +229,7 @@
<string name="create_playlist">Daftar Putar Baru</string>
<string name="rename_playlist">Ubah Nama</string>
<string name="name">Nama</string>
<string name="append_playlist">Tambah ke daftar putar</string>
<string name="add_to_playlist">Tambah ke daftar putar</string>
<string name="set_as_playlist_thumbnail">Atur sebagai thumbnail daftar putar</string>
<string name="bookmark_playlist">Markah Daftar Putar</string>
<string name="unbookmark_playlist">Hapus Markah</string>

View File

@ -231,7 +231,7 @@
<string name="create_playlist">Nuova playlist</string>
<string name="rename_playlist">Rinomina</string>
<string name="name">Nome</string>
<string name="append_playlist">Aggiungi alla playlist</string>
<string name="add_to_playlist">Aggiungi alla playlist</string>
<string name="set_as_playlist_thumbnail">Imposta come copertina della playlist</string>
<string name="bookmark_playlist">Salva playlist</string>
<string name="unbookmark_playlist">Rimuovi playlist</string>

View File

@ -221,7 +221,7 @@
<string name="create_playlist">新規プレイリスト</string>
<string name="rename_playlist">変更</string>
<string name="name">プレイリスト名</string>
<string name="append_playlist">プレイリストに追加</string>
<string name="add_to_playlist">プレイリストに追加</string>
<string name="set_as_playlist_thumbnail">プレイリストのサムネイルに設定</string>
<string name="bookmark_playlist">プレイリストをブックマーク</string>
<string name="unbookmark_playlist">ブックマークを削除</string>

View File

@ -498,7 +498,7 @@
<string name="set_as_playlist_thumbnail">Wekî Thumbnailê Lîsteya Lîsteyê saz bikin</string>
<string name="unmute">Bê deng kirin</string>
<string name="mute">Bêdeng</string>
<string name="append_playlist">Li lîsteyê zêde bike</string>
<string name="add_to_playlist">Li lîsteyê zêde bike</string>
<string name="name">Nav</string>
<string name="rename_playlist">Navlêkirin</string>
<string name="create_playlist">Lîstinê ya nû</string>

View File

@ -230,7 +230,7 @@
<string name="create_playlist">새로운 재생목록</string>
<string name="rename_playlist">이름 바꾸기</string>
<string name="name">이름</string>
<string name="append_playlist">재생목록에 추가</string>
<string name="add_to_playlist">재생목록에 추가</string>
<string name="set_as_playlist_thumbnail">재생목록 썸네일로 설정</string>
<string name="bookmark_playlist">재생목록 북마크하기</string>
<string name="unbookmark_playlist">북마크 제거하기</string>

View File

@ -212,7 +212,7 @@
<string name="create_playlist">لیستەلێدانی نوێ</string>
<string name="rename_playlist">ناولێنانەوە</string>
<string name="name">ناو</string>
<string name="append_playlist">زیادکردن بۆ لیستەلێدان</string>
<string name="add_to_playlist">زیادکردن بۆ لیستەلێدان</string>
<string name="set_as_playlist_thumbnail">دانان لەسەر وێنۆچکەی لیستەلێدان</string>
<string name="bookmark_playlist">لیستەلێدانی نیشانەکراو</string>
<string name="unbookmark_playlist">لادانی نیشانەکراو</string>

View File

@ -235,7 +235,7 @@
<string name="create_playlist">Naujas grojaraštį</string>
<string name="rename_playlist">Pervadinti</string>
<string name="name">Pavadinimas</string>
<string name="append_playlist">Pridėti į grojaraštį</string>
<string name="add_to_playlist">Pridėti į grojaraštį</string>
<string name="set_as_playlist_thumbnail">Nustatyti kaip grojaraščio miniatiūrą</string>
<string name="bookmark_playlist">Pridėti grojaraštį į žymes</string>
<string name="unbookmark_playlist">Pašalinti žymes</string>

View File

@ -5,7 +5,7 @@
<string name="playlist_creation_success">Atskaņošanas saraksts radīts</string>
<string name="delete_playlist_prompt">Dzēst atskaņošanas sarakstu\?</string>
<string name="set_as_playlist_thumbnail">Iestatīt, kā atskaņošanas saraksta attēlu</string>
<string name="append_playlist">Pievienot atskaņošanas sarakstam</string>
<string name="add_to_playlist">Pievienot atskaņošanas sarakstam</string>
<string name="name">Vārds</string>
<string name="rename_playlist">Pārsaukt</string>
<string name="create_playlist">Jauns Atskaņošanas Saraksts</string>

View File

@ -248,7 +248,7 @@
<string name="create_playlist">Создај нова плејлиста</string>
<string name="rename_playlist">Прекрсти плејлиста</string>
<string name="name">Име</string>
<string name="append_playlist">Додај во плејлиста</string>
<string name="add_to_playlist">Додај во плејлиста</string>
<string name="set_as_playlist_thumbnail">Постави како икона на плејлистата</string>
<string name="bookmark_playlist">Обележи ја плејлистата</string>
<string name="unbookmark_playlist">Избриши ја белешката</string>

View File

@ -54,7 +54,7 @@
<string name="set_as_playlist_thumbnail">പ്ലേലിസ്റ്റ് ലഘുചിത്രമായി സജ്ജമാക്കുക</string>
<string name="unmute">അൺമ്യൂട്ട്</string>
<string name="mute">മ്യൂട്ട്</string>
<string name="append_playlist">പ്ലേലിസ്റ്റിലേക്ക് ചേർക്കുക</string>
<string name="add_to_playlist">പ്ലേലിസ്റ്റിലേക്ക് ചേർക്കുക</string>
<string name="name">പേര്</string>
<string name="rename_playlist">പേര് മാറ്റുക</string>
<string name="create_playlist">പുതിയ പ്ലേലിസ്റ്റ്</string>

View File

@ -284,7 +284,7 @@
<string name="create_playlist">Senarai Main Baru</string>
<string name="rename_playlist">Namakan semula</string>
<string name="name">Nama</string>
<string name="append_playlist">Tambah ke Senarai Main</string>
<string name="add_to_playlist">Tambah ke Senarai Main</string>
<string name="set_as_playlist_thumbnail">Tetapkan sebagai Thumbnail Senarai Main</string>
<string name="bookmark_playlist">Menanda senarai main</string>
<string name="unbookmark_playlist">Hapuskan Penanda Halaman</string>

View File

@ -231,7 +231,7 @@
<string name="create_playlist">Ny spilleliste</string>
<string name="rename_playlist">Gi nytt navn</string>
<string name="name">Navn</string>
<string name="append_playlist">Legg til i spilleliste</string>
<string name="add_to_playlist">Legg til i spilleliste</string>
<string name="set_as_playlist_thumbnail">Sett som miniatyrbilde for spilleliste</string>
<string name="bookmark_playlist">Bokmerk spilleliste</string>
<string name="unbookmark_playlist">Fjern bokmerke</string>

View File

@ -292,7 +292,7 @@
<string name="create_playlist">नया प्लेलिस्ट</string>
<string name="rename_playlist">पुनः नामकरण</string>
<string name="name">नाम</string>
<string name="append_playlist">प्लेसूचीमा थप्नुहोस</string>
<string name="add_to_playlist">प्लेसूचीमा थप्नुहोस</string>
<string name="set_as_playlist_thumbnail">प्लेलिस्ट थम्बनेल रूपमा सेट</string>
<string name="bookmark_playlist">बुकमार्क प्लेलिस्ट</string>
<string name="unbookmark_playlist">बुकमार्क हटाउ</string>

View File

@ -252,7 +252,7 @@
<string name="create_playlist">Nieuwe afspeellijst</string>
<string name="rename_playlist">Hernoemen</string>
<string name="name">Naam</string>
<string name="append_playlist">Toevoegen aan afspeellijst</string>
<string name="add_to_playlist">Toevoegen aan afspeellijst</string>
<string name="set_as_playlist_thumbnail">Instellen als miniatuur voor afspeellijst</string>
<string name="bookmark_playlist">Afspeellijst toevoegen aan bladwijzers</string>
<string name="unbookmark_playlist">Bladwijzer verwijderen</string>

View File

@ -231,7 +231,7 @@
<string name="create_playlist">Nieuwe afspeellijst</string>
<string name="rename_playlist">Naam wijzigen</string>
<string name="name">Naam</string>
<string name="append_playlist">Toevoegen aan afspeellijst</string>
<string name="add_to_playlist">Toevoegen aan afspeellijst</string>
<string name="set_as_playlist_thumbnail">Instellen als miniatuur voor afspeellijst</string>
<string name="bookmark_playlist">Afspeellijst toevoegen aan bladwijzers</string>
<string name="unbookmark_playlist">Bladwijzer verwijderen</string>

View File

@ -259,7 +259,7 @@
<string name="create_playlist">ਨਵੀਂ ਪਲੇ-ਲਿਸਟ</string>
<string name="rename_playlist">ਨਾਮ ਬਦਲੋ</string>
<string name="name">ਨਾਮ</string>
<string name="append_playlist">ਪਲੇ-ਸੂਚੀ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ</string>
<string name="add_to_playlist">ਪਲੇ-ਸੂਚੀ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ</string>
<string name="set_as_playlist_thumbnail">ਬਤੌਰ ਪਲੇ-ਸੂਚੀ ਥਮਨੇਲ ਸੈੱਟ ਕਰੋ</string>
<string name="bookmark_playlist">ਬੁੱਕਮਾਰਕ ਪਲੇ-ਲਿਸਟ</string>
<string name="unbookmark_playlist">ਬੁੱਕਮਾਰਕ ਹਟਾਓ</string>

View File

@ -238,7 +238,7 @@
<string name="create_playlist">Nowa playlista</string>
<string name="rename_playlist">Zmień nazwę</string>
<string name="name">Nazwa</string>
<string name="append_playlist">Dodaj do playlisty</string>
<string name="add_to_playlist">Dodaj do playlisty</string>
<string name="set_as_playlist_thumbnail">Ustaw jako miniaturę playlisty</string>
<string name="bookmark_playlist">Dodaj do ulubionych</string>
<string name="unbookmark_playlist">Usuń z ulubionych</string>

View File

@ -229,7 +229,7 @@
<string name="create_playlist">Nova playlist</string>
<string name="rename_playlist">Renomear</string>
<string name="name">Nome</string>
<string name="append_playlist">Adicionar à Playlist</string>
<string name="add_to_playlist">Adicionar à Playlist</string>
<string name="set_as_playlist_thumbnail">Definir Como Capa da Playlist</string>
<string name="bookmark_playlist">Favoritar playlist</string>
<string name="unbookmark_playlist">Desfavoritar</string>

View File

@ -504,7 +504,7 @@
<string name="use_inexact_seek_title">Utilizar pesquisa rápida</string>
<string name="override_current_data">Está prestes a substituir a configuração atual.</string>
<string name="switch_to_popup">Mudar para popup</string>
<string name="append_playlist">Adicionar à lista de reprodução</string>
<string name="add_to_playlist">Adicionar à lista de reprodução</string>
<string name="popup_playing_toast">Reproduzir no modo poppup</string>
<string name="feed_use_dedicated_fetch_method_help_text">Acha que a fonte demora muito tempo a carregar\? Se sim, tente ativar o carregamento rápido (pode alterar a opção nas definições ou no botão abaixo).
\n

View File

@ -242,7 +242,7 @@
<string name="preferred_player_fetcher_notification_message">A carregar o conteúdo solicitado</string>
<string name="create_playlist">Nova lista de reprodução</string>
<string name="rename_playlist">Mudar nome</string>
<string name="append_playlist">Adicionar à lista de reprodução</string>
<string name="add_to_playlist">Adicionar à lista de reprodução</string>
<string name="bookmark_playlist">Guardar lista de reprodução como favorita</string>
<string name="unbookmark_playlist">Remover marcador</string>
<string name="delete_playlist_prompt">Eliminar esta lista de reprodução\?</string>

View File

@ -266,7 +266,7 @@
<string name="delete_view_history_alert">Ștergeți întregul istoric al vizionărilor\?</string>
<string name="one_item_deleted">1 element șters.</string>
<string name="create_playlist">Playlist nou</string>
<string name="append_playlist">Adăugați la playlist</string>
<string name="add_to_playlist">Adăugați la playlist</string>
<string name="import_title">Importare</string>
<string name="import_from">Importați din</string>
<string name="export_to">Exportați în</string>

View File

@ -256,7 +256,7 @@
<string name="create_playlist">Новый плейлист</string>
<string name="rename_playlist">Переименовать</string>
<string name="name">Имя</string>
<string name="append_playlist">В плейлист</string>
<string name="add_to_playlist">В плейлист</string>
<string name="set_as_playlist_thumbnail">На миниатюру плейлиста</string>
<string name="bookmark_playlist">Сохранить плейлист</string>
<string name="unbookmark_playlist">Удалить плейлист</string>

View File

@ -39,7 +39,7 @@
<string name="set_as_playlist_thumbnail">Imposta che a miniadura de s\'iscalita</string>
<string name="unmute">Allughe su sonu</string>
<string name="mute">Pone a sa muda</string>
<string name="append_playlist">Annanghe a s\'iscalita</string>
<string name="add_to_playlist">Annanghe a s\'iscalita</string>
<string name="name">Nùmene</string>
<string name="rename_playlist">Càmbia de nùmene</string>
<string name="create_playlist">Iscalita noa</string>

View File

@ -234,7 +234,7 @@
<string name="create_playlist">Nový zoznam skladieb</string>
<string name="rename_playlist">Premenovať</string>
<string name="name">Názov</string>
<string name="append_playlist">Pridať do zoznamu skladieb</string>
<string name="add_to_playlist">Pridať do zoznamu skladieb</string>
<string name="set_as_playlist_thumbnail">Nastaviť ako miniatúru zoznamu skladieb</string>
<string name="bookmark_playlist">Záložka zoznamu skladieb</string>
<string name="unbookmark_playlist">Odstrániť Záložku</string>

View File

@ -247,7 +247,7 @@
<string name="resize_fill">Napolni</string>
<string name="playlist_creation_success">Seznam predvajanja je bil ustvarjen</string>
<string name="delete_playlist_prompt">Izbrišem seznam predvajanja\?</string>
<string name="append_playlist">Dodaj v seznam predvajanja</string>
<string name="add_to_playlist">Dodaj v seznam predvajanja</string>
<string name="rename_playlist">Preimenuj</string>
<string name="create_playlist">Nov seznam predvajanja</string>
<string name="preferred_player_fetcher_notification_message">Nalaganje zahtevano vsebino</string>

View File

@ -115,7 +115,7 @@
<string name="bookmark_playlist">Calaamadso Xulka</string>
<string name="set_as_playlist_thumbnail">Ku fadhiisi galka xulka</string>
<string name="unmute">Ka hadalsii</string>
<string name="append_playlist">Ku dar xul</string>
<string name="add_to_playlist">Ku dar xul</string>
<string name="rename_playlist">Magaca ka baddal</string>
<string name="create_playlist">Xul Cusub</string>
<string name="preferred_player_fetcher_notification_message">Soo kicinaya shayga la codsaday</string>

View File

@ -183,7 +183,7 @@
<string name="set_as_playlist_thumbnail">Vendose si pamjen statike të listës së luajtjes</string>
<string name="unmute">Me zë</string>
<string name="mute">Pa zë</string>
<string name="append_playlist">Shto në listën e luajtjes</string>
<string name="add_to_playlist">Shto në listën e luajtjes</string>
<string name="name">Emri</string>
<string name="rename_playlist">Riemërto</string>
<string name="create_playlist">Listë Luajtje e Re</string>

View File

@ -350,7 +350,7 @@
<string name="set_as_playlist_thumbnail">Постави као сличицу листе</string>
<string name="unmute">Упали звук</string>
<string name="mute">Утишај</string>
<string name="append_playlist">Додај на листу</string>
<string name="add_to_playlist">Додај на листу</string>
<string name="name">Назив</string>
<string name="rename_playlist">Преименуј</string>
<string name="create_playlist">Нова листа</string>

View File

@ -271,7 +271,7 @@
<string name="create_playlist">Ny spellista</string>
<string name="rename_playlist">Byt namn</string>
<string name="name">Namn</string>
<string name="append_playlist">Lägg till i spellista</string>
<string name="add_to_playlist">Lägg till i spellista</string>
<string name="set_as_playlist_thumbnail">Använd som spellistans miniatyrbild</string>
<string name="bookmark_playlist">Bokmärk spellistan</string>
<string name="unbookmark_playlist">Ta bort bokmärke</string>

View File

@ -270,7 +270,7 @@
<string name="create_playlist">เพลย์ลิสต์ใหม่</string>
<string name="rename_playlist">เปลี่ยนชื่อ</string>
<string name="name">ชื่อ</string>
<string name="append_playlist">เพิ่มในเพลย์ลิสต์</string>
<string name="add_to_playlist">เพิ่มในเพลย์ลิสต์</string>
<string name="set_as_playlist_thumbnail">ตั้งเป็นรูปขนาดย่อของเพลย์ลิสต์</string>
<string name="bookmark_playlist">เก็บเพลย์ลิสต์</string>
<string name="unbookmark_playlist">เอาที่คั่นหน้าออก</string>

View File

@ -227,7 +227,7 @@
<string name="create_playlist">Yeni Oynatma Listesi</string>
<string name="rename_playlist">Yeniden adlandır</string>
<string name="name">Ad</string>
<string name="append_playlist">Oynatma listesine ekle</string>
<string name="add_to_playlist">Oynatma listesine ekle</string>
<string name="set_as_playlist_thumbnail">Oynatma listesi küçük resmi olarak ayarla</string>
<string name="bookmark_playlist">Oynatma listesini yer imlerine ekle</string>
<string name="unbookmark_playlist">Yer imini kaldır</string>

View File

@ -240,7 +240,7 @@
<string name="create_playlist">Нова добірка</string>
<string name="rename_playlist">Перейменувати</string>
<string name="name">Назва</string>
<string name="append_playlist">Додати в добірку</string>
<string name="add_to_playlist">Додати в добірку</string>
<string name="set_as_playlist_thumbnail">Призначити ескізом добірки</string>
<string name="bookmark_playlist">Додати добірку до закладок</string>
<string name="unbookmark_playlist">Видалити закладку</string>

View File

@ -248,7 +248,7 @@
<string name="create_playlist">نئی پلے لسٹ</string>
<string name="rename_playlist">نام تبدیل کریں</string>
<string name="name">نام</string>
<string name="append_playlist">پلے لسٹ میں شامل</string>
<string name="add_to_playlist">پلے لسٹ میں شامل</string>
<string name="set_as_playlist_thumbnail">بطور پلے لسٹ انگشتی طے کریں</string>
<string name="bookmark_playlist">پلے لسٹ کو نشان زد کریں</string>
<string name="unbookmark_playlist">نشان زد حدف کریں</string>

View File

@ -267,7 +267,7 @@
<string name="create_playlist">Tạo playlist mới</string>
<string name="rename_playlist">Đổi tên playlist</string>
<string name="name">Tên</string>
<string name="append_playlist">Thêm vào danh sách phát</string>
<string name="add_to_playlist">Thêm vào danh sách phát</string>
<string name="set_as_playlist_thumbnail">Đặt làm hình thu nhỏ của danh sách phát</string>
<string name="bookmark_playlist">Đánh dấu playlist này</string>
<string name="unbookmark_playlist">Xóa dấu trang</string>

View File

@ -259,7 +259,7 @@
<string name="create_playlist">新建播放列表</string>
<string name="rename_playlist">重 命名</string>
<string name="name">名称</string>
<string name="append_playlist">添加到播放列表</string>
<string name="add_to_playlist">添加到播放列表</string>
<string name="set_as_playlist_thumbnail">设为播放列表缩略图</string>
<string name="bookmark_playlist">收藏播放列表</string>
<string name="unbookmark_playlist">删除收藏</string>

View File

@ -225,7 +225,7 @@
<string name="create_playlist">新的播放清單</string>
<string name="rename_playlist">重新命名</string>
<string name="name">名稱</string>
<string name="append_playlist">新增至播放清單</string>
<string name="add_to_playlist">新增至播放清單</string>
<string name="set_as_playlist_thumbnail">設為播放清單縮圖</string>
<string name="bookmark_playlist">將播放清單加入書籤</string>
<string name="unbookmark_playlist">移除書籤</string>

View File

@ -360,6 +360,7 @@
<string name="background_player_key" translatable="false">background_player</string>
<string name="popup_player_key" translatable="false">popup_player</string>
<string name="download_key" translatable="false">download</string>
<string name="add_to_playlist_key" translatable="false">add_to_playlist</string>
<string name="always_ask_open_action_key" translatable="false">always_ask_player</string>
<string-array name="preferred_open_action_description_list" translatable="false">
@ -368,6 +369,7 @@
<item>@string/background_player</item>
<item>@string/popup_player</item>
<item>@string/download</item>
<item>@string/add_to_playlist</item>
<item>@string/always_ask_open_action</item>
</string-array>
<string-array name="preferred_open_action_values_list" translatable="false">
@ -376,6 +378,7 @@
<item>@string/background_player_key</item>
<item>@string/popup_player_key</item>
<item>@string/download_key</item>
<item>@string/add_to_playlist_key</item>
<item>@string/always_ask_open_action_key</item>
</string-array>

View File

@ -448,7 +448,8 @@
<string name="create_playlist">New Playlist</string>
<string name="rename_playlist">Rename</string>
<string name="name">Name</string>
<string name="append_playlist">Add to playlist</string>
<string name="add_to_playlist">Add to playlist</string>
<string name="processing_may_take_a_moment">Processing... May take a moment</string>
<string name="mute">Mute</string>
<string name="unmute">Unmute</string>
<string name="set_as_playlist_thumbnail">Set as playlist thumbnail</string>

View File

@ -0,0 +1 @@
Fixed executing the check for a new NewPipe version. This check was executed too early sometimes and therefore lead to an app crash. That should be fixed now.