From fdfeac081ad9fe6094582d29a8df72d00e7d2271 Mon Sep 17 00:00:00 2001 From: Jared Fantaye Date: Mon, 5 Dec 2022 00:15:05 +0100 Subject: [PATCH 01/13] Implemented a warning before adding duplicate to playlist. --- .../playlist/dao/PlaylistStreamDAO.java | 11 +++++++ .../local/dialog/PlaylistAppendDialog.java | 32 ++++++++++++++++++- .../local/playlist/LocalPlaylistManager.java | 4 +++ app/src/main/res/values/strings.xml | 3 ++ 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java index 2036dc205..911baf7f3 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java @@ -26,6 +26,7 @@ import static org.schabi.newpipe.database.playlist.model.PlaylistStreamEntity.PL import static org.schabi.newpipe.database.stream.model.StreamEntity.STREAM_ID; import static org.schabi.newpipe.database.stream.model.StreamEntity.STREAM_TABLE; import static org.schabi.newpipe.database.stream.model.StreamEntity.STREAM_THUMBNAIL_URL; +import static org.schabi.newpipe.database.stream.model.StreamEntity.STREAM_URL; import static org.schabi.newpipe.database.stream.model.StreamStateEntity.JOIN_STREAM_ID_ALIAS; import static org.schabi.newpipe.database.stream.model.StreamStateEntity.STREAM_PROGRESS_MILLIS; import static org.schabi.newpipe.database.stream.model.StreamStateEntity.STREAM_STATE_TABLE; @@ -49,6 +50,16 @@ public interface PlaylistStreamDAO extends BasicDAO { + " WHERE " + JOIN_PLAYLIST_ID + " = :playlistId") void deleteBatch(long playlistId); + @Query("SELECT COALESCE(COUNT(*), 0)" + + " FROM " + STREAM_TABLE + + " LEFT JOIN " + PLAYLIST_STREAM_JOIN_TABLE + + " ON " + STREAM_ID + " = " + JOIN_STREAM_ID + + " WHERE " + JOIN_PLAYLIST_ID + " = :playlistId " + + " AND " + STREAM_URL + " = :streamURL" + ) + Flowable getDuplicates(long playlistId, String streamURL); + + @Query("SELECT COALESCE(MAX(" + JOIN_INDEX + "), -1)" + " FROM " + PLAYLIST_STREAM_JOIN_TABLE + " WHERE " + JOIN_PLAYLIST_ID + " = :playlistId") diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index 88dec3911..c80e919bf 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -1,5 +1,6 @@ package org.schabi.newpipe.local.dialog; +import android.app.AlertDialog; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; @@ -128,6 +129,19 @@ public final class PlaylistAppendDialog extends PlaylistDialog { private void onPlaylistSelected(@NonNull final LocalPlaylistManager manager, @NonNull final PlaylistMetadataEntry playlist, @NonNull final List streams) { + + final int numOfDuplicates = manager.getPlaylistDuplicates(playlist.uid, + streams.get(0).getUrl()).blockingFirst(); + if (numOfDuplicates > 0) { + createDuplicateDialog(numOfDuplicates, manager, playlist, streams); + } else { + addStreamToPlaylist(manager, playlist, streams); + } + } + + private void addStreamToPlaylist(@NonNull final LocalPlaylistManager manager, + @NonNull final PlaylistMetadataEntry playlist, + @NonNull final List streams) { final Toast successToast = Toast.makeText(getContext(), R.string.playlist_add_stream_success, Toast.LENGTH_SHORT); @@ -142,7 +156,23 @@ public final class PlaylistAppendDialog extends PlaylistDialog { playlistDisposables.add(manager.appendToPlaylist(playlist.uid, streams) .observeOn(AndroidSchedulers.mainThread()) .subscribe(ignored -> successToast.show())); - requireDialog().dismiss(); } + + private void createDuplicateDialog(final int duplicates, + @NonNull final LocalPlaylistManager manager, + @NonNull final PlaylistMetadataEntry playlist, + @NonNull final List streams) { + //TODO: change color + final AlertDialog.Builder builder = new AlertDialog.Builder(this.getActivity()); + builder.setTitle(R.string.duplicate_stream_in_playlist_title); + builder.setMessage(getString(R.string.duplicate_stream_in_playlist_description, + duplicates)); + + builder.setPositiveButton(android.R.string.yes, (dialog, i) -> { + addStreamToPlaylist(manager, playlist, streams); + }); + builder.setNeutralButton(R.string.cancel, null); + builder.create().show(); + } } diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java index 4007d0e09..807c3c051 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java @@ -91,6 +91,10 @@ public class LocalPlaylistManager { return playlistStreamTable.getOrderedStreamsOf(playlistId).subscribeOn(Schedulers.io()); } + public Flowable getPlaylistDuplicates(final long playlistId, final String streamURL) { + return playlistStreamTable.getDuplicates(playlistId, streamURL); + } + public Single deletePlaylist(final long playlistId) { return Single.fromCallable(() -> playlistTable.deletePlaylist(playlistId)) .subscribeOn(Schedulers.io()); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c9e0bb492..5b398abd1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -447,6 +447,9 @@ Playlisted Playlist thumbnail changed. Auto-generated (no uploader found) + Duplicated Video Found + The playlist contains this stream + already %d time(s).\nDo you want to add it one more time? No Captions Fit From ac15339911a86399903c9bd974d6632c2b3088b6 Mon Sep 17 00:00:00 2001 From: Jared Fantaye Date: Sat, 10 Dec 2022 13:15:49 +0100 Subject: [PATCH 02/13] Started working on a way to show that items are already in a playlist --- .../playlist/dao/PlaylistStreamDAO.java | 8 +++++ .../newpipe/local/LocalItemListAdapter.java | 11 +++++++ .../local/dialog/PlaylistAppendDialog.java | 32 ++++++++++++++++++- .../local/playlist/LocalPlaylistManager.java | 4 +++ .../res/layout/list_playlist_mini_item.xml | 12 +++++++ 5 files changed, 66 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java index 911baf7f3..a9719c9fa 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java @@ -59,6 +59,14 @@ public interface PlaylistStreamDAO extends BasicDAO { ) Flowable getDuplicates(long playlistId, String streamURL); + @Query("SELECT " + JOIN_PLAYLIST_ID + + " FROM " + STREAM_TABLE + + " LEFT JOIN " + PLAYLIST_STREAM_JOIN_TABLE + + " ON " + STREAM_ID + " = " + JOIN_STREAM_ID + + " WHERE " + STREAM_URL + " = :streamURL" + ) + Flowable> getDuplicatePlaylists(String streamURL); + @Query("SELECT COALESCE(MAX(" + JOIN_INDEX + "), -1)" + " FROM " + PLAYLIST_STREAM_JOIN_TABLE diff --git a/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java b/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java index 05e2fdac0..93ea12b97 100644 --- a/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java @@ -11,6 +11,7 @@ import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import org.schabi.newpipe.database.LocalItem; +import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; import org.schabi.newpipe.database.stream.model.StreamStateEntity; import org.schabi.newpipe.local.history.HistoryRecordManager; import org.schabi.newpipe.local.holder.LocalItemHolder; @@ -344,6 +345,16 @@ public class LocalItemListAdapter extends RecyclerView.Adapter { final List entities = getStreamEntities(); if (selectedItem instanceof PlaylistMetadataEntry && entities != null) { @@ -123,6 +125,35 @@ public final class PlaylistAppendDialog extends PlaylistDialog { playlistAdapter.clearStreamItemList(); playlistAdapter.addItems(playlists); playlistRecyclerView.setVisibility(View.VISIBLE); + + final LocalPlaylistManager playlistManager = + new LocalPlaylistManager(NewPipeDatabase.getInstance(requireContext())); + final List duplicateIds = playlistManager.getDuplicatePlaylist(getStreamEntities() + .get(0).getUrl()).blockingFirst(); + + final HashMap map = new HashMap<>(); + for (int i = 0; i < playlists.size(); i++) { + map.put(i, playlists.get(i).uid); + } + + playlistRecyclerView.postDelayed(new Runnable() { + @Override + public void run() { + if (playlistRecyclerView.getAdapter() == null) { + return; + } + final int count = playlistRecyclerView.getAdapter().getItemCount(); + System.out.println(" kasjdflkalk" + playlistRecyclerView.getAdapter() + .getItemId(0)); + for (int i = 0; i < count; i++) { + if (playlistRecyclerView.findViewHolderForAdapterPosition(i) != null + && duplicateIds.contains(playlistAdapter.getItemId(i))) { + playlistRecyclerView.findViewHolderForAdapterPosition(i).itemView + .findViewById(R.id.checkmark2).setVisibility(View.VISIBLE); + } + } + } + }, 1000); } } @@ -163,7 +194,6 @@ public final class PlaylistAppendDialog extends PlaylistDialog { @NonNull final LocalPlaylistManager manager, @NonNull final PlaylistMetadataEntry playlist, @NonNull final List streams) { - //TODO: change color final AlertDialog.Builder builder = new AlertDialog.Builder(this.getActivity()); builder.setTitle(R.string.duplicate_stream_in_playlist_title); builder.setMessage(getString(R.string.duplicate_stream_in_playlist_description, diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java index 807c3c051..d017eac6c 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java @@ -95,6 +95,10 @@ public class LocalPlaylistManager { return playlistStreamTable.getDuplicates(playlistId, streamURL); } + public Flowable> getDuplicatePlaylist(final String streamURL) { + return playlistStreamTable.getDuplicatePlaylists(streamURL); + } + public Single deletePlaylist(final long playlistId) { return Single.fromCallable(() -> playlistTable.deletePlaylist(playlistId)) .subscribeOn(Schedulers.io()); diff --git a/app/src/main/res/layout/list_playlist_mini_item.xml b/app/src/main/res/layout/list_playlist_mini_item.xml index a1f70144d..1b7065f23 100644 --- a/app/src/main/res/layout/list_playlist_mini_item.xml +++ b/app/src/main/res/layout/list_playlist_mini_item.xml @@ -1,5 +1,6 @@ + + + Date: Sat, 10 Dec 2022 16:54:46 +0100 Subject: [PATCH 03/13] Continued working on a way to show that items are already in a playlist --- .../newpipe/local/LocalItemListAdapter.java | 2 +- .../local/dialog/PlaylistAppendDialog.java | 62 +++++++++++-------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java b/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java index 93ea12b97..ea7bc290d 100644 --- a/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java @@ -347,7 +347,7 @@ public class LocalItemListAdapter extends RecyclerView.Adapter duplicateIds = playlistManager.getDuplicatePlaylist(getStreamEntities() - .get(0).getUrl()).blockingFirst(); + playlistRecyclerView.addOnScrollListener(new DefaultItemListOnScrolledDownListener()); + initDuplicateIndicators(playlistRecyclerView); + } + } - final HashMap map = new HashMap<>(); - for (int i = 0; i < playlists.size(); i++) { - map.put(i, playlists.get(i).uid); + public class DefaultItemListOnScrolledDownListener extends OnScrollBelowItemsListener { + @Override + public void onScrolledDown(final RecyclerView recyclerView) { + showDuplicateIndicators(recyclerView); + } + } + + public void initDuplicateIndicators(@NonNull final RecyclerView view) { + view.postDelayed(new Runnable() { + @Override + public void run() { + showDuplicateIndicators(view); } + }, 50); + } - playlistRecyclerView.postDelayed(new Runnable() { - @Override - public void run() { - if (playlistRecyclerView.getAdapter() == null) { - return; - } - final int count = playlistRecyclerView.getAdapter().getItemCount(); - System.out.println(" kasjdflkalk" + playlistRecyclerView.getAdapter() - .getItemId(0)); - for (int i = 0; i < count; i++) { - if (playlistRecyclerView.findViewHolderForAdapterPosition(i) != null - && duplicateIds.contains(playlistAdapter.getItemId(i))) { - playlistRecyclerView.findViewHolderForAdapterPosition(i).itemView - .findViewById(R.id.checkmark2).setVisibility(View.VISIBLE); - } - } - } - }, 1000); + public void showDuplicateIndicators(final RecyclerView view) { + final LocalPlaylistManager playlistManager = + new LocalPlaylistManager(NewPipeDatabase.getInstance(requireContext())); + final List duplicateIds = playlistManager.getDuplicatePlaylist(getStreamEntities() + .get(0).getUrl()).blockingFirst(); + + if (view.getAdapter() == null) { + return; + } + + final int count = view.getAdapter().getItemCount(); + for (int i = 0; i < count; i++) { + if (view.findViewHolderForAdapterPosition(i) != null + && duplicateIds.contains(playlistAdapter.getItemId(i))) { + view.findViewHolderForAdapterPosition(i).itemView + .findViewById(R.id.checkmark2).setVisibility(View.VISIBLE); + } } } From 8b6e110635a0404a1faea8bba252823fffa49f31 Mon Sep 17 00:00:00 2001 From: Jared Fantaye Date: Mon, 12 Dec 2022 20:12:06 +0100 Subject: [PATCH 04/13] Fixed the functionality, improved performance & general code cleanup --- .../playlist/dao/PlaylistStreamDAO.java | 3 +- .../local/dialog/PlaylistAppendDialog.java | 68 +++++++++++-------- .../local/playlist/LocalPlaylistManager.java | 7 +- app/src/main/res/layout/dialog_playlists.xml | 17 ++++- .../res/layout/list_playlist_mini_item.xml | 12 ---- app/src/main/res/values/strings.xml | 1 + 6 files changed, 60 insertions(+), 48 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java index a9719c9fa..27eb34b90 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java @@ -57,7 +57,7 @@ public interface PlaylistStreamDAO extends BasicDAO { + " WHERE " + JOIN_PLAYLIST_ID + " = :playlistId " + " AND " + STREAM_URL + " = :streamURL" ) - Flowable getDuplicates(long playlistId, String streamURL); + Flowable getDuplicateCount(long playlistId, String streamURL); @Query("SELECT " + JOIN_PLAYLIST_ID + " FROM " + STREAM_TABLE @@ -67,7 +67,6 @@ public interface PlaylistStreamDAO extends BasicDAO { ) Flowable> getDuplicatePlaylists(String streamURL); - @Query("SELECT COALESCE(MAX(" + JOIN_INDEX + "), -1)" + " FROM " + PLAYLIST_STREAM_JOIN_TABLE + " WHERE " + JOIN_PLAYLIST_ID + " = :playlistId") diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index 9616b06b3..5767d6163 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -16,7 +16,6 @@ import org.schabi.newpipe.NewPipeDatabase; import org.schabi.newpipe.R; import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; import org.schabi.newpipe.database.stream.model.StreamEntity; -import org.schabi.newpipe.fragments.OnScrollBelowItemsListener; import org.schabi.newpipe.local.LocalItemListAdapter; import org.schabi.newpipe.local.playlist.LocalPlaylistManager; @@ -28,8 +27,12 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable; public final class PlaylistAppendDialog extends PlaylistDialog { private static final String TAG = PlaylistAppendDialog.class.getCanonicalName(); + private static final float DEFAULT_ALPHA = 1f; + private static final float GRAYED_OUT_ALPHA = 0.3f; + private RecyclerView playlistRecyclerView; private LocalItemListAdapter playlistAdapter; + private List duplicateIds; private final CompositeDisposable playlistDisposables = new CompositeDisposable(); @@ -62,6 +65,9 @@ public final class PlaylistAppendDialog extends PlaylistDialog { final LocalPlaylistManager playlistManager = new LocalPlaylistManager(NewPipeDatabase.getInstance(requireContext())); + duplicateIds = playlistManager.getDuplicatePlaylists(getStreamEntities().get(0).getUrl()) + .blockingFirst(); + playlistAdapter = new LocalItemListAdapter(getActivity()); playlistAdapter.setHasStableIds(true); playlistAdapter.setSelectedListener(selectedItem -> { @@ -126,43 +132,43 @@ public final class PlaylistAppendDialog extends PlaylistDialog { playlistAdapter.addItems(playlists); playlistRecyclerView.setVisibility(View.VISIBLE); - playlistRecyclerView.addOnScrollListener(new DefaultItemListOnScrolledDownListener()); + playlistRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { + @Override + public void onScrolled(@NonNull final RecyclerView recyclerView, final int dx, + final int dy) { + showDuplicateIndicators(recyclerView); + } + }); initDuplicateIndicators(playlistRecyclerView); } } - public class DefaultItemListOnScrolledDownListener extends OnScrollBelowItemsListener { - @Override - public void onScrolledDown(final RecyclerView recyclerView) { - showDuplicateIndicators(recyclerView); + public void initDuplicateIndicators(@NonNull final RecyclerView view) { + showDuplicateIndicators(view); + + if (!duplicateIds.isEmpty()) { + final View indicatorExplanation = getView() + .findViewById(R.id.playlist_duplicate); + indicatorExplanation.setVisibility(View.VISIBLE); } } - public void initDuplicateIndicators(@NonNull final RecyclerView view) { - view.postDelayed(new Runnable() { - @Override - public void run() { - showDuplicateIndicators(view); - } - }, 50); - } - - public void showDuplicateIndicators(final RecyclerView view) { - final LocalPlaylistManager playlistManager = - new LocalPlaylistManager(NewPipeDatabase.getInstance(requireContext())); - final List duplicateIds = playlistManager.getDuplicatePlaylist(getStreamEntities() - .get(0).getUrl()).blockingFirst(); - + public void showDuplicateIndicators(@NonNull final RecyclerView view) { if (view.getAdapter() == null) { return; } final int count = view.getAdapter().getItemCount(); for (int i = 0; i < count; i++) { - if (view.findViewHolderForAdapterPosition(i) != null - && duplicateIds.contains(playlistAdapter.getItemId(i))) { - view.findViewHolderForAdapterPosition(i).itemView - .findViewById(R.id.checkmark2).setVisibility(View.VISIBLE); + + final RecyclerView.ViewHolder viewHolder = view.findViewHolderForAdapterPosition(i); + if (viewHolder != null) { + if (duplicateIds.contains(view.getAdapter().getItemId(i))) { + viewHolder.itemView.setAlpha(GRAYED_OUT_ALPHA); + } else { + viewHolder.itemView.setAlpha(DEFAULT_ALPHA); + } + } } } @@ -171,10 +177,10 @@ public final class PlaylistAppendDialog extends PlaylistDialog { @NonNull final PlaylistMetadataEntry playlist, @NonNull final List streams) { - final int numOfDuplicates = manager.getPlaylistDuplicates(playlist.uid, + final int numberOfDuplicates = manager.getPlaylistDuplicateCount(playlist.uid, streams.get(0).getUrl()).blockingFirst(); - if (numOfDuplicates > 0) { - createDuplicateDialog(numOfDuplicates, manager, playlist, streams); + if (numberOfDuplicates > 0) { + createDuplicateDialog(numberOfDuplicates, manager, playlist, streams); } else { addStreamToPlaylist(manager, playlist, streams); } @@ -197,22 +203,24 @@ public final class PlaylistAppendDialog extends PlaylistDialog { playlistDisposables.add(manager.appendToPlaylist(playlist.uid, streams) .observeOn(AndroidSchedulers.mainThread()) .subscribe(ignored -> successToast.show())); + requireDialog().dismiss(); } - private void createDuplicateDialog(final int duplicates, + private void createDuplicateDialog(final int numberOfDuplicates, @NonNull final LocalPlaylistManager manager, @NonNull final PlaylistMetadataEntry playlist, @NonNull final List streams) { final AlertDialog.Builder builder = new AlertDialog.Builder(this.getActivity()); builder.setTitle(R.string.duplicate_stream_in_playlist_title); builder.setMessage(getString(R.string.duplicate_stream_in_playlist_description, - duplicates)); + numberOfDuplicates)); builder.setPositiveButton(android.R.string.yes, (dialog, i) -> { addStreamToPlaylist(manager, playlist, streams); }); builder.setNeutralButton(R.string.cancel, null); + builder.create().show(); } } diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java index d017eac6c..eaccb1e71 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java @@ -91,11 +91,12 @@ public class LocalPlaylistManager { return playlistStreamTable.getOrderedStreamsOf(playlistId).subscribeOn(Schedulers.io()); } - public Flowable getPlaylistDuplicates(final long playlistId, final String streamURL) { - return playlistStreamTable.getDuplicates(playlistId, streamURL); + public Flowable getPlaylistDuplicateCount(final long playlistId, + final String streamURL) { + return playlistStreamTable.getDuplicateCount(playlistId, streamURL); } - public Flowable> getDuplicatePlaylist(final String streamURL) { + public Flowable> getDuplicatePlaylists(final String streamURL) { return playlistStreamTable.getDuplicatePlaylists(streamURL); } diff --git a/app/src/main/res/layout/dialog_playlists.xml b/app/src/main/res/layout/dialog_playlists.xml index 18b08d93c..5771b400f 100644 --- a/app/src/main/res/layout/dialog_playlists.xml +++ b/app/src/main/res/layout/dialog_playlists.xml @@ -34,11 +34,26 @@ tools:ignore="RtlHardcoded" /> + + diff --git a/app/src/main/res/layout/list_playlist_mini_item.xml b/app/src/main/res/layout/list_playlist_mini_item.xml index 1b7065f23..a1f70144d 100644 --- a/app/src/main/res/layout/list_playlist_mini_item.xml +++ b/app/src/main/res/layout/list_playlist_mini_item.xml @@ -1,6 +1,5 @@ - - - "Loading requested content" New Playlist + The playlists that are grayed out already contain this item. Rename Name Add to playlist From 5fb7b3266b965cd725b0b4f72cb43e3f4427f3d6 Mon Sep 17 00:00:00 2001 From: Jared Fantaye Date: Fri, 16 Dec 2022 00:29:22 +0100 Subject: [PATCH 05/13] Removed the duplicate dialog and added another toast option --- .../local/dialog/PlaylistAppendDialog.java | 39 ++++--------------- app/src/main/res/values/strings.xml | 4 +- 2 files changed, 9 insertions(+), 34 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index 5767d6163..3414d95ab 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -1,6 +1,5 @@ package org.schabi.newpipe.local.dialog; -import android.app.AlertDialog; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; @@ -177,20 +176,15 @@ public final class PlaylistAppendDialog extends PlaylistDialog { @NonNull final PlaylistMetadataEntry playlist, @NonNull final List streams) { - final int numberOfDuplicates = manager.getPlaylistDuplicateCount(playlist.uid, - streams.get(0).getUrl()).blockingFirst(); - if (numberOfDuplicates > 0) { - createDuplicateDialog(numberOfDuplicates, manager, playlist, streams); - } else { - addStreamToPlaylist(manager, playlist, streams); - } - } + final int numOfDuplicates = manager.getPlaylistDuplicateCount(playlist.uid, + streams.get(0).getUrl()).blockingFirst(); + String toastText = getString(R.string.playlist_add_stream_success); - private void addStreamToPlaylist(@NonNull final LocalPlaylistManager manager, - @NonNull final PlaylistMetadataEntry playlist, - @NonNull final List streams) { - final Toast successToast = Toast.makeText(getContext(), - R.string.playlist_add_stream_success, Toast.LENGTH_SHORT); + if (numOfDuplicates > 0) { + toastText = getString(R.string.playlist_add_stream_success_duplicate); + } + + final Toast successToast = Toast.makeText(getContext(), toastText, Toast.LENGTH_SHORT); if (playlist.thumbnailUrl .equals("drawable://" + R.drawable.placeholder_thumbnail_playlist)) { @@ -206,21 +200,4 @@ public final class PlaylistAppendDialog extends PlaylistDialog { requireDialog().dismiss(); } - - private void createDuplicateDialog(final int numberOfDuplicates, - @NonNull final LocalPlaylistManager manager, - @NonNull final PlaylistMetadataEntry playlist, - @NonNull final List streams) { - final AlertDialog.Builder builder = new AlertDialog.Builder(this.getActivity()); - builder.setTitle(R.string.duplicate_stream_in_playlist_title); - builder.setMessage(getString(R.string.duplicate_stream_in_playlist_description, - numberOfDuplicates)); - - builder.setPositiveButton(android.R.string.yes, (dialog, i) -> { - addStreamToPlaylist(manager, playlist, streams); - }); - builder.setNeutralButton(R.string.cancel, null); - - builder.create().show(); - } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 70687b8f4..4067381f4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -446,11 +446,9 @@ Delete this playlist\? Playlist created Playlisted + Playlisted duplicate Playlist thumbnail changed. Auto-generated (no uploader found) - Duplicated Video Found - The playlist contains this stream - already %d time(s).\nDo you want to add it one more time? No Captions Fit From b3554a6a49206f35197341308aab26380667af96 Mon Sep 17 00:00:00 2001 From: Jared Fantaye Date: Fri, 30 Dec 2022 16:36:33 +0100 Subject: [PATCH 06/13] Added the number of duplicates to the toast text. --- .../org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java | 2 +- app/src/main/res/values/strings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index 3414d95ab..85bce7784 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -181,7 +181,7 @@ public final class PlaylistAppendDialog extends PlaylistDialog { String toastText = getString(R.string.playlist_add_stream_success); if (numOfDuplicates > 0) { - toastText = getString(R.string.playlist_add_stream_success_duplicate); + toastText = getString(R.string.playlist_add_stream_success_duplicate, numOfDuplicates); } final Toast successToast = Toast.makeText(getContext(), toastText, Toast.LENGTH_SHORT); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4067381f4..cf4039262 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -446,7 +446,7 @@ Delete this playlist\? Playlist created Playlisted - Playlisted duplicate + Duplicate added %d time(s) Playlist thumbnail changed. Auto-generated (no uploader found) From ef4a6238c88f26e50ba794caa071432a08da66e7 Mon Sep 17 00:00:00 2001 From: Stypox Date: Sat, 14 Jan 2023 18:00:40 +0100 Subject: [PATCH 07/13] See if playlists already contain a stream from db --- .../playlist/PlaylistDuplicatesEntry.java | 24 +++++++ .../playlist/dao/PlaylistStreamDAO.java | 39 +++++----- .../local/dialog/PlaylistAppendDialog.java | 72 ++++--------------- .../local/holder/LocalPlaylistItemHolder.java | 11 +++ .../local/playlist/LocalPlaylistManager.java | 22 +++--- 5 files changed, 84 insertions(+), 84 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistDuplicatesEntry.java diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistDuplicatesEntry.java b/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistDuplicatesEntry.java new file mode 100644 index 000000000..0fcb4ced4 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistDuplicatesEntry.java @@ -0,0 +1,24 @@ +package org.schabi.newpipe.database.playlist; + +import androidx.room.ColumnInfo; + +/** + * This class adds a field to {@link PlaylistMetadataEntry} that contains an integer representing + * how many times a specific stream is already contained inside a local playlist. Used to be able + * to grey out playlists which already contain the current stream in the playlist append dialog. + * @see org.schabi.newpipe.local.playlist.LocalPlaylistManager#getPlaylistDuplicates(String) + */ +public class PlaylistDuplicatesEntry extends PlaylistMetadataEntry { + public static final String PLAYLIST_TIMES_STREAM_IS_CONTAINED = "timesStreamIsContained"; + @ColumnInfo(name = PLAYLIST_TIMES_STREAM_IS_CONTAINED) + public final long timesStreamIsContained; + + public PlaylistDuplicatesEntry(final long uid, + final String name, + final String thumbnailUrl, + final long streamCount, + final long timesStreamIsContained) { + super(uid, name, thumbnailUrl, streamCount); + this.timesStreamIsContained = timesStreamIsContained; + } +} diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java index 27eb34b90..f173ab0bc 100644 --- a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java +++ b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java @@ -6,6 +6,7 @@ import androidx.room.RewriteQueriesToDropUnusedColumns; import androidx.room.Transaction; import org.schabi.newpipe.database.BasicDAO; +import org.schabi.newpipe.database.playlist.PlaylistDuplicatesEntry; import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; import org.schabi.newpipe.database.playlist.PlaylistStreamEntry; import org.schabi.newpipe.database.playlist.model.PlaylistStreamEntity; @@ -14,6 +15,7 @@ import java.util.List; import io.reactivex.rxjava3.core.Flowable; +import static org.schabi.newpipe.database.playlist.PlaylistDuplicatesEntry.PLAYLIST_TIMES_STREAM_IS_CONTAINED; import static org.schabi.newpipe.database.playlist.PlaylistMetadataEntry.PLAYLIST_STREAM_COUNT; import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_ID; import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_NAME; @@ -50,23 +52,6 @@ public interface PlaylistStreamDAO extends BasicDAO { + " WHERE " + JOIN_PLAYLIST_ID + " = :playlistId") void deleteBatch(long playlistId); - @Query("SELECT COALESCE(COUNT(*), 0)" - + " FROM " + STREAM_TABLE - + " LEFT JOIN " + PLAYLIST_STREAM_JOIN_TABLE - + " ON " + STREAM_ID + " = " + JOIN_STREAM_ID - + " WHERE " + JOIN_PLAYLIST_ID + " = :playlistId " - + " AND " + STREAM_URL + " = :streamURL" - ) - Flowable getDuplicateCount(long playlistId, String streamURL); - - @Query("SELECT " + JOIN_PLAYLIST_ID - + " FROM " + STREAM_TABLE - + " LEFT JOIN " + PLAYLIST_STREAM_JOIN_TABLE - + " ON " + STREAM_ID + " = " + JOIN_STREAM_ID - + " WHERE " + STREAM_URL + " = :streamURL" - ) - Flowable> getDuplicatePlaylists(String streamURL); - @Query("SELECT COALESCE(MAX(" + JOIN_INDEX + "), -1)" + " FROM " + PLAYLIST_STREAM_JOIN_TABLE + " WHERE " + JOIN_PLAYLIST_ID + " = :playlistId") @@ -111,4 +96,24 @@ public interface PlaylistStreamDAO extends BasicDAO { + " GROUP BY " + PLAYLIST_ID + " ORDER BY " + PLAYLIST_NAME + " COLLATE NOCASE ASC") Flowable> getPlaylistMetadata(); + + @Transaction + @Query("SELECT " + PLAYLIST_TABLE + "." + PLAYLIST_ID + ", " + + PLAYLIST_NAME + ", " + + PLAYLIST_TABLE + "." + PLAYLIST_THUMBNAIL_URL + ", " + + "COALESCE(COUNT(" + JOIN_PLAYLIST_ID + "), 0) AS " + PLAYLIST_STREAM_COUNT + ", " + + "COALESCE(SUM(" + STREAM_URL + " = :streamUrl), 0) AS " + + PLAYLIST_TIMES_STREAM_IS_CONTAINED + + + " FROM " + PLAYLIST_TABLE + + " LEFT JOIN " + PLAYLIST_STREAM_JOIN_TABLE + + " ON " + PLAYLIST_TABLE + "." + PLAYLIST_ID + " = " + JOIN_PLAYLIST_ID + + + " LEFT JOIN " + STREAM_TABLE + + " ON " + STREAM_TABLE + "." + STREAM_ID + " = " + JOIN_STREAM_ID + + " AND :streamUrl = :streamUrl" + + + " GROUP BY " + JOIN_PLAYLIST_ID + + " ORDER BY " + PLAYLIST_NAME + " COLLATE NOCASE ASC") + Flowable> getPlaylistDuplicatesMetadata(String streamUrl); } diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index 85bce7784..79a355f52 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -13,7 +13,7 @@ import androidx.recyclerview.widget.RecyclerView; import org.schabi.newpipe.NewPipeDatabase; import org.schabi.newpipe.R; -import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; +import org.schabi.newpipe.database.playlist.PlaylistDuplicatesEntry; import org.schabi.newpipe.database.stream.model.StreamEntity; import org.schabi.newpipe.local.LocalItemListAdapter; import org.schabi.newpipe.local.playlist.LocalPlaylistManager; @@ -26,12 +26,8 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable; public final class PlaylistAppendDialog extends PlaylistDialog { private static final String TAG = PlaylistAppendDialog.class.getCanonicalName(); - private static final float DEFAULT_ALPHA = 1f; - private static final float GRAYED_OUT_ALPHA = 0.3f; - private RecyclerView playlistRecyclerView; private LocalItemListAdapter playlistAdapter; - private List duplicateIds; private final CompositeDisposable playlistDisposables = new CompositeDisposable(); @@ -64,15 +60,13 @@ public final class PlaylistAppendDialog extends PlaylistDialog { final LocalPlaylistManager playlistManager = new LocalPlaylistManager(NewPipeDatabase.getInstance(requireContext())); - duplicateIds = playlistManager.getDuplicatePlaylists(getStreamEntities().get(0).getUrl()) - .blockingFirst(); - playlistAdapter = new LocalItemListAdapter(getActivity()); playlistAdapter.setHasStableIds(true); playlistAdapter.setSelectedListener(selectedItem -> { final List entities = getStreamEntities(); - if (selectedItem instanceof PlaylistMetadataEntry && entities != null) { - onPlaylistSelected(playlistManager, (PlaylistMetadataEntry) selectedItem, entities); + if (selectedItem instanceof PlaylistDuplicatesEntry && entities != null) { + onPlaylistSelected(playlistManager, + (PlaylistDuplicatesEntry) selectedItem, entities); } }); @@ -83,7 +77,8 @@ public final class PlaylistAppendDialog extends PlaylistDialog { final View newPlaylistButton = view.findViewById(R.id.newPlaylist); newPlaylistButton.setOnClickListener(ignored -> openCreatePlaylistDialog()); - playlistDisposables.add(playlistManager.getPlaylists() + playlistDisposables.add(playlistManager + .getPlaylistDuplicates(getStreamEntities().get(0).getUrl()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::onPlaylistsReceived)); } @@ -125,63 +120,24 @@ public final class PlaylistAppendDialog extends PlaylistDialog { requireDialog().dismiss(); } - private void onPlaylistsReceived(@NonNull final List playlists) { + private void onPlaylistsReceived(@NonNull final List playlists) { if (playlistAdapter != null && playlistRecyclerView != null) { playlistAdapter.clearStreamItemList(); playlistAdapter.addItems(playlists); playlistRecyclerView.setVisibility(View.VISIBLE); - - playlistRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { - @Override - public void onScrolled(@NonNull final RecyclerView recyclerView, final int dx, - final int dy) { - showDuplicateIndicators(recyclerView); - } - }); - initDuplicateIndicators(playlistRecyclerView); - } - } - - public void initDuplicateIndicators(@NonNull final RecyclerView view) { - showDuplicateIndicators(view); - - if (!duplicateIds.isEmpty()) { - final View indicatorExplanation = getView() - .findViewById(R.id.playlist_duplicate); - indicatorExplanation.setVisibility(View.VISIBLE); - } - } - - public void showDuplicateIndicators(@NonNull final RecyclerView view) { - if (view.getAdapter() == null) { - return; - } - - final int count = view.getAdapter().getItemCount(); - for (int i = 0; i < count; i++) { - - final RecyclerView.ViewHolder viewHolder = view.findViewHolderForAdapterPosition(i); - if (viewHolder != null) { - if (duplicateIds.contains(view.getAdapter().getItemId(i))) { - viewHolder.itemView.setAlpha(GRAYED_OUT_ALPHA); - } else { - viewHolder.itemView.setAlpha(DEFAULT_ALPHA); - } - - } } } private void onPlaylistSelected(@NonNull final LocalPlaylistManager manager, - @NonNull final PlaylistMetadataEntry playlist, + @NonNull final PlaylistDuplicatesEntry playlist, @NonNull final List streams) { - final int numOfDuplicates = manager.getPlaylistDuplicateCount(playlist.uid, - streams.get(0).getUrl()).blockingFirst(); - String toastText = getString(R.string.playlist_add_stream_success); - - if (numOfDuplicates > 0) { - toastText = getString(R.string.playlist_add_stream_success_duplicate, numOfDuplicates); + final String toastText; + if (playlist.timesStreamIsContained > 0) { + toastText = getString(R.string.playlist_add_stream_success_duplicate, + playlist.timesStreamIsContained); + } else { + toastText = getString(R.string.playlist_add_stream_success); } final Toast successToast = Toast.makeText(getContext(), toastText, Toast.LENGTH_SHORT); diff --git a/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistItemHolder.java b/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistItemHolder.java index f8c5176ec..240ca0462 100644 --- a/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistItemHolder.java @@ -4,6 +4,7 @@ import android.view.View; import android.view.ViewGroup; import org.schabi.newpipe.database.LocalItem; +import org.schabi.newpipe.database.playlist.PlaylistDuplicatesEntry; import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; import org.schabi.newpipe.local.LocalItemBuilder; import org.schabi.newpipe.local.history.HistoryRecordManager; @@ -13,6 +14,9 @@ import org.schabi.newpipe.util.Localization; import java.time.format.DateTimeFormatter; public class LocalPlaylistItemHolder extends PlaylistItemHolder { + + private static final float GRAYED_OUT_ALPHA = 0.6f; + public LocalPlaylistItemHolder(final LocalItemBuilder infoItemBuilder, final ViewGroup parent) { super(infoItemBuilder, parent); } @@ -38,6 +42,13 @@ public class LocalPlaylistItemHolder extends PlaylistItemHolder { PicassoHelper.loadPlaylistThumbnail(item.thumbnailUrl).into(itemThumbnailView); + if (item instanceof PlaylistDuplicatesEntry + && ((PlaylistDuplicatesEntry) item).timesStreamIsContained > 0) { + itemView.setAlpha(GRAYED_OUT_ALPHA); + } else { + itemView.setAlpha(1.0f); + } + super.updateFromItem(localItem, historyRecordManager, dateTimeFormatter); } } diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java index eaccb1e71..8ea64f343 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistManager.java @@ -4,6 +4,7 @@ import androidx.annotation.Nullable; import org.schabi.newpipe.R; import org.schabi.newpipe.database.AppDatabase; +import org.schabi.newpipe.database.playlist.PlaylistDuplicatesEntry; import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; import org.schabi.newpipe.database.playlist.PlaylistStreamEntry; import org.schabi.newpipe.database.playlist.dao.PlaylistDAO; @@ -87,19 +88,22 @@ public class LocalPlaylistManager { return playlistStreamTable.getPlaylistMetadata().subscribeOn(Schedulers.io()); } + /** + * Get playlists with attached information about how many times the provided stream is already + * contained in each playlist. + * + * @param streamUrl the stream url for which to check for duplicates + * @return a list of {@link PlaylistDuplicatesEntry} + */ + public Flowable> getPlaylistDuplicates(final String streamUrl) { + return playlistStreamTable.getPlaylistDuplicatesMetadata(streamUrl) + .subscribeOn(Schedulers.io()); + } + public Flowable> getPlaylistStreams(final long playlistId) { return playlistStreamTable.getOrderedStreamsOf(playlistId).subscribeOn(Schedulers.io()); } - public Flowable getPlaylistDuplicateCount(final long playlistId, - final String streamURL) { - return playlistStreamTable.getDuplicateCount(playlistId, streamURL); - } - - public Flowable> getDuplicatePlaylists(final String streamURL) { - return playlistStreamTable.getDuplicatePlaylists(streamURL); - } - public Single deletePlaylist(final long playlistId) { return Single.fromCallable(() -> playlistTable.deletePlaylist(playlistId)) .subscribeOn(Schedulers.io()); From a69f74f51bf49d0bdbfd83502d0a01ebc1d1752e Mon Sep 17 00:00:00 2001 From: Stypox Date: Fri, 20 Jan 2023 18:39:16 +0100 Subject: [PATCH 08/13] Add snippet to ensure baseline.profm file is sorted Thanks to obfusk, see https://issuetracker.google.com/issues/231837768 and #6486 --- app/build.gradle | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 79e07a190..2c0f03e38 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,3 +1,7 @@ +import com.android.tools.profgen.ArtProfileKt +import com.android.tools.profgen.ArtProfileSerializer +import com.android.tools.profgen.DexFile + plugins { id "com.android.application" id "kotlin-android" @@ -308,3 +312,24 @@ static String getGitWorkingBranch() { return "" } } + +project.afterEvaluate { + tasks.compileReleaseArtProfile.doLast { + outputs.files.each { file -> + if (file.toString().endsWith(".profm")) { + println("Sorting ${file} ...") + def version = ArtProfileSerializer.valueOf("METADATA_0_0_2") + def profile = ArtProfileKt.ArtProfile(file) + def keys = new ArrayList(profile.profileData.keySet()) + def sortedData = new LinkedHashMap() + Collections.sort keys, new DexFile.Companion() + keys.each { key -> sortedData[key] = profile.profileData[key] } + new FileOutputStream(file).with { + write(version.magicBytes$profgen) + write(version.versionBytes$profgen) + version.write$profgen(it, sortedData, "") + } + } + } + } +} From 34e6e70be960f18653c15d37c676af7c335c02d5 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Sun, 22 Jan 2023 05:12:39 +0100 Subject: [PATCH 09/13] Translated using Weblate (Azerbaijani) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Lithuanian) Currently translated at 99.3% (648 of 652 strings) Translated using Weblate (Chinese (Traditional, Hong Kong)) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Assamese) Currently translated at 15.0% (98 of 652 strings) Translated using Weblate (Odia) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Slovenian) Currently translated at 2.7% (2 of 72 strings) Translated using Weblate (Portuguese (Portugal)) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Sardinian) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Galician) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Estonian) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Punjabi) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Azerbaijani) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Hindi) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Lithuanian) Currently translated at 99.3% (648 of 652 strings) Translated using Weblate (Hebrew) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Persian) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Polish) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Turkish) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Ukrainian) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Indonesian) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Arabic) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Czech) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Greek) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Portuguese) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Italian) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Italian) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Japanese) Currently translated at 99.8% (651 of 652 strings) Translated using Weblate (Russian) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Dutch) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (Spanish) Currently translated at 100.0% (652 of 652 strings) Translated using Weblate (German) Currently translated at 100.0% (652 of 652 strings) Co-authored-by: Abhilash Co-authored-by: Agnieszka C Co-authored-by: Ahmad0a Co-authored-by: AioiLight Co-authored-by: Ajeje Brazorf Co-authored-by: Danial Behzadi Co-authored-by: Eric Co-authored-by: ErnestasKaralius Co-authored-by: Fjuro Co-authored-by: Francesco Saltori Co-authored-by: GET100PERCENT Co-authored-by: Hosted Weblate Co-authored-by: HudobniVolk Co-authored-by: Igor Nedoboy Co-authored-by: Igor Rückert Co-authored-by: Ihor Hordiichuk Co-authored-by: Jeff Huang Co-authored-by: Linerly Co-authored-by: Nidi Co-authored-by: Oğuz Ersen Co-authored-by: Pieter van der Razemond Co-authored-by: Priit Jõerüüt Co-authored-by: RSoulwin Co-authored-by: Ray Co-authored-by: Retrial Co-authored-by: Yaron Shahrabani Co-authored-by: gallegonovato Co-authored-by: nautilusx Co-authored-by: random r Co-authored-by: ssantos Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/sl/ Translation: NewPipe/Metadata --- app/src/main/res/values-ar/strings.xml | 2 + app/src/main/res/values-as/strings.xml | 73 +++++++++++++++++++ app/src/main/res/values-az/strings.xml | 10 ++- app/src/main/res/values-cs/strings.xml | 2 + app/src/main/res/values-de/strings.xml | 2 + app/src/main/res/values-el/strings.xml | 2 + app/src/main/res/values-es/strings.xml | 2 + app/src/main/res/values-et/strings.xml | 3 + app/src/main/res/values-fa/strings.xml | 3 + app/src/main/res/values-gl/strings.xml | 3 + app/src/main/res/values-he/strings.xml | 2 + app/src/main/res/values-hi/strings.xml | 3 + app/src/main/res/values-in/strings.xml | 2 + app/src/main/res/values-it/strings.xml | 5 +- app/src/main/res/values-ja/strings.xml | 4 + app/src/main/res/values-lt/strings.xml | 16 ++-- app/src/main/res/values-nl/strings.xml | 4 + app/src/main/res/values-or/strings.xml | 3 + app/src/main/res/values-pa/strings.xml | 3 + app/src/main/res/values-pl/strings.xml | 2 + app/src/main/res/values-pt-rBR/strings.xml | 2 + app/src/main/res/values-pt-rPT/strings.xml | 3 + app/src/main/res/values-pt/strings.xml | 3 + app/src/main/res/values-ru/strings.xml | 12 ++- app/src/main/res/values-sc/strings.xml | 3 + app/src/main/res/values-tr/strings.xml | 2 + app/src/main/res/values-uk/strings.xml | 2 + app/src/main/res/values-zh-rCN/strings.xml | 2 + app/src/main/res/values-zh-rHK/strings.xml | 6 +- app/src/main/res/values-zh-rTW/strings.xml | 3 + .../metadata/android/sl/changelogs/991.txt | 13 ++++ .../metadata/android/sl/short_description.txt | 1 + 32 files changed, 180 insertions(+), 18 deletions(-) create mode 100644 fastlane/metadata/android/sl/changelogs/991.txt create mode 100644 fastlane/metadata/android/sl/short_description.txt diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 2fbe794a3..cbd3ade35 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -780,4 +780,6 @@ استيراد الاشتراكات أو تصديرها من القائمة المكونة من 3 نقاط هذا الخيار متاح فقط إذا تم تحديد %s للسمة إلغاء تعيين الصورة المصغرة الدائمة + فشل النسخ إلى الحافظة + البطاقة \ No newline at end of file diff --git a/app/src/main/res/values-as/strings.xml b/app/src/main/res/values-as/strings.xml index 578213394..be845845a 100644 --- a/app/src/main/res/values-as/strings.xml +++ b/app/src/main/res/values-as/strings.xml @@ -25,4 +25,77 @@ আপুনি \"%1$s\" বুজাইছিল নেকি\? বাহ্যিক ভিডিঅ’ প্লেয়াৰ ব্যৱহাৰ কৰক বাহ্যিক অডিঅ’ প্লেয়াৰ ব্যৱহাৰ কৰক + Channel আনচাবস্ক্ৰাইব কৰা হ\'ল + subscription সলনি কৰিব পৰা নগ\'ল + subscription আপডেট কৰিব পৰা নগ\'ল + তথ্য দেখুৱাওক + চাবস্ক্ৰিপচন + বুকমাৰ্ক কৰা প্লেলিষ্ট + টেব নিৰ্বাচন কৰক + বেকগ্ৰাউণ্ড + পপ-আপ + স্থায়ী ৰিজ\'লিউচন + স্থায়ী পপআপ ৰিজোলিউচন + উচ্চ ৰিজ\'লিউচন দেখুৱাওক + কেৱল কিছুমান ডিভাইচেহে 2K/4K ভিডিঅ’ বজাব পাৰে + Kodi ৰ সৈতে বজাওক + Kore এপ ইনষ্টল\? + \"Kodi ৰ সৈতে খোলক\" বিকল্প দেখুৱাওক + Kodi মিডিয়া চেণ্টাৰৰ জৰিয়তে এটা ভিডিঅ\' চলাবলৈ এটা বিকল্প প্ৰদৰ্শন কৰক + প্লেয়াৰটো ক্ৰেচ কৰক + বাফাৰিং + নথিং + জাননী ৰ‌ঙিণ কৰক + অডিঅ\' + অডিঅ\' ৰ প্ৰকাৰ + ভিডিঅ\'ৰ প্ৰকাৰ + থিম + নিশাৰ থিম + পোহৰ + অন্ধকাৰ + ক\'লা + পপ-আপ বৈশিষ্ট্যসমূহ মনত ৰাখিব + পপ-আপৰ অন্তিম আকাৰ আৰু অৱস্থান মনত ৰাখিব + Inexact seek য়ে প্লেয়াৰটোক দ্ৰুত গতিত স্থান সলনি কৰিবলৈ অনুমতি দিয়ে। ৫, ১৫ বা ২৫ ছেকেণ্ড সলনি কৰিবলৈ বিচাৰিলে ইয়াৰ প্ৰয়োজন নহয় + ফাষ্ট-ফৰৱাৰ্ড/-ৰিৱাইণ্ড কৰিবলৈ বিচৰা সময়সীমা + প্লেবেক লোড কৰাৰ ব্যৱধানৰ আকাৰ + লোড ব্যৱধানৰ আকাৰ সলনি কৰক (বৰ্তমানে %s) । এটা কম মানে প্ৰাৰম্ভিক ভিডিঅ\' লোডিং দ্ৰুত কৰিব পাৰে। পৰিৱৰ্তনৰ বাবে এটা খেলুৱৈ পুনৰাৰম্ভৰ প্ৰয়োজন + থাম্বনেইলত থকা মূল ৰং অনুসৰি এণ্ড্ৰইডক জাননীৰ ৰং কাষ্টমাইজ কৰিবলৈ কওক (মন কৰিব যে এইটো সকলো ডিভাইচতে উপলব্ধ নহয়) + সক্ৰিয় প্লেয়াৰৰ queue সলনি কৰা হ’ব + থাম্বনেইল লোড কৰক + মন্তব্য দেখুৱাওক + বিৱৰণ দেখুৱাওক + মেটা তথ্য দেখুৱাওক + সংৰক্ষিত ছবি মচি পেলোৱা হ\'ল + সংৰক্ষিত কৰি থোৱা মেটাডাটা মচি পেলাওক + সকলো সংৰক্ষণ কৰি ৰখা ৱেবপেজৰ তথ্য আঁতৰাওক + সংৰক্ষণ কৰি থোৱা মেটাডাটা মচি পেলোৱা হ\'ল + পৰৱৰ্তী ষ্ট্ৰিম স্বয়ংক্ৰিয়ভাৱে enque কৰক + সজোৱা + ভিডিঅ\' ডাউনলোড folder + যোগ কৰক + ডাউনলোড কৰা অডিঅ\' ফাইলসমূহ ইয়াত সংৰক্ষণ কৰা হয় + থাম্বনেইলক ১:১ অনুপাত লৈ ক্ৰপ কৰক + ডাউনলোড কৰা ভিডিঅ’ ফাইলসমূহ ইয়াত সংৰক্ষণ কৰা হয় + ভিডিঅ\' ফাইলসমূহৰ বাবে ডাউনলোড folder বাছক + অডিঅ\' ডাউনলোড folder + অডিঅ\' ফাইলসমূহৰ বাবে ডাউনলোড folder নিৰ্বাচন কৰক + জাননীত দেখুওৱা ভিডিঅ’ থাম্বনেইলটো ১৬:৯ৰ পৰা ১:১ অনুপাতলৈ ক্ৰপ কৰক + First action button + Fifth action button + Edit each notification action below by tapping on it. Select up to three of them to be shown in the compact notification by using the checkboxes on the right + Second action button + You can select at most three actions to show in the compact notification! + পুনৰাবৃত্তি + শ্বাফেল + দ্ৰুত inexact seek ব্যৱহাৰ কৰক + এটা queue বিলুপ্তি কৰাৰ আগতে নিশ্চিতকৰণৰ বাবে সুধিব + এটা প্লেয়াৰ পৰা আন এটালৈ সলনি কৰিলে আপোনাৰ queue সলনি হ\'ব পাৰে + Fourth action button + Third action button + ভিডিঅ\'ৰ বিৱৰণ আৰু অতিৰিক্ত তথ্য লুকুৱাবলৈ বন্ধ কৰক + মন্তব্য লুকুৱাবলৈ বন্ধ কৰক + \'পৰৱৰ্তী\' আৰু \'সাদৃশ্য থকা\' ভিডিঅ\' দেখুৱাওক + থাম্বনেইলসমূহ লোড কৰা, তথ্য আৰু মেমৰি ব্যৱহাৰ সংৰক্ষণ কৰা ৰোধ কৰিবলে বন্ধ কৰক। পৰিবৰ্তনসমূহে ইন-মেমৰি আৰু অন-ডিস্ক কেশ্ব দুয়োটা পৰিষ্কাৰ কৰে + ষ্ট্ৰিমৰ সৃষ্টিকৰ্তা, ষ্ট্ৰিমৰ বিষয়বস্তু বা এটা সন্ধান অনুৰোধৰ বিষয়ে অতিৰিক্ত তথ্যৰ সৈতে মেটা তথ্যৰ বাকচসমূহ লুকুৱাবলৈ বন্ধ কৰক \ No newline at end of file diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index cd18e8d93..d8d88bd6d 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -1,8 +1,8 @@ - Başlamaq üçün böyüdücüyə toxun. + Başlamaq üçün böyüdücü güzgüyə toxun. %1$s tarixində yayımlanıb - Yayım oynadıcı tapılmadı. \"VLC\" yüklənilsin\? + Yayım oynadıcı tapılmadı. \"VLC\" quraşdırılsın\? Yayım oynadıcı tapılmadı (Oynatmaq üçün VLC\'ni quraşdıra bilərsiniz). Yüklə Ləğv et @@ -45,7 +45,7 @@ Qaranlıq Qara Abunəlikdən çıxın - Ani pəncərə rejimində aç + Ani görüntü rejimində aç Avtomatik oynat Endir Fasilələrdən sonra (məsələn, telefon zəngləri) oynatmağa davam etdir @@ -613,7 +613,7 @@ Xəta baş verdi: %1$s Fayl mövcud deyil, yaxud oxumaq və ya yazmaq icazəsi yoxdur Veb saytı təhlil etmək alınmadı - Səs ucalığı + Ucalıq Radio \"Oynadıcını çökdür\" Göstər Oynadıcıdan istifadə edərkən çökdürmə seçimini göstər @@ -728,4 +728,6 @@ %s endirmək üçün toxun Bu seçim yalnız tema üçün %s seçildikdə əlçatandır Daimi miniatürü ləğv et + Kart + Buferə kopyalamaq alınmadı \ No newline at end of file diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 637678c23..adf6601a8 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -741,4 +741,6 @@ Import nebo export odběrů z 3-tečkové nabídky Tato možnost je dostupná pouze při vybraném motivu %s Zrušení nastavení trvalého náhledu + Karta + Kopírování do schránky se nezdařilo \ No newline at end of file diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index d02b276cd..3b1959a69 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -728,4 +728,6 @@ Importieren oder Exportieren von Abonnements über das 3-Punkte-Menü Diese Option ist nur verfügbar, wenn %s als Design ausgewählt wird Dauerhaftes Vorschaubild aufheben + Kopieren in die Zwischenablage fehlgeschlagen + Karte \ No newline at end of file diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index cf3c0576b..78d89cc59 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -728,4 +728,6 @@ Έχετε την πιο πρόσφατη έκδοση του NewPipe Αυτή η επιλογή είναι διαθέσιμη μόνο εάν έχει επιλεγεί %s για Θέμα Κατάργηση μόνιμης μικρογραφίας + Αποτυχία αντιγραφής στο πρόχειρο + Κάρτα \ No newline at end of file diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index f92ad9128..9d68c28a9 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -744,4 +744,6 @@ Pulsa para descargar %s Esta opción sólo está disponible si %s está seleccionado para el tema Desactivar las miniaturas permanente + Error al copiar al portapapeles + Tarjeta \ No newline at end of file diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 87beff94f..986de133b 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -727,4 +727,7 @@ Tellimusi saad importida või eksportida 3 punktiga menüüst Sa kasutad NewPipe\'i uusimat versiooni See valik on kasutusel vaid %s teema puhul + Lõikelauale kopeerimine ei õnnestunud + Eemalda püsiv pisipilt + Kaart \ No newline at end of file diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index f22200c06..72dc77660 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -727,4 +727,7 @@ ضربه برای بارگیری %s از جدیدترین نگارش نیوپایپ استفاده می‌کنید این گزینه تنها هنگامی موجود است که %s به عنوان زمینه گزیده باشد + کارت + شکست در رونوشت به تخته‌گیره + ناتنظیم بندانگشتی ثابت \ No newline at end of file diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 65d5ce204..a8cf01ef0 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -727,4 +727,7 @@ Toca para descargar %s Importa ou exporta subscricións dende o menú dos 3 puntos Esta opción só está dispoñible se %s está seleccionado para o tema + Produciuse un erro ao copiar no portapapeis + Desactivala miniatura permanente + Tarxeta \ No newline at end of file diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index 67e6d45ad..35dc19c8c 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -754,4 +754,6 @@ זאת הגרסה העדכנית ביותר של NewPipe אפשרות זאת זמינה רק אם נבחרה ערכת נושא %s ביטול הגדרת תמונה ייצוגית קבועה + כרטיס + ההעתקה ללוח הגזירים נכשלה \ No newline at end of file diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 7c9ebf231..dc08899ed 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -727,4 +727,7 @@ आप न्यूपाइप का नवीनतम संस्करण चला रहे हैं %s डाउनलोड करने के लिए टैप करें यह विकल्प केवल तभी उपलब्ध होता है जब थीम के लिए %s का चयन किया जाता है + स्थायी थंमनेल अनसेट करें + कार्ड + क्लिपबोर्ड पर कॉपी करने में विफल \ No newline at end of file diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index af8781a23..c195d62e1 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -715,4 +715,6 @@ Ketuk untuk mengunduh %s Opsi ini hanya tersedia jika %s dipilih untuk Tema Batalkan penetapan gambar kecil permanen + Gagal menyalin ke papan klip + Kartu \ No newline at end of file diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 3304321d8..bf20d2be4 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -737,7 +737,10 @@ Visualizza sul sito Recupero veloce Premi per scaricare %s - L\'ultima versione di NewPipe è già in esecuzione + Stai già usando l\'ultima versione di NewPipe Importa o esporta iscrizioni dal menu a 3 punti Questa opzione è disponibile solo se %s è selezionato come Tema + Copia negli appunti non riuscita + Schede + Disattiva la miniatura permanente \ No newline at end of file diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 480d869e5..d02b56e75 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -712,4 +712,8 @@ よくある質問 アプリの使い方に困ったときは、よくある質問に答えていますので、ぜひご覧ください! %sがテーマに選択された場合のみ、この選択肢が利用可能です + 高速モード + 3 点メニューから登録チャンネルをインポートまたはエクスポートします + カード + クリップボードへのコピーに失敗しました \ No newline at end of file diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 0da729ba8..bb45a0970 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -97,14 +97,14 @@ Pradėti Pauzė - Ištrinti + Naikinti Kontrolinė suma Gerai Failo pavadinimas Gijos Klaida - NewPipe Atsiunčiama - Palieskite, kad peržiūrėtumėte išsamią informaciją + NewPipe atsisiunčiama + Bakstelėkite, kad peržiūrėtumėte išsamią informaciją Prašome palaukti… Nukopijuota į iškarpinę Prašome pasirinkti galimą atsisiuntimų aplankalą @@ -212,9 +212,9 @@ Nerasta video srautų Nerasta audio srautų Tempti kad perrūšiuoti - Sukurti + Kurti Nutraukti - Pervadinti + Pervardyti Vėliausiai žiūrėta Dažniausiai žiūrėta Eksportavimas baigtas @@ -230,7 +230,7 @@ Visada klausti Gauname informaciją… Įkeliamas pasirinktas turinys - Naujas grojaraštį + Naujas grojaraštis Pervadinti Pavadinimas Pridėti į grojaraštį @@ -311,7 +311,7 @@ Pranešimas apie naują NewPipe versiją Programos atnaujinimo pranešimas Failą - Failas pašalintas + Failas panaikintas Atlikėjai Albumai Dainos @@ -686,7 +686,7 @@ \nĮdiekite „Storage Access Framework“ suderinamą su šia failų tvarkykle Pranešimai pranešimui apie klaidas Rodyti „Grotuvas užlūžo“ - Sukurti klaidos pranešimą + Kurti klaidos pranešimą NewPipe susidūrė su klaida, paspauskite norėdami pranešti Šiam veiksmui nebuvo rasta tinkama failų tvarkyklė. \nĮdiekite failų tvarkyklę arba pabandykite išjungti \"%s\" atsisiuntimo nustatymuose diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 2390f8e69..c5e77b29f 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -726,4 +726,8 @@ Importeer of exporteer abonnementen vanuit het 3-punten menu U heeft de laatste versie van NewPipe Klik om %s te downloaden + Kon niet naar klembord kopiëren + Deze instelling is alleen beschikbaar als %s als thema ingesteld is + Kaart + Miniatuur niet ingesteld \ No newline at end of file diff --git a/app/src/main/res/values-or/strings.xml b/app/src/main/res/values-or/strings.xml index 0ad616d01..bc8d9fcee 100644 --- a/app/src/main/res/values-or/strings.xml +++ b/app/src/main/res/values-or/strings.xml @@ -727,4 +727,7 @@ ଆପଣ NewPipe ର ସର୍ବଶେଷ ସଂସ୍କରଣ ଚଳାଉଛନ୍ତି %s ଡାଉନଲୋଡ୍ କରିବାକୁ ଟ୍ୟାପ୍ କରନ୍ତୁ ଥିମ୍ ପାଇଁ %s ଚୟନ ହେଲେ ହିଁ ଏହି ବିକଳ୍ପ ଉପଲବ୍ଧ + କାର୍ଡ + କ୍ଲିପବୋର୍ଡରେ କପି କରିବାରେ ବିଫଳ + ସ୍ଥାୟୀ ଥମ୍ୱନେଲ୍ ସେଟ୍ କରନ୍ତୁ \ No newline at end of file diff --git a/app/src/main/res/values-pa/strings.xml b/app/src/main/res/values-pa/strings.xml index 169d45dad..2dcac20ab 100644 --- a/app/src/main/res/values-pa/strings.xml +++ b/app/src/main/res/values-pa/strings.xml @@ -727,4 +727,7 @@ ਤੁਸੀਂ ਨਿਊਪਾਈਪ ਦਾ ਨਵੀਨਤਮ ਸੰਸਕਰਣ ਚਲਾ ਰਹੇ ਹੋ %s ਨੂੰ ਡਾਊਨਲੋਡ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ ਇਹ ਵਿਕਲਪ ਤਾਂ ਹੀ ਉਪਲਬਧ ਹੈ ਜੇਕਰ %s ਨੂੰ ਥੀਮ ਲਈ ਚੁਣਿਆ ਗਿਆ ਹੈ + ਸਥਾਈ ਥੰਮਨੇਲ ਨੂੰ ਅਨਸੈੱਟ ਕਰੋ + ਕਲਿੱਪਬੋਰਡ \'ਤੇ ਕਾਪੀ ਕਰਨ ਵਿੱਚ ਅਸਫਲ + ਕਾਰਡ \ No newline at end of file diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index ab1e0aa72..e7ae07c85 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -749,4 +749,6 @@ Używasz najnowszej wersji NewPipe Ta opcja jest dostępna tylko wtedy, gdy %s jest wybrany jako motyw Usuń stałą miniaturę + Nie udało się skopiować do schowka + Karta \ No newline at end of file diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 1929df070..fc02f29d7 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -741,4 +741,6 @@ Você está executando a versão mais recente do NewPipe Esta opção só está disponível se %s for selecionado para Tema Desativar miniatura permanente + Cartão + Falha ao copiar para a área de transferência \ No newline at end of file diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 5a0d19285..4c2593330 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -727,4 +727,7 @@ Toque para descarregar %s Ordenação Esta opção só está disponível se %s for selecionado como tema + Desativar miniatura permanente + Não foi possível copiar para a área de transferência + Cartão \ No newline at end of file diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index e993da934..c47241dcc 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -740,4 +740,7 @@ Já está a executar a versão mais recente do NewPipe Toque para descarregar %s Esta opção só está disponível se %s for selecionado para o tema + Desativar miniatura permanente + Não foi possível copiar para a área de transferência + Cartão \ No newline at end of file diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 159b27a2a..50376dc03 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -692,8 +692,8 @@ Новые видео Уведомления о новых видео в подписках Частота проверки - Уведомлять о новых видео - Получать уведомления о новых видео из каналов, на которые Вы подписаны + Новые видео + Уведомлять о новых видео в подписках Тип подключения Любая сеть Уведомления отключены @@ -720,7 +720,7 @@ Загрузка сведений о трансляции… Проверить наличие новых трансляций Удалить все загруженные файлы\? - Уведомления плеера + Уведомление плеера , Полутон Проценты @@ -736,11 +736,15 @@ Скрыть проигранные Скрывать будущие видео Ответы на частые вопросы - Если у вас возникли проблемы с использованием приложения, обязательно ознакомьтесь с ответами на распространенные вопросы! + Если у вас возникли проблемы с использованием приложения, обязательно ознакомьтесь с ответами на распространённые вопросы! Посмотреть на веб-сайте Сортировка У вас последняя версия Быстрый режим Импорт и экспорт подписок в меню с 3-мя точками Нажмите для загрузки %s + Карта + Не удалось скопировать в буфер обмена + Доступно, когда Тема установлена в %s + Убрать постоянную миниатюру \ No newline at end of file diff --git a/app/src/main/res/values-sc/strings.xml b/app/src/main/res/values-sc/strings.xml index bdae4fd37..e649cfac2 100644 --- a/app/src/main/res/values-sc/strings.xml +++ b/app/src/main/res/values-sc/strings.xml @@ -727,4 +727,7 @@ Importa o esporta iscritziones dae su menù a 3 puntos Ses impreende s\'ùrtima versione de NewPipe Custa optzione est a disponimentu petzi si %s est seletzionadu comente tema + Carta + Còpia in punta de billete fallida + Disativa sa miniadura permanente \ No newline at end of file diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index c9718d0b0..aeeb9bdc3 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -728,4 +728,6 @@ 3-nokta menüsünden abonelikleri içe veya dışa aktarın Bu seçenek yalnızca tema için %s seçildiğinde kullanılabilir Kalıcı küçük resmin ayarını kaldır + Kart + Panoya kopyalanamadı \ No newline at end of file diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index e812e8e4f..16b48fc57 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -745,4 +745,6 @@ Швидкий режим Ця опція доступна, лише якщо темою обрано %s Прибрати постійну мініатюру + Картки + Не вдалося скопіювати до буфера обміну \ No newline at end of file diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index c3ada7180..029aa8343 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -715,4 +715,6 @@ 轻按下载 %s 只有在主题中选择了 %s 该选项才可用 取消设置永久缩略图 + 卡片 + 未能复制到剪贴板 \ No newline at end of file diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index ab902d373..dc7d589b8 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -510,7 +510,7 @@ 自動 (跟返部機嘅主題色系) 精選 廣播 - 您而家可以揀選喺描述入面嘅文字喇。不過要單聲,喺揀選模式嘅時候,個頁面可能眨眨下,同埋啲連結會撳唔到。 + 您而家可以揀選喺描述入面嘅文字喇。不過要單聲,喺揀選模式嘅時候,版面可能會有啲眨,同埋啲連結會撳唔到。 啟用揀選描述入面嘅文字 版權協議 分類 @@ -713,4 +713,8 @@ 右上角嘅選單有得匯入或匯出訂閱 您已經用緊最新版本嘅 NewPipe 撳一下去下載 %s + 唔再揀定封面縮圖 + 色系揀做%s嘅時候至有得揀 + 複製唔到去剪貼簿 + 一張張 \ No newline at end of file diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 1ed552ab8..ab975bff1 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -714,4 +714,7 @@ 快速模式 從三點式選單匯入或匯出訂閱 此選項僅在主題選擇為 %s 時可用 + 卡片 + 取消設定永久縮圖 + 無法複製到剪貼簿 \ No newline at end of file diff --git a/fastlane/metadata/android/sl/changelogs/991.txt b/fastlane/metadata/android/sl/changelogs/991.txt new file mode 100644 index 000000000..14f174a5a --- /dev/null +++ b/fastlane/metadata/android/sl/changelogs/991.txt @@ -0,0 +1,13 @@ +Novo +- Dodajanje gumba "Odpri v brskalniku" v podoknu z napakami +- Dodana možnost za prikaz skupin kanalov kot seznam +- [YouTube] Dolgi pritisk na segmente video pretoka za deljenje časovnega žiga URL-ja +- Dodajte gumb za predvajanje v vrsti v mini predvajalnik + +Izboljšave +- Dodana islandska lokalizacija ter posodobitev številnih drugih prevodov +- Številne notranje izboljšave + +Popravki +- Odprava večih sesutij +- [YouTube] Odprava težave z nalaganjem kanalov, nenamenskimi viri ter predvajanjem v nekaterih državah diff --git a/fastlane/metadata/android/sl/short_description.txt b/fastlane/metadata/android/sl/short_description.txt new file mode 100644 index 000000000..8826524fc --- /dev/null +++ b/fastlane/metadata/android/sl/short_description.txt @@ -0,0 +1 @@ +Brezplačen in enostaven YouTube "frontend" za Android. From b6bf0ffc40bade004b1cef8cec1eeb487d39618b Mon Sep 17 00:00:00 2001 From: Stypox Date: Sun, 22 Jan 2023 08:56:29 +0100 Subject: [PATCH 10/13] Add changelog for v0.25.0 (992) --- .../metadata/android/en-US/changelogs/992.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 fastlane/metadata/android/en-US/changelogs/992.txt diff --git a/fastlane/metadata/android/en-US/changelogs/992.txt b/fastlane/metadata/android/en-US/changelogs/992.txt new file mode 100644 index 000000000..807411d50 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/992.txt @@ -0,0 +1,17 @@ +New +• Subscriber count in video details +• Download from the queue +• Permanently set a playlist thumbnail +• Long-press hashtags and links +• Card view mode + +Improved +• Larger mini-player close button +• Smoother thumbnail downscaling +• Target Android 13 (API 33) +• Seeking no longer pauses the player + +Fixed +• Fix overlay on DeX/mouse +• Allow background player with no separate audio streams +• Various YouTube fixes and more… \ No newline at end of file From c70ce791dbfb659cd45d4a91a5de5a23e9eaa9ac Mon Sep 17 00:00:00 2001 From: Jared Fantaye Date: Fri, 27 Jan 2023 15:37:33 +0100 Subject: [PATCH 11/13] Added the duplicate indicator explanation & removed some unnecessary functions --- .../schabi/newpipe/local/LocalItemListAdapter.java | 11 ----------- .../newpipe/local/dialog/PlaylistAppendDialog.java | 13 ++++++++++++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java b/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java index ea7bc290d..05e2fdac0 100644 --- a/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java @@ -11,7 +11,6 @@ import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import org.schabi.newpipe.database.LocalItem; -import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; import org.schabi.newpipe.database.stream.model.StreamStateEntity; import org.schabi.newpipe.local.history.HistoryRecordManager; import org.schabi.newpipe.local.holder.LocalItemHolder; @@ -345,16 +344,6 @@ public class LocalItemListAdapter extends RecyclerView.Adapter { final List entities = getStreamEntities(); if (selectedItem instanceof PlaylistDuplicatesEntry && entities != null) { @@ -125,8 +124,20 @@ public final class PlaylistAppendDialog extends PlaylistDialog { playlistAdapter.clearStreamItemList(); playlistAdapter.addItems(playlists); playlistRecyclerView.setVisibility(View.VISIBLE); + setDuplicateIndicatorExplanation(playlists); } } + private void setDuplicateIndicatorExplanation(final List playlists) { + for (final PlaylistDuplicatesEntry entry : playlists) { + if (entry.timesStreamIsContained > 0) { + final View indicatorExplanation = getView() + .findViewById(R.id.playlist_duplicate); + indicatorExplanation.setVisibility(View.VISIBLE); + return; + } + } + + } private void onPlaylistSelected(@NonNull final LocalPlaylistManager manager, @NonNull final PlaylistDuplicatesEntry playlist, From 102975aeb3fabb18f2a87811d51aef463b30c5a0 Mon Sep 17 00:00:00 2001 From: Stypox Date: Sun, 29 Jan 2023 10:32:32 +0100 Subject: [PATCH 12/13] Improve handling playlist duplicate indicator --- .../local/dialog/PlaylistAppendDialog.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index b45f6bd9c..5aeca06ed 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -4,6 +4,7 @@ import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; @@ -28,6 +29,7 @@ public final class PlaylistAppendDialog extends PlaylistDialog { private RecyclerView playlistRecyclerView; private LocalItemListAdapter playlistAdapter; + private TextView playlistDuplicateIndicator; private final CompositeDisposable playlistDisposables = new CompositeDisposable(); @@ -73,6 +75,8 @@ public final class PlaylistAppendDialog extends PlaylistDialog { playlistRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext())); playlistRecyclerView.setAdapter(playlistAdapter); + playlistDuplicateIndicator = view.findViewById(R.id.playlist_duplicate); + final View newPlaylistButton = view.findViewById(R.id.newPlaylist); newPlaylistButton.setOnClickListener(ignored -> openCreatePlaylistDialog()); @@ -120,23 +124,20 @@ public final class PlaylistAppendDialog extends PlaylistDialog { } private void onPlaylistsReceived(@NonNull final List playlists) { - if (playlistAdapter != null && playlistRecyclerView != null) { + if (playlistAdapter != null + && playlistRecyclerView != null + && playlistDuplicateIndicator != null) { playlistAdapter.clearStreamItemList(); playlistAdapter.addItems(playlists); playlistRecyclerView.setVisibility(View.VISIBLE); - setDuplicateIndicatorExplanation(playlists); + playlistDuplicateIndicator.setVisibility( + anyPlaylistContainsDuplicates(playlists) ? View.VISIBLE : View.GONE); } } - private void setDuplicateIndicatorExplanation(final List playlists) { - for (final PlaylistDuplicatesEntry entry : playlists) { - if (entry.timesStreamIsContained > 0) { - final View indicatorExplanation = getView() - .findViewById(R.id.playlist_duplicate); - indicatorExplanation.setVisibility(View.VISIBLE); - return; - } - } + private boolean anyPlaylistContainsDuplicates(final List playlists) { + return playlists.stream() + .anyMatch(playlist -> playlist.timesStreamIsContained > 0); } private void onPlaylistSelected(@NonNull final LocalPlaylistManager manager, From 711345eff7c46269797de66e61f030cfbc72fa1c Mon Sep 17 00:00:00 2001 From: Stypox Date: Sun, 29 Jan 2023 10:32:44 +0100 Subject: [PATCH 13/13] Improve playlist duplicate indicator layout --- app/src/main/res/layout/dialog_playlists.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/layout/dialog_playlists.xml b/app/src/main/res/layout/dialog_playlists.xml index 5771b400f..ab4691fa9 100644 --- a/app/src/main/res/layout/dialog_playlists.xml +++ b/app/src/main/res/layout/dialog_playlists.xml @@ -37,17 +37,17 @@ + android:gravity="center" + android:text="@string/duplicate_in_playlist" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textSize="13sp" + android:visibility="gone" + tools:text="@tools:sample/lorem[20]" + tools:visibility="visible" />