From a68823491c4195cd26ed73da61882ba0379ef7f0 Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Thu, 28 Jun 2018 20:37:05 +0200 Subject: [PATCH 001/131] Delete on long press --- .../holder/ChannelMiniInfoItemHolder.java | 7 ++ .../subscription/SubscriptionFragment.java | 88 ++++++++++++++++++- app/src/main/res/values/strings.xml | 1 + 3 files changed, 95 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/info_list/holder/ChannelMiniInfoItemHolder.java b/app/src/main/java/org/schabi/newpipe/info_list/holder/ChannelMiniInfoItemHolder.java index 643886da8..ca783833a 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/holder/ChannelMiniInfoItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/holder/ChannelMiniInfoItemHolder.java @@ -47,6 +47,13 @@ public class ChannelMiniInfoItemHolder extends InfoItemHolder { itemBuilder.getOnChannelSelectedListener().selected(item); } }); + + itemView.setOnLongClickListener(view -> { + if (itemBuilder.getOnChannelSelectedListener() != null) { + itemBuilder.getOnChannelSelectedListener().held(item); + } + return true; + }); } protected String getDetailLine(final ChannelInfoItem item) { diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index 5f6ea42ee..f31e0a7c3 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -1,8 +1,11 @@ package org.schabi.newpipe.local.subscription; +import android.annotation.SuppressLint; import android.app.Activity; +import android.app.AlertDialog; import android.content.BroadcastReceiver; import android.content.Context; +import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Color; @@ -17,6 +20,7 @@ import android.support.v4.content.LocalBroadcastManager; import android.support.v7.app.ActionBar; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; +import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -30,18 +34,24 @@ import com.nononsenseapps.filepicker.Utils; import org.schabi.newpipe.R; import org.schabi.newpipe.database.subscription.SubscriptionEntity; +import org.schabi.newpipe.download.DownloadDialog; import org.schabi.newpipe.extractor.InfoItem; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; +import org.schabi.newpipe.extractor.channel.ChannelInfo; import org.schabi.newpipe.extractor.channel.ChannelInfoItem; import org.schabi.newpipe.extractor.exceptions.ExtractionException; +import org.schabi.newpipe.extractor.stream.StreamInfo; +import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.extractor.subscription.SubscriptionExtractor; import org.schabi.newpipe.fragments.BaseStateFragment; import org.schabi.newpipe.info_list.InfoListAdapter; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService; import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService; +import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.FilePickerActivityHelper; +import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.OnClickGesture; import org.schabi.newpipe.util.ServiceHelper; @@ -55,12 +65,17 @@ import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Locale; +import java.util.concurrent.TimeUnit; import icepick.State; +import io.reactivex.Observable; import io.reactivex.Observer; +import io.reactivex.Single; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.Disposable; +import io.reactivex.functions.Consumer; +import io.reactivex.functions.Function; import io.reactivex.schedulers.Schedulers; import static org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.KEY_MODE; @@ -316,12 +331,17 @@ public class SubscriptionFragment extends BaseStateFragment() { - @Override + public void selected(ChannelInfoItem selectedItem) { // Requires the parent fragment to find holder for fragment replacement NavigationHelper.openChannelFragment(getParentFragment().getFragmentManager(), selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName()); } + + public void held(ChannelInfoItem selectedItem) { + showLongTapDialog(selectedItem); + } + }); //noinspection ConstantConditions @@ -330,6 +350,72 @@ public class SubscriptionFragment extends BaseStateFragment importExportOptions.switchState()); } + private void showLongTapDialog(ChannelInfoItem selectedItem) { + final Context context = getContext(); + final Activity activity = getActivity(); + if (context == null || context.getResources() == null || getActivity() == null) return; + + final String[] commands = new String[]{ + context.getResources().getString(R.string.share), + context.getResources().getString(R.string.unsubscribe) + }; + + final DialogInterface.OnClickListener actions = (dialogInterface, i) -> { + switch (i) { + case 0: + shareChannel(selectedItem); + break; + case 1: + deleteChannel(selectedItem); + break; + default: + break; + } + }; + + final View bannerView = View.inflate(activity, R.layout.dialog_title, null); + bannerView.setSelected(true); + + TextView titleView = bannerView.findViewById(R.id.itemTitleView); + titleView.setText(selectedItem.getName()); + + TextView detailsView = bannerView.findViewById(R.id.itemAdditionalDetails); + detailsView.setVisibility(View.GONE); + + new AlertDialog.Builder(activity) + .setCustomTitle(bannerView) + .setItems(commands, actions) + .create() + .show(); + + } + + private void shareChannel (ChannelInfoItem selectedItem) { + shareUrl(selectedItem.getName(), selectedItem.getUrl()); + } + + @SuppressLint("CheckResult") + private void deleteChannel (ChannelInfoItem selectedItem) { + ExtractorHelper.getChannelInfo(selectedItem.getServiceId(), selectedItem.getUrl(), true) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe((@NonNull ChannelInfo result) -> { + mapOnUnsubscribe(SubscriptionEntity.from(result)); + }, (@NonNull Throwable throwable) -> { + + }); + } + + private Function mapOnUnsubscribe(final SubscriptionEntity subscription) { + return new Function() { + @Override + public Object apply(@NonNull Object o) throws Exception { + subscriptionService.subscriptionTable().delete(subscription); + return o; + } + }; + } + private void resetFragment() { if (disposables != null) disposables.clear(); if (infoListAdapter != null) infoListAdapter.clearStreamItemList(); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5ca88bd6f..2faae0175 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -27,6 +27,7 @@ RSS Subscribe Subscribed + Unsubscribe Channel unsubscribed Unable to change subscription Unable to update subscription From 0b7593ad28a1d04d67ef85e6157eca4c83579cc0 Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Thu, 28 Jun 2018 20:43:46 +0200 Subject: [PATCH 002/131] Delete on long press --- .../subscription/SubscriptionFragment.java | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index f31e0a7c3..4b311a852 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -8,8 +8,12 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; +import android.content.pm.ResolveInfo; +import android.content.res.Resources; import android.graphics.Color; import android.graphics.PorterDuff; +import android.graphics.drawable.Drawable; +import android.os.AsyncTask; import android.os.Bundle; import android.os.Environment; import android.os.Parcelable; @@ -21,6 +25,7 @@ import android.support.v7.app.ActionBar; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; +import android.util.TypedValue; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -78,6 +83,7 @@ import io.reactivex.functions.Consumer; import io.reactivex.functions.Function; import io.reactivex.schedulers.Schedulers; +import static android.content.ContentValues.TAG; import static org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.KEY_MODE; import static org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.KEY_VALUE; import static org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.PREVIOUS_EXPORT_MODE; @@ -400,20 +406,20 @@ public class SubscriptionFragment extends BaseStateFragment { - mapOnUnsubscribe(SubscriptionEntity.from(result)); + new LongOperation().execute(SubscriptionEntity.from(result)); }, (@NonNull Throwable throwable) -> { }); } - private Function mapOnUnsubscribe(final SubscriptionEntity subscription) { - return new Function() { - @Override - public Object apply(@NonNull Object o) throws Exception { - subscriptionService.subscriptionTable().delete(subscription); - return o; - } - }; + + private class LongOperation extends AsyncTask { + + @Override + protected Void doInBackground(SubscriptionEntity... params) { + subscriptionService.subscriptionTable().delete(params[0]); + return null; + } } private void resetFragment() { From 5150c2ee62dba57e954a8ef436118218e0ff50cb Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Thu, 28 Jun 2018 23:56:39 +0200 Subject: [PATCH 003/131] This thing actually works lol --- .../local/subscription/SubscriptionFragment.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index 4b311a852..8f02158bc 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -73,6 +73,7 @@ import java.util.Locale; import java.util.concurrent.TimeUnit; import icepick.State; +import io.reactivex.Flowable; import io.reactivex.Observable; import io.reactivex.Observer; import io.reactivex.Single; @@ -406,18 +407,20 @@ public class SubscriptionFragment extends BaseStateFragment { - new LongOperation().execute(SubscriptionEntity.from(result)); + new LongOperation().execute(result); }, (@NonNull Throwable throwable) -> { }); } - private class LongOperation extends AsyncTask { + private class LongOperation extends AsyncTask { @Override - protected Void doInBackground(SubscriptionEntity... params) { - subscriptionService.subscriptionTable().delete(params[0]); + protected Void doInBackground(ChannelInfo... params) { + ChannelInfo info = params[0]; + Flowable> subscription = subscriptionService.subscriptionTable().getSubscription(info.getServiceId(), info.getUrl()); + subscriptionService.subscriptionTable().delete(subscription.blockingFirst()); return null; } } From f2f275512d4ef276e473ffb08b24202fef340c18 Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Fri, 29 Jun 2018 00:39:16 +0200 Subject: [PATCH 004/131] It looks good now --- .../subscription/SubscriptionFragment.java | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index 8f02158bc..16f203923 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -6,6 +6,7 @@ import android.app.AlertDialog; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; +import android.content.Entity; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ResolveInfo; @@ -76,6 +77,7 @@ import icepick.State; import io.reactivex.Flowable; import io.reactivex.Observable; import io.reactivex.Observer; +import io.reactivex.Scheduler; import io.reactivex.Single; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; @@ -405,26 +407,13 @@ public class SubscriptionFragment extends BaseStateFragment { - new LongOperation().execute(result); - }, (@NonNull Throwable throwable) -> { - + List toDelete = subscriptionService.subscriptionTable().getSubscription(result.getServiceId(), result.getUrl()).blockingFirst(); + subscriptionService.subscriptionTable().delete(toDelete); }); } - - private class LongOperation extends AsyncTask { - - @Override - protected Void doInBackground(ChannelInfo... params) { - ChannelInfo info = params[0]; - Flowable> subscription = subscriptionService.subscriptionTable().getSubscription(info.getServiceId(), info.getUrl()); - subscriptionService.subscriptionTable().delete(subscription.blockingFirst()); - return null; - } - } - private void resetFragment() { if (disposables != null) disposables.clear(); if (infoListAdapter != null) infoListAdapter.clearStreamItemList(); From b9ea7ce066189b21b94268ed9ae33b9c222f4385 Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Fri, 29 Jun 2018 00:39:44 +0200 Subject: [PATCH 005/131] Code looking nicer --- .../newpipe/local/subscription/SubscriptionFragment.java | 4 +++- .../main/java/org/schabi/newpipe/util/ExtractorHelper.java | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index 16f203923..4c4242055 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -409,7 +409,9 @@ public class SubscriptionFragment extends BaseStateFragment { - List toDelete = subscriptionService.subscriptionTable().getSubscription(result.getServiceId(), result.getUrl()).blockingFirst(); + List toDelete = subscriptionService.subscriptionTable() + .getSubscription(result.getServiceId(), result.getUrl()) + .blockingFirst(); subscriptionService.subscriptionTable().delete(toDelete); }); } diff --git a/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java b/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java index 1897589c6..e248ed993 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java @@ -32,6 +32,7 @@ import org.schabi.newpipe.extractor.Info; import org.schabi.newpipe.extractor.ListExtractor.InfoItemsPage; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.channel.ChannelInfo; +import org.schabi.newpipe.extractor.channel.ChannelInfoItem; import org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException; import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.exceptions.ReCaptchaException; From 181a14ce5958149af308872dfc66a826caea2da1 Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Sat, 30 Jun 2018 02:20:01 +0200 Subject: [PATCH 006/131] Disposable now is cleaned properly --- .../newpipe/local/subscription/SubscriptionFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index 4c4242055..c0e24b53f 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -405,6 +405,7 @@ public class SubscriptionFragment extends BaseStateFragment Date: Sat, 30 Jun 2018 02:42:47 +0200 Subject: [PATCH 007/131] Added unsubscription toast Added error handling Corrected threads --- .../subscription/SubscriptionFragment.java | 63 +++++++++++-------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index c0e24b53f..5a9f34cd9 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -6,15 +6,10 @@ import android.app.AlertDialog; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; -import android.content.Entity; import android.content.Intent; import android.content.IntentFilter; -import android.content.pm.ResolveInfo; -import android.content.res.Resources; import android.graphics.Color; import android.graphics.PorterDuff; -import android.graphics.drawable.Drawable; -import android.os.AsyncTask; import android.os.Bundle; import android.os.Environment; import android.os.Parcelable; @@ -26,7 +21,6 @@ import android.support.v7.app.ActionBar; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; -import android.util.TypedValue; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -40,24 +34,20 @@ import com.nononsenseapps.filepicker.Utils; import org.schabi.newpipe.R; import org.schabi.newpipe.database.subscription.SubscriptionEntity; -import org.schabi.newpipe.download.DownloadDialog; import org.schabi.newpipe.extractor.InfoItem; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.channel.ChannelInfo; import org.schabi.newpipe.extractor.channel.ChannelInfoItem; import org.schabi.newpipe.extractor.exceptions.ExtractionException; -import org.schabi.newpipe.extractor.stream.StreamInfo; -import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.extractor.subscription.SubscriptionExtractor; import org.schabi.newpipe.fragments.BaseStateFragment; import org.schabi.newpipe.info_list.InfoListAdapter; -import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService; import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService; +import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.FilePickerActivityHelper; -import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.OnClickGesture; import org.schabi.newpipe.util.ServiceHelper; @@ -71,22 +61,15 @@ import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Locale; -import java.util.concurrent.TimeUnit; import icepick.State; -import io.reactivex.Flowable; -import io.reactivex.Observable; import io.reactivex.Observer; import io.reactivex.Scheduler; -import io.reactivex.Single; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.Disposable; -import io.reactivex.functions.Consumer; -import io.reactivex.functions.Function; import io.reactivex.schedulers.Schedulers; -import static android.content.ContentValues.TAG; import static org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.KEY_MODE; import static org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.KEY_VALUE; import static org.schabi.newpipe.local.subscription.services.SubscriptionsImportService.PREVIOUS_EXPORT_MODE; @@ -405,16 +388,42 @@ public class SubscriptionFragment extends BaseStateFragment { - List toDelete = subscriptionService.subscriptionTable() - .getSubscription(result.getServiceId(), result.getUrl()) - .blockingFirst(); - subscriptionService.subscriptionTable().delete(toDelete); - })); + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(getUnsubscribeObserver()); + } + + + + private Observer getUnsubscribeObserver() { + return new Observer() { + @Override + public void onSubscribe(Disposable d) { + disposables.add(d); + } + + @Override + public void onNext(ChannelInfo info) { + List toDelete = subscriptionService.subscriptionTable() + .getSubscription(info.getServiceId(), info.getUrl()) + .blockingFirst(); + Log.d(TAG, "onNext: test"); + + Scheduler io = Schedulers.io(); + io.scheduleDirect(() -> subscriptionService.subscriptionTable().delete(toDelete)); + } + + @Override + public void onError(Throwable exception) { + SubscriptionFragment.this.onError(exception); + } + + @Override + public void onComplete() { + Toast.makeText(activity, getString(R.string.channel_unsubscribed), Toast.LENGTH_SHORT).show(); + } + }; } private void resetFragment() { From 510591ef0f33bad0d72a0901c64bee33f29f58c8 Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Thu, 16 Aug 2018 00:45:37 +0200 Subject: [PATCH 008/131] Removed use of blockingFirst() and scheduleDirect() --- .../subscription/SubscriptionFragment.java | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index a8603960b..c0a96da32 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -21,7 +21,6 @@ import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; -import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -44,9 +43,9 @@ import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.subscription.SubscriptionExtractor; import org.schabi.newpipe.fragments.BaseStateFragment; import org.schabi.newpipe.info_list.InfoListAdapter; -import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService; import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService; +import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.FilePickerActivityHelper; @@ -66,7 +65,6 @@ import java.util.Locale; import icepick.State; import io.reactivex.Observer; -import io.reactivex.Scheduler; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.Disposable; @@ -413,13 +411,12 @@ public class SubscriptionFragment extends BaseStateFragment toDelete = subscriptionService.subscriptionTable() + final io.reactivex.Observable> observable = subscriptionService.subscriptionTable() .getSubscription(info.getServiceId(), info.getUrl()) - .blockingFirst(); - Log.d(TAG, "onNext: test"); + .toObservable(); - Scheduler io = Schedulers.io(); - io.scheduleDirect(() -> subscriptionService.subscriptionTable().delete(toDelete)); + observable.observeOn(Schedulers.io()) + .subscribe(getDeleteObserver()); } @Override @@ -434,6 +431,28 @@ public class SubscriptionFragment extends BaseStateFragment> getDeleteObserver(){ + return new Observer>() { + @Override + public void onSubscribe(Disposable d) { + disposables.add(d); + } + + @Override + public void onNext(List subscriptionEntities) { + subscriptionService.subscriptionTable().delete(subscriptionEntities); + } + + @Override + public void onError(Throwable exception) { + SubscriptionFragment.this.onError(exception); + } + + @Override + public void onComplete() { } + }; + } + private void resetFragment() { if (disposables != null) disposables.clear(); if (infoListAdapter != null) infoListAdapter.clearStreamItemList(); From f4416fe007c90f0da6b890c30f5f5ad404e34722 Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Thu, 16 Aug 2018 01:04:37 +0200 Subject: [PATCH 009/131] Doesn't use getChannelInfo() anymore. --- .../subscription/SubscriptionFragment.java | 43 ++++--------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index c0a96da32..e39047bd3 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -37,7 +37,6 @@ import org.schabi.newpipe.database.subscription.SubscriptionEntity; import org.schabi.newpipe.extractor.InfoItem; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; -import org.schabi.newpipe.extractor.channel.ChannelInfo; import org.schabi.newpipe.extractor.channel.ChannelInfoItem; import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.subscription.SubscriptionExtractor; @@ -47,7 +46,6 @@ import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; -import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.FilePickerActivityHelper; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.OnClickGesture; @@ -394,43 +392,18 @@ public class SubscriptionFragment extends BaseStateFragment> observable = subscriptionService.subscriptionTable() + .getSubscription(selectedItem.getServiceId(), selectedItem.getUrl()) + .toObservable(); - - - private Observer getUnsubscribeObserver() { - return new Observer() { - @Override - public void onSubscribe(Disposable d) { - disposables.add(d); - } - - @Override - public void onNext(ChannelInfo info) { - final io.reactivex.Observable> observable = subscriptionService.subscriptionTable() - .getSubscription(info.getServiceId(), info.getUrl()) - .toObservable(); - - observable.observeOn(Schedulers.io()) + observable.observeOn(Schedulers.io()) .subscribe(getDeleteObserver()); - } - @Override - public void onError(Throwable exception) { - SubscriptionFragment.this.onError(exception); - } - - @Override - public void onComplete() { - Toast.makeText(activity, getString(R.string.channel_unsubscribed), Toast.LENGTH_SHORT).show(); - } - }; + Toast.makeText(activity, getString(R.string.channel_unsubscribed), Toast.LENGTH_SHORT).show(); } + + private Observer> getDeleteObserver(){ return new Observer>() { @Override @@ -449,7 +422,7 @@ public class SubscriptionFragment extends BaseStateFragment Date: Wed, 22 Aug 2018 08:32:58 +0300 Subject: [PATCH 010/131] Video details tablet layout --- .../fragments/detail/VideoDetailFragment.java | 7 +- .../fragment_video_detail.xml | 505 ++++++++++++++++++ 2 files changed, 510 insertions(+), 2 deletions(-) create mode 100644 app/src/main/res/layout-large-land/fragment_video_detail.xml diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index d91502cdd..bb642cefa 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -179,7 +179,7 @@ public class VideoDetailFragment private TextView thumbsDisabledTextView; private TextView nextStreamTitle; - private LinearLayout relatedStreamRootLayout; + private View relatedStreamRootLayout; private LinearLayout relatedStreamsView; private ImageButton relatedStreamExpandButton; @@ -623,7 +623,10 @@ public class VideoDetailFragment infoItemBuilder.buildView(relatedStreamsView, info.getNextVideo())); relatedStreamsView.addView(getSeparatorView()); relatedStreamRootLayout.setVisibility(View.VISIBLE); - } else nextStreamTitle.setVisibility(View.GONE); + } else { + nextStreamTitle.setVisibility(View.GONE); + relatedStreamRootLayout.setVisibility(View.GONE); + } if (info.getRelatedStreams() != null && !info.getRelatedStreams().isEmpty() && showRelatedStreams) { diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml new file mode 100644 index 000000000..4d3914947 --- /dev/null +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -0,0 +1,505 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 1e0f6f9e41e5d7c22fec18788615059e9f19c5af Mon Sep 17 00:00:00 2001 From: Vasily Date: Wed, 22 Aug 2018 10:14:01 +0300 Subject: [PATCH 011/131] Grid view --- .../fragments/list/BaseListFragment.java | 56 +++++++++++++-- .../newpipe/info_list/InfoListAdapter.java | 34 ++++++++- .../holder/ChannelGridInfoItemHolder.java | 13 ++++ .../holder/PlaylistGridInfoItemHolder.java | 13 ++++ .../holder/StreamGridInfoItemHolder.java | 13 ++++ .../res/layout/list_channel_grid_item.xml | 48 +++++++++++++ .../res/layout/list_playlist_grid_item.xml | 72 +++++++++++++++++++ .../main/res/layout/list_stream_grid_item.xml | 69 ++++++++++++++++++ app/src/main/res/values/dimens.xml | 2 + app/src/main/res/values/settings_keys.xml | 11 +++ app/src/main/res/values/strings.xml | 3 + app/src/main/res/xml/appearance_settings.xml | 8 +++ 12 files changed, 335 insertions(+), 7 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/info_list/holder/ChannelGridInfoItemHolder.java create mode 100644 app/src/main/java/org/schabi/newpipe/info_list/holder/PlaylistGridInfoItemHolder.java create mode 100644 app/src/main/java/org/schabi/newpipe/info_list/holder/StreamGridInfoItemHolder.java create mode 100644 app/src/main/res/layout/list_channel_grid_item.xml create mode 100644 app/src/main/res/layout/list_playlist_grid_item.xml create mode 100644 app/src/main/res/layout/list_stream_grid_item.xml diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java index 1db12bba9..bfa16fb08 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java @@ -3,10 +3,14 @@ package org.schabi.newpipe.fragments.list; import android.app.Activity; import android.content.Context; import android.content.DialogInterface; +import android.content.SharedPreferences; +import android.content.res.Resources; import android.os.Bundle; +import android.preference.PreferenceManager; import android.support.annotation.NonNull; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; @@ -21,9 +25,9 @@ import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem; import org.schabi.newpipe.extractor.stream.StreamInfoItem; import org.schabi.newpipe.fragments.BaseStateFragment; import org.schabi.newpipe.fragments.OnScrollBelowItemsListener; -import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; import org.schabi.newpipe.info_list.InfoItemDialog; import org.schabi.newpipe.info_list.InfoListAdapter; +import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; import org.schabi.newpipe.player.playqueue.SinglePlayQueue; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.NavigationHelper; @@ -36,7 +40,7 @@ import java.util.Queue; import static org.schabi.newpipe.util.AnimationUtils.animateView; -public abstract class BaseListFragment extends BaseStateFragment implements ListViewContract, StateSaver.WriteRead { +public abstract class BaseListFragment extends BaseStateFragment implements ListViewContract, StateSaver.WriteRead, SharedPreferences.OnSharedPreferenceChangeListener { /*////////////////////////////////////////////////////////////////////////// // Views @@ -44,6 +48,9 @@ public abstract class BaseListFragment extends BaseStateFragment implem protected InfoListAdapter infoListAdapter; protected RecyclerView itemsList; + private int updateFlags = 0; + + private static final int LIST_MODE_UPDATE_FLAG = 0x32; /*////////////////////////////////////////////////////////////////////////// // LifeCycle @@ -59,12 +66,32 @@ public abstract class BaseListFragment extends BaseStateFragment implem public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true); + PreferenceManager.getDefaultSharedPreferences(activity) + .registerOnSharedPreferenceChangeListener(this); } @Override public void onDestroy() { super.onDestroy(); StateSaver.onDestroy(savedState); + PreferenceManager.getDefaultSharedPreferences(activity) + .unregisterOnSharedPreferenceChangeListener(this); + } + + @Override + public void onResume() { + super.onResume(); + + if (updateFlags != 0) { + if ((updateFlags & LIST_MODE_UPDATE_FLAG) != 0) { + final String list_key = getString(R.string.list_view_mode_value); + final boolean useGrid = !list_key.equals(PreferenceManager.getDefaultSharedPreferences(activity).getString(getString(R.string.list_view_mode_key), list_key)); + itemsList.setLayoutManager(useGrid ? getGridLayoutManager() : getListLayoutManager()); + infoListAdapter.setGridItemVariants(useGrid); + infoListAdapter.notifyDataSetChanged(); + } + updateFlags = 0; + } } /*////////////////////////////////////////////////////////////////////////// @@ -119,13 +146,27 @@ public abstract class BaseListFragment extends BaseStateFragment implem return new LinearLayoutManager(activity); } + protected RecyclerView.LayoutManager getGridLayoutManager() { + final Resources resources = activity.getResources(); + int width = resources.getDimensionPixelSize(R.dimen.video_item_grid_thumbnail_image_width); + width += (24 * resources.getDisplayMetrics().density); + final int spanCount = (int) Math.floor(resources.getDisplayMetrics().widthPixels / (double)width); + final GridLayoutManager lm = new GridLayoutManager(activity, spanCount); + lm.setSpanSizeLookup(infoListAdapter.getSpanSizeLookup(spanCount)); + return lm; + } + @Override protected void initViews(View rootView, Bundle savedInstanceState) { super.initViews(rootView, savedInstanceState); - itemsList = rootView.findViewById(R.id.items_list); - itemsList.setLayoutManager(getListLayoutManager()); + final String list_key = getString(R.string.list_view_mode_value); + final boolean useGrid = !list_key.equals(PreferenceManager.getDefaultSharedPreferences(activity).getString(getString(R.string.list_view_mode_key), list_key)); + itemsList = rootView.findViewById(R.id.items_list); + itemsList.setLayoutManager(useGrid ? getGridLayoutManager() : getListLayoutManager()); + + infoListAdapter.setGridItemVariants(useGrid); infoListAdapter.setFooter(getListFooter()); infoListAdapter.setHeader(getListHeader()); @@ -315,4 +356,11 @@ public abstract class BaseListFragment extends BaseStateFragment implem public void handleNextItems(N result) { isLoading.set(false); } + + @Override + public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { + if (key.equals(getString(R.string.list_view_mode_key))) { + updateFlags |= LIST_MODE_UPDATE_FLAG; + } + } } diff --git a/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java b/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java index cf12deb6f..15fdcad05 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/InfoListAdapter.java @@ -1,6 +1,7 @@ package org.schabi.newpipe.info_list; import android.app.Activity; +import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; @@ -12,9 +13,12 @@ import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem; import org.schabi.newpipe.extractor.stream.StreamInfoItem; import org.schabi.newpipe.info_list.holder.ChannelInfoItemHolder; import org.schabi.newpipe.info_list.holder.ChannelMiniInfoItemHolder; +import org.schabi.newpipe.info_list.holder.ChannelGridInfoItemHolder; import org.schabi.newpipe.info_list.holder.InfoItemHolder; +import org.schabi.newpipe.info_list.holder.PlaylistGridInfoItemHolder; import org.schabi.newpipe.info_list.holder.PlaylistInfoItemHolder; import org.schabi.newpipe.info_list.holder.PlaylistMiniInfoItemHolder; +import org.schabi.newpipe.info_list.holder.StreamGridInfoItemHolder; import org.schabi.newpipe.info_list.holder.StreamInfoItemHolder; import org.schabi.newpipe.info_list.holder.StreamMiniInfoItemHolder; import org.schabi.newpipe.util.FallbackViewHolder; @@ -52,14 +56,18 @@ public class InfoListAdapter extends RecyclerView.Adapter infoItemList; private boolean useMiniVariant = false; + private boolean useGridVariant = false; private boolean showFooter = false; private View header = null; private View footer = null; @@ -94,6 +102,10 @@ public class InfoListAdapter extends RecyclerView.Adapter data) { if (data != null) { if (DEBUG) { @@ -206,11 +218,11 @@ public class InfoListAdapter extends RecyclerView.Adapter + + + + + + + + + diff --git a/app/src/main/res/layout/list_playlist_grid_item.xml b/app/src/main/res/layout/list_playlist_grid_item.xml new file mode 100644 index 000000000..949b1159b --- /dev/null +++ b/app/src/main/res/layout/list_playlist_grid_item.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/list_stream_grid_item.xml b/app/src/main/res/layout/list_stream_grid_item.xml new file mode 100644 index 000000000..cf73bf9b1 --- /dev/null +++ b/app/src/main/res/layout/list_stream_grid_item.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index e7af3231e..229c00533 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -12,6 +12,8 @@ 124dp 70dp + 164dp + 92dp 94dp diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 02f065285..941f033d8 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -891,5 +891,16 @@ 144p + list_view_mode + list + + + list + grid + + + @string/list + @string/grid + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 240fef3dc..f3976c6a4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -514,5 +514,8 @@ None Minimize to background player Minimize to popup player + List view mode + List + Grid diff --git a/app/src/main/res/xml/appearance_settings.xml b/app/src/main/res/xml/appearance_settings.xml index 239f5f3b3..490310c91 100644 --- a/app/src/main/res/xml/appearance_settings.xml +++ b/app/src/main/res/xml/appearance_settings.xml @@ -22,6 +22,14 @@ android:title="@string/show_hold_to_append_title" android:summary="@string/show_hold_to_append_summary"/> + + Date: Wed, 22 Aug 2018 10:29:37 +0300 Subject: [PATCH 012/131] Fix crash on screen rotation --- .../fragments/detail/VideoDetailFragment.java | 31 +++++++++++++------ .../fragment_video_detail.xml | 2 +- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index bb642cefa..ad3dacf6b 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -33,12 +33,14 @@ import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.view.ViewParent; import android.widget.AdapterView; import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; +import android.widget.ScrollView; import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; @@ -64,19 +66,17 @@ import org.schabi.newpipe.extractor.stream.StreamType; import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.fragments.BackPressable; import org.schabi.newpipe.fragments.BaseStateFragment; -import org.schabi.newpipe.local.history.HistoryRecordManager; -import org.schabi.newpipe.report.ErrorActivity; -import org.schabi.newpipe.util.StreamItemAdapter; -import org.schabi.newpipe.util.StreamItemAdapter.StreamSizeWrapper; -import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; import org.schabi.newpipe.info_list.InfoItemBuilder; import org.schabi.newpipe.info_list.InfoItemDialog; +import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; +import org.schabi.newpipe.local.history.HistoryRecordManager; import org.schabi.newpipe.player.MainVideoPlayer; import org.schabi.newpipe.player.PopupVideoPlayer; import org.schabi.newpipe.player.helper.PlayerHelper; import org.schabi.newpipe.player.old.PlayVideoActivity; import org.schabi.newpipe.player.playqueue.PlayQueue; import org.schabi.newpipe.player.playqueue.SinglePlayQueue; +import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.ExtractorHelper; @@ -87,6 +87,8 @@ import org.schabi.newpipe.util.Localization; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.OnClickGesture; import org.schabi.newpipe.util.PermissionHelper; +import org.schabi.newpipe.util.StreamItemAdapter; +import org.schabi.newpipe.util.StreamItemAdapter.StreamSizeWrapper; import org.schabi.newpipe.util.ThemeHelper; import java.io.Serializable; @@ -179,7 +181,7 @@ public class VideoDetailFragment private TextView thumbsDisabledTextView; private TextView nextStreamTitle; - private View relatedStreamRootLayout; + private LinearLayout relatedStreamRootLayout; private LinearLayout relatedStreamsView; private ImageButton relatedStreamExpandButton; @@ -622,10 +624,10 @@ public class VideoDetailFragment relatedStreamsView.addView( infoItemBuilder.buildView(relatedStreamsView, info.getNextVideo())); relatedStreamsView.addView(getSeparatorView()); - relatedStreamRootLayout.setVisibility(View.VISIBLE); + setRelatedStreamsVisibility(View.VISIBLE); } else { nextStreamTitle.setVisibility(View.GONE); - relatedStreamRootLayout.setVisibility(View.GONE); + setRelatedStreamsVisibility(View.GONE); } if (info.getRelatedStreams() != null @@ -642,13 +644,13 @@ public class VideoDetailFragment } //if (DEBUG) Log.d(TAG, "Total time " + ((System.nanoTime() - first) / 1000000L) + "ms"); - relatedStreamRootLayout.setVisibility(View.VISIBLE); + setRelatedStreamsVisibility(View.VISIBLE); relatedStreamExpandButton.setVisibility(View.VISIBLE); relatedStreamExpandButton.setImageDrawable(ContextCompat.getDrawable( activity, ThemeHelper.resolveResourceIdFromAttr(activity, R.attr.expand))); } else { - if (info.getNextVideo() == null) relatedStreamRootLayout.setVisibility(View.GONE); + if (info.getNextVideo() == null) setRelatedStreamsVisibility(View.GONE); relatedStreamExpandButton.setVisibility(View.GONE); } } @@ -1302,4 +1304,13 @@ public class VideoDetailFragment showError(getString(R.string.blocked_by_gema), false, R.drawable.gruese_die_gema); } + + private void setRelatedStreamsVisibility(int visibility) { + final ViewParent parent = relatedStreamRootLayout.getParent(); + if (parent instanceof ScrollView) { + ((ScrollView) parent).setVisibility(visibility); + } else { + relatedStreamRootLayout.setVisibility(visibility); + } + } } \ No newline at end of file diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index 4d3914947..bf49a01a6 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -456,13 +456,13 @@ Date: Wed, 22 Aug 2018 10:33:10 +0300 Subject: [PATCH 013/131] Update translations --- app/src/main/res/values-ru/strings.xml | 5 +++++ app/src/main/res/values-uk/strings.xml | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 3cacc83e8..e2198f240 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -485,6 +485,7 @@ Предел разрешения в мобильной сети Каналы Плейлисты + Видео Дорожки Пользователи Пропускать тишину @@ -497,4 +498,8 @@ Фоновый плеер Плеер в окне + Вид списка + Список + Сетка + diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 78eb45590..e4d4106d4 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -481,8 +481,12 @@ Зменшити до фонового програвачу Зменшити до віконного програвачу -Канали + Канали Плейлисти Стежки Користувачі - + + Вигляд списку + Список + Сiтка + From 4326354ca65a6b00b6ef693a9f0064824a28d509 Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Wed, 22 Aug 2018 13:59:12 +0200 Subject: [PATCH 014/131] Code cleanup --- .../newpipe/local/subscription/SubscriptionFragment.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index e39047bd3..7b7f43047 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -392,11 +392,10 @@ public class SubscriptionFragment extends BaseStateFragment> observable = subscriptionService.subscriptionTable() + subscriptionService.subscriptionTable() .getSubscription(selectedItem.getServiceId(), selectedItem.getUrl()) - .toObservable(); - - observable.observeOn(Schedulers.io()) + .toObservable() + .observeOn(Schedulers.io()) .subscribe(getDeleteObserver()); Toast.makeText(activity, getString(R.string.channel_unsubscribed), Toast.LENGTH_SHORT).show(); From ce21fe208738ea6f27936df4314b78d76a80074b Mon Sep 17 00:00:00 2001 From: Vasily Date: Wed, 29 Aug 2018 07:53:58 +0300 Subject: [PATCH 015/131] Always show description on tablets --- .../fragments/detail/VideoDetailFragment.java | 37 ++++++++++++------- .../fragment_video_detail.xml | 16 +------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index ad3dacf6b..8f46ec7c6 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -156,6 +156,7 @@ public class VideoDetailFragment private View videoTitleRoot; private TextView videoTitleTextView; + @Nullable private ImageView videoTitleToggleArrow; private TextView videoCountView; @@ -417,14 +418,16 @@ public class VideoDetailFragment } private void toggleTitleAndDescription() { - if (videoDescriptionRootLayout.getVisibility() == View.VISIBLE) { - videoTitleTextView.setMaxLines(1); - videoDescriptionRootLayout.setVisibility(View.GONE); - videoTitleToggleArrow.setImageResource(R.drawable.arrow_down); - } else { - videoTitleTextView.setMaxLines(10); - videoDescriptionRootLayout.setVisibility(View.VISIBLE); - videoTitleToggleArrow.setImageResource(R.drawable.arrow_up); + if (videoTitleToggleArrow != null) { //it is null for tablets + if (videoDescriptionRootLayout.getVisibility() == View.VISIBLE) { + videoTitleTextView.setMaxLines(1); + videoDescriptionRootLayout.setVisibility(View.GONE); + videoTitleToggleArrow.setImageResource(R.drawable.arrow_down); + } else { + videoTitleTextView.setMaxLines(10); + videoDescriptionRootLayout.setVisibility(View.VISIBLE); + videoTitleToggleArrow.setImageResource(R.drawable.arrow_up); + } } } @@ -1119,8 +1122,10 @@ public class VideoDetailFragment animateView(videoTitleTextView, true, 0); videoDescriptionRootLayout.setVisibility(View.GONE); - videoTitleToggleArrow.setImageResource(R.drawable.arrow_down); - videoTitleToggleArrow.setVisibility(View.GONE); + if (videoTitleToggleArrow != null) { + videoTitleToggleArrow.setImageResource(R.drawable.arrow_down); + videoTitleToggleArrow.setVisibility(View.GONE); + } videoTitleRoot.setClickable(false); imageLoader.cancelDisplayTask(thumbnailImageView); @@ -1195,11 +1200,15 @@ public class VideoDetailFragment detailDurationView.setVisibility(View.GONE); } - videoTitleRoot.setClickable(true); - videoTitleToggleArrow.setVisibility(View.VISIBLE); - videoTitleToggleArrow.setImageResource(R.drawable.arrow_down); videoDescriptionView.setVisibility(View.GONE); - videoDescriptionRootLayout.setVisibility(View.GONE); + if (videoTitleToggleArrow != null) { + videoTitleRoot.setClickable(true); + videoTitleToggleArrow.setVisibility(View.VISIBLE); + videoTitleToggleArrow.setImageResource(R.drawable.arrow_down); + videoDescriptionRootLayout.setVisibility(View.GONE); + } else { + videoDescriptionRootLayout.setVisibility(View.VISIBLE); + } if (!TextUtils.isEmpty(info.getUploadDate())) { videoUploadDateView.setText(Localization.localizeDate(activity, info.getUploadDate())); } diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index bf49a01a6..73939d60a 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -109,9 +109,6 @@ android:id="@+id/detail_title_root_layout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/selectableItemBackground" - android:clickable="true" - android:focusable="true" android:paddingLeft="12dp" android:paddingRight="12dp"> @@ -129,15 +126,6 @@ tools:ignore="RtlHardcoded" tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a ultricies ex. Integer sit amet sodales risus. Duis non mi et urna pretium bibendum. Nunc eleifend est quis ipsum porttitor egestas. Sed facilisis, nisl quis eleifend pellentesque, orci metus egestas dolor, at accumsan eros metus quis libero." /> - - @@ -413,9 +401,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" - android:orientation="vertical" - android:visibility="gone" - tools:visibility="visible"> + android:orientation="vertical"> Date: Wed, 29 Aug 2018 08:08:19 +0300 Subject: [PATCH 016/131] Hide related streams while loading --- .../newpipe/fragments/detail/VideoDetailFragment.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 8f46ec7c6..77583f2e5 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -1122,9 +1122,15 @@ public class VideoDetailFragment animateView(videoTitleTextView, true, 0); videoDescriptionRootLayout.setVisibility(View.GONE); - if (videoTitleToggleArrow != null) { + if (videoTitleToggleArrow != null) { //phone videoTitleToggleArrow.setImageResource(R.drawable.arrow_down); videoTitleToggleArrow.setVisibility(View.GONE); + } else { //tablet + final View related = (View) relatedStreamRootLayout.getParent(); + //don`t need to hide it if related streams are disabled + if (related.getVisibility() == View.VISIBLE) { + related.setVisibility(View.INVISIBLE); + } } videoTitleRoot.setClickable(false); From fb25f6c7ac9ff8e24241e79e94f7ac046f836ad0 Mon Sep 17 00:00:00 2001 From: Vasily Date: Wed, 29 Aug 2018 08:19:15 +0300 Subject: [PATCH 017/131] Automatic list layout --- .../fragments/list/BaseListFragment.java | 19 ++++++++++++++----- app/src/main/res/values-ru/strings.xml | 1 + app/src/main/res/values/settings_keys.xml | 4 +++- app/src/main/res/values/strings.xml | 1 + 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java index bfa16fb08..21abf40ad 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java @@ -4,6 +4,7 @@ import android.app.Activity; import android.content.Context; import android.content.DialogInterface; import android.content.SharedPreferences; +import android.content.res.Configuration; import android.content.res.Resources; import android.os.Bundle; import android.preference.PreferenceManager; @@ -84,8 +85,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem if (updateFlags != 0) { if ((updateFlags & LIST_MODE_UPDATE_FLAG) != 0) { - final String list_key = getString(R.string.list_view_mode_value); - final boolean useGrid = !list_key.equals(PreferenceManager.getDefaultSharedPreferences(activity).getString(getString(R.string.list_view_mode_key), list_key)); + final boolean useGrid = isGridLayout(); itemsList.setLayoutManager(useGrid ? getGridLayoutManager() : getListLayoutManager()); infoListAdapter.setGridItemVariants(useGrid); infoListAdapter.notifyDataSetChanged(); @@ -160,9 +160,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem protected void initViews(View rootView, Bundle savedInstanceState) { super.initViews(rootView, savedInstanceState); - final String list_key = getString(R.string.list_view_mode_value); - final boolean useGrid = !list_key.equals(PreferenceManager.getDefaultSharedPreferences(activity).getString(getString(R.string.list_view_mode_key), list_key)); - + final boolean useGrid = isGridLayout(); itemsList = rootView.findViewById(R.id.items_list); itemsList.setLayoutManager(useGrid ? getGridLayoutManager() : getListLayoutManager()); @@ -363,4 +361,15 @@ public abstract class BaseListFragment extends BaseStateFragment implem updateFlags |= LIST_MODE_UPDATE_FLAG; } } + + protected boolean isGridLayout() { + final String list_mode = PreferenceManager.getDefaultSharedPreferences(activity).getString(getString(R.string.list_view_mode_key), getString(R.string.list_view_mode_value)); + if ("auto".equals(list_mode)) { + final Configuration configuration = getResources().getConfiguration(); + return configuration.orientation == Configuration.ORIENTATION_LANDSCAPE + && configuration.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE); + } else { + return "grid".equals(list_mode); + } + } } diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index e2198f240..a053cafb3 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -501,5 +501,6 @@ Вид списка Список Сетка + Автоматически diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 941f033d8..0c71944c3 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -892,13 +892,15 @@ list_view_mode - list + auto + auto list grid + @string/auto @string/list @string/grid diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f3976c6a4..b63de7dbd 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -517,5 +517,6 @@ List view mode List Grid + Auto From ee4942dfd70a980192c8b4e604c94a412553b2a8 Mon Sep 17 00:00:00 2001 From: Vasily Date: Fri, 31 Aug 2018 14:34:32 +0300 Subject: [PATCH 018/131] Grid layout for local lists --- .../newpipe/local/BaseLocalListFragment.java | 70 +++++++++++++++- .../newpipe/local/LocalItemListAdapter.java | 42 ++++++++-- .../holder/LocalPlaylistGridItemHolder.java | 13 +++ .../local/holder/LocalPlaylistItemHolder.java | 4 + .../LocalPlaylistStreamGridItemHolder.java | 13 +++ .../LocalStatisticStreamGridItemHolder.java | 13 +++ .../LocalStatisticStreamItemHolder.java | 14 +++- .../holder/RemotePlaylistGridItemHolder.java | 13 +++ .../holder/RemotePlaylistItemHolder.java | 4 + .../layout/list_stream_playlist_grid_item.xml | 84 +++++++++++++++++++ 10 files changed, 257 insertions(+), 13 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistGridItemHolder.java create mode 100644 app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistStreamGridItemHolder.java create mode 100644 app/src/main/java/org/schabi/newpipe/local/holder/LocalStatisticStreamGridItemHolder.java create mode 100644 app/src/main/java/org/schabi/newpipe/local/holder/RemotePlaylistGridItemHolder.java create mode 100644 app/src/main/res/layout/list_stream_playlist_grid_item.xml diff --git a/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java b/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java index 5192aa2ab..abdf82353 100644 --- a/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java @@ -1,8 +1,13 @@ package org.schabi.newpipe.local; +import android.content.SharedPreferences; +import android.content.res.Configuration; +import android.content.res.Resources; import android.os.Bundle; +import android.preference.PreferenceManager; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBar; +import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; @@ -25,7 +30,7 @@ import static org.schabi.newpipe.util.AnimationUtils.animateView; * called and is memory efficient when in backstack. * */ public abstract class BaseLocalListFragment extends BaseStateFragment - implements ListViewContract { + implements ListViewContract, SharedPreferences.OnSharedPreferenceChangeListener { /*////////////////////////////////////////////////////////////////////////// // Views @@ -36,6 +41,9 @@ public abstract class BaseLocalListFragment extends BaseStateFragment protected LocalItemListAdapter itemListAdapter; protected RecyclerView itemsList; + private int updateFlags = 0; + + private static final int LIST_MODE_UPDATE_FLAG = 0x32; /*////////////////////////////////////////////////////////////////////////// // Lifecycle - Creation @@ -45,6 +53,29 @@ public abstract class BaseLocalListFragment extends BaseStateFragment public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true); + PreferenceManager.getDefaultSharedPreferences(activity) + .registerOnSharedPreferenceChangeListener(this); + } + + @Override + public void onDestroy() { + super.onDestroy(); + PreferenceManager.getDefaultSharedPreferences(activity) + .unregisterOnSharedPreferenceChangeListener(this); + } + + @Override + public void onResume() { + super.onResume(); + if (updateFlags != 0) { + if ((updateFlags & LIST_MODE_UPDATE_FLAG) != 0) { + final boolean useGrid = isGridLayout(); + itemsList.setLayoutManager(useGrid ? getGridLayoutManager() : getListLayoutManager()); + itemListAdapter.setGridItemVariants(useGrid); + itemListAdapter.notifyDataSetChanged(); + } + updateFlags = 0; + } } /*////////////////////////////////////////////////////////////////////////// @@ -59,6 +90,16 @@ public abstract class BaseLocalListFragment extends BaseStateFragment return activity.getLayoutInflater().inflate(R.layout.pignate_footer, itemsList, false); } + protected RecyclerView.LayoutManager getGridLayoutManager() { + final Resources resources = activity.getResources(); + int width = resources.getDimensionPixelSize(R.dimen.video_item_grid_thumbnail_image_width); + width += (24 * resources.getDisplayMetrics().density); + final int spanCount = (int) Math.floor(resources.getDisplayMetrics().widthPixels / (double)width); + final GridLayoutManager lm = new GridLayoutManager(activity, spanCount); + lm.setSpanSizeLookup(itemListAdapter.getSpanSizeLookup(spanCount)); + return lm; + } + protected RecyclerView.LayoutManager getListLayoutManager() { return new LinearLayoutManager(activity); } @@ -67,10 +108,13 @@ public abstract class BaseLocalListFragment extends BaseStateFragment protected void initViews(View rootView, Bundle savedInstanceState) { super.initViews(rootView, savedInstanceState); - itemsList = rootView.findViewById(R.id.items_list); - itemsList.setLayoutManager(getListLayoutManager()); - itemListAdapter = new LocalItemListAdapter(activity); + + final boolean useGrid = isGridLayout(); + itemsList = rootView.findViewById(R.id.items_list); + itemsList.setLayoutManager(useGrid ? getGridLayoutManager() : getListLayoutManager()); + + itemListAdapter.setGridItemVariants(useGrid); itemListAdapter.setHeader(headerRootView = getListHeader()); itemListAdapter.setFooter(footerRootView = getListFooter()); @@ -174,4 +218,22 @@ public abstract class BaseLocalListFragment extends BaseStateFragment resetFragment(); return super.onError(exception); } + + @Override + public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { + if (key.equals(getString(R.string.list_view_mode_key))) { + updateFlags |= LIST_MODE_UPDATE_FLAG; + } + } + + protected boolean isGridLayout() { + final String list_mode = PreferenceManager.getDefaultSharedPreferences(activity).getString(getString(R.string.list_view_mode_key), getString(R.string.list_view_mode_value)); + if ("auto".equals(list_mode)) { + final Configuration configuration = getResources().getConfiguration(); + return configuration.orientation == Configuration.ORIENTATION_LANDSCAPE + && configuration.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE); + } else { + return "grid".equals(list_mode); + } + } } 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 99937b58c..e298dedd3 100644 --- a/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java @@ -1,18 +1,21 @@ package org.schabi.newpipe.local; import android.app.Activity; +import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.view.ViewGroup; import org.schabi.newpipe.database.LocalItem; -import org.schabi.newpipe.local.HeaderFooterHolder; -import org.schabi.newpipe.local.LocalItemBuilder; import org.schabi.newpipe.local.holder.LocalItemHolder; +import org.schabi.newpipe.local.holder.LocalPlaylistGridItemHolder; import org.schabi.newpipe.local.holder.LocalPlaylistItemHolder; +import org.schabi.newpipe.local.holder.LocalPlaylistStreamGridItemHolder; import org.schabi.newpipe.local.holder.LocalPlaylistStreamItemHolder; +import org.schabi.newpipe.local.holder.LocalStatisticStreamGridItemHolder; import org.schabi.newpipe.local.holder.LocalStatisticStreamItemHolder; +import org.schabi.newpipe.local.holder.RemotePlaylistGridItemHolder; import org.schabi.newpipe.local.holder.RemotePlaylistItemHolder; import org.schabi.newpipe.util.FallbackViewHolder; import org.schabi.newpipe.util.Localization; @@ -52,14 +55,19 @@ public class LocalItemListAdapter extends RecyclerView.Adapter localItems; private final DateFormat dateFormat; private boolean showFooter = false; + private boolean useGridVariant = false; private View header = null; private View footer = null; @@ -134,6 +142,10 @@ public class LocalItemListAdapter extends RecyclerView.Adapter + + + + + + + + + + + + + \ No newline at end of file From b1a5547de2357046e5d605cfd52af11b63b4b81b Mon Sep 17 00:00:00 2001 From: u1 Date: Fri, 31 Aug 2018 16:34:35 +0300 Subject: [PATCH 019/131] Fix reordering playlist items on grid layout --- .../newpipe/local/playlist/LocalPlaylistFragment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 35a1530c9..f400061e1 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -459,7 +459,11 @@ public class LocalPlaylistFragment extends BaseLocalListFragment Date: Fri, 31 Aug 2018 16:49:25 +0300 Subject: [PATCH 020/131] Grid layout for subscriptions --- .../subscription/SubscriptionFragment.java | 59 ++++++++++++++++++- .../main/res/layout/fragment_subscription.xml | 1 - 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index d8a26f0eb..584acfaf8 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -5,11 +5,15 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.SharedPreferences; +import android.content.res.Configuration; +import android.content.res.Resources; import android.graphics.Color; import android.graphics.PorterDuff; import android.os.Bundle; import android.os.Environment; import android.os.Parcelable; +import android.preference.PreferenceManager; import android.support.annotation.DrawableRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -17,6 +21,7 @@ import android.support.v4.app.FragmentManager; import android.support.v4.content.LocalBroadcastManager; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; @@ -72,7 +77,7 @@ import static org.schabi.newpipe.local.subscription.services.SubscriptionsImport import static org.schabi.newpipe.util.AnimationUtils.animateRotation; import static org.schabi.newpipe.util.AnimationUtils.animateView; -public class SubscriptionFragment extends BaseStateFragment> { +public class SubscriptionFragment extends BaseStateFragment> implements SharedPreferences.OnSharedPreferenceChangeListener { private static final int REQUEST_EXPORT_CODE = 666; private static final int REQUEST_IMPORT_CODE = 667; @@ -80,6 +85,9 @@ public class SubscriptionFragment extends BaseStateFragment From 5931cd6af7439ed71c1978425df0001b35328d6a Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Fri, 31 Aug 2018 19:30:40 +0530 Subject: [PATCH 021/131] Separate options for volume and brightness gestures --- .../schabi/newpipe/player/MainVideoPlayer.java | 13 +++++++++---- .../newpipe/player/helper/PlayerHelper.java | 16 ++++++++++++---- app/src/main/res/values/settings_keys.xml | 5 +++-- app/src/main/res/values/strings.xml | 6 ++++-- app/src/main/res/xml/video_audio_settings.xml | 12 +++++++++--- 5 files changed, 37 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index 41e7c305d..414c55e81 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -978,7 +978,8 @@ public final class MainVideoPlayer extends AppCompatActivity return super.onDown(e); } - private final boolean isPlayerGestureEnabled = PlayerHelper.isPlayerGestureEnabled(getApplicationContext()); + private final boolean isVolumeGestureEnabled = PlayerHelper.isVolumeGestureEnabled(getApplicationContext()); + private final boolean isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(getApplicationContext()); private final int maxVolume = playerImpl.getAudioReactor().getMaxVolume(); @@ -986,7 +987,7 @@ public final class MainVideoPlayer extends AppCompatActivity @Override public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { - if (!isPlayerGestureEnabled) return false; + if (!isVolumeGestureEnabled && !isBrightnessGestureEnabled) return false; //noinspection PointlessBooleanExpression if (DEBUG && false) Log.d(TAG, "MainVideoPlayer.onScroll = " + @@ -1002,7 +1003,11 @@ public final class MainVideoPlayer extends AppCompatActivity isMoving = true; - if (e1.getX() > playerImpl.getRootView().getWidth() / 2) { + boolean acceptAnyArea = isVolumeGestureEnabled != isBrightnessGestureEnabled; + boolean acceptVolumeArea = acceptAnyArea || e1.getX() > playerImpl.getRootView().getWidth() / 2; + boolean acceptBrightnessArea = acceptAnyArea || !acceptVolumeArea; + + if (isVolumeGestureEnabled && acceptVolumeArea) { playerImpl.getVolumeProgressBar().incrementProgressBy((int) distanceY); float currentProgressPercent = (float) playerImpl.getVolumeProgressBar().getProgress() / playerImpl.getMaxGestureLength(); @@ -1027,7 +1032,7 @@ public final class MainVideoPlayer extends AppCompatActivity if (playerImpl.getBrightnessRelativeLayout().getVisibility() == View.VISIBLE) { playerImpl.getBrightnessRelativeLayout().setVisibility(View.GONE); } - } else { + } else if (isBrightnessGestureEnabled && acceptBrightnessArea) { playerImpl.getBrightnessProgressBar().incrementProgressBy((int) distanceY); float currentProgressPercent = (float) playerImpl.getBrightnessProgressBar().getProgress() / playerImpl.getMaxGestureLength(); diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java index ae187a834..52e268b24 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java @@ -169,8 +169,12 @@ public class PlayerHelper { return isResumeAfterAudioFocusGain(context, false); } - public static boolean isPlayerGestureEnabled(@NonNull final Context context) { - return isPlayerGestureEnabled(context, true); + public static boolean isVolumeGestureEnabled(@NonNull final Context context) { + return isVolumeGestureEnabled(context, true); + } + + public static boolean isBrightnessGestureEnabled(@NonNull final Context context) { + return isBrightnessGestureEnabled(context, true); } public static boolean isUsingOldPlayer(@NonNull final Context context) { @@ -306,8 +310,12 @@ public class PlayerHelper { return getPreferences(context).getBoolean(context.getString(R.string.resume_on_audio_focus_gain_key), b); } - private static boolean isPlayerGestureEnabled(@NonNull final Context context, final boolean b) { - return getPreferences(context).getBoolean(context.getString(R.string.player_gesture_controls_key), b); + private static boolean isVolumeGestureEnabled(@NonNull final Context context, final boolean b) { + return getPreferences(context).getBoolean(context.getString(R.string.volume_gesture_control_key), b); + } + + private static boolean isBrightnessGestureEnabled(@NonNull final Context context, final boolean b) { + return getPreferences(context).getBoolean(context.getString(R.string.brightness_gesture_control_key), b); } private static boolean isUsingOldPlayer(@NonNull final Context context, final boolean b) { diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 02f065285..1a8158297 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -17,7 +17,8 @@ autoplay_through_intent use_oldplayer - player_gesture_controls + volume_gesture_control + brightness_gesture_control resume_on_audio_focus_gain popup_remember_size_pos_key use_inexact_seek_key @@ -892,4 +893,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index eaeeb2685..ddb889a64 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -82,8 +82,10 @@ Metadata cache wiped Auto-queue next stream Auto-append a related stream when playing the last stream in a non-repeating queue. - Player gesture controls - Use gestures to control the brightness and volume of the player + Volume gesture control + Use gestures to control the volume of the player + Brightness gesture control + Use gestures to control the brightness of the player Search suggestions Show suggestions when searching Search history diff --git a/app/src/main/res/xml/video_audio_settings.xml b/app/src/main/res/xml/video_audio_settings.xml index a547ffaf2..5ac5bb733 100644 --- a/app/src/main/res/xml/video_audio_settings.xml +++ b/app/src/main/res/xml/video_audio_settings.xml @@ -106,9 +106,15 @@ + android:key="@string/volume_gesture_control_key" + android:summary="@string/volume_gesture_control_summary" + android:title="@string/volume_gesture_control_title"/> + + Date: Fri, 31 Aug 2018 17:08:13 +0300 Subject: [PATCH 022/131] Scroll top related streams when loading --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 65a423084..7e0a013ca 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -1262,6 +1262,11 @@ public class VideoDetailFragment // Only auto play in the first open autoPlayEnabled = false; } + + final ViewParent related = relatedStreamRootLayout.getParent(); + if (related instanceof ScrollView) { + ((ScrollView) related).scrollTo(0, 0); + } } From d4c1b8d32139ca33fdefe4ad1ca0e155ca8c1a01 Mon Sep 17 00:00:00 2001 From: Vasily Date: Fri, 31 Aug 2018 17:12:56 +0300 Subject: [PATCH 023/131] Fix: remove title from PlaylistDialog --- .../newpipe/local/dialog/PlaylistDialog.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java index 4b8e391c7..15ba5d184 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java @@ -1,9 +1,11 @@ package org.schabi.newpipe.local.dialog; +import android.app.Dialog; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.DialogFragment; +import android.view.Window; import org.schabi.newpipe.database.stream.model.StreamEntity; import org.schabi.newpipe.util.StateSaver; @@ -41,6 +43,18 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave StateSaver.onDestroy(savedState); } + @NonNull + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + final Dialog dialog = super.onCreateDialog(savedInstanceState); + //remove title + final Window window = dialog.getWindow(); + if (window != null) { + window.requestFeature(Window.FEATURE_NO_TITLE); + } + return dialog; + } + /*////////////////////////////////////////////////////////////////////////// // State Saving //////////////////////////////////////////////////////////////////////////*/ From b24baa68ba36f8d54fe111e1efe7f3881c023e39 Mon Sep 17 00:00:00 2001 From: Vasily Date: Fri, 31 Aug 2018 17:30:06 +0300 Subject: [PATCH 024/131] Tablet UI in player --- .../activity_main_player.xml | 581 ++++++++++++++++++ 1 file changed, 581 insertions(+) create mode 100644 app/src/main/res/layout-large-land/activity_main_player.xml diff --git a/app/src/main/res/layout-large-land/activity_main_player.xml b/app/src/main/res/layout-large-land/activity_main_player.xml new file mode 100644 index 000000000..7d7e1230e --- /dev/null +++ b/app/src/main/res/layout-large-land/activity_main_player.xml @@ -0,0 +1,581 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 0cd153ab61ab546d67a92f486d0c57db1fb5fa0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Mon, 3 Sep 2018 13:07:10 +0200 Subject: [PATCH 025/131] Spelling: Language rework --- app/src/main/res/values/strings.xml | 130 ++++++++++++++-------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index eaeeb2685..9edc14198 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,7 +5,7 @@ %1$s views Published on %1$s No stream player found. Do you want to install VLC? - No stream player found (you can install VLC to play it) + No stream player found (you can install VLC to play it). Install Cancel https://f-droid.org/repository/browse/?fdfilter=vlc&fdid=org.videolan.vlc @@ -13,23 +13,23 @@ Open in popup mode Share Download - Download stream file. + Download stream file Search Settings - Did you mean: %1$s ? + Did you mean: %1$s? Share with Choose browser rotation Use external video player - Some resolutions will NOT have audio when this option is enabled + Removes audio at SOME resolutions Use external audio player NewPipe popup mode RSS Subscribe Subscribed Channel unsubscribed - Unable to change subscription - Unable to update subscription + Could not change subscription + Could not update subscription Show info Main @@ -48,8 +48,8 @@ Path to store downloaded videos in Enter download path for videos - Audio download path - Path to store downloaded audio in + Audio download folder + Downloaded audio is stored here Enter download path for audio files Autoplay @@ -75,7 +75,7 @@ Use fast inexact seek Inexact seek allows the player to seek to positions faster with reduced precision Load thumbnails - Disable to stop all thumbnails from loading and save on data and memory usage. Changing this will clear both in-memory and on-disk image cache. + When off no thumbnails load, saving data and memory usage. Changes clear both in-memory and on-disk image cache. Image cache wiped Wipe cached metadata Remove all cached webpage data @@ -93,18 +93,18 @@ Resume on focus gain Continue playing after interruptions (e.g. phone calls) Download - Next video - Show \'next\' and \'similar\' videos - Show \"hold to append\" tip + Next + Show \'Next\' and \'Similar\' videos + Show \"Hold to append\" tip Show tip when background or popup button is pressed on video details page - URL not supported + Unsupported URL Default content country Service Default content language Player Behavior - Video & Audio - History & Cache + Video & audio + History & cache Popup Appearance Other @@ -116,8 +116,8 @@ https://www.c3s.cc/ Play Content - Show age restricted content - Age Restricted Video. Allowing such material is possible from Settings. + Age restricted content + Show age Restricted Video. Allowing such material is possible from \"Settings\". live LIVE Downloads @@ -147,7 +147,7 @@ newpipe NewPipe Notification - Notifications for NewPipe Background and Popup Players + Notifications for NewPipe background and popup players [Unknown] @@ -158,29 +158,29 @@ Import database Export database - Will override your current history and subscriptions - Export history, subscriptions and playlists. + Overrides your current history and subscriptions + Export history, subscriptions and playlists Clear watch history - Deletes the history of played streams. - Delete whole watch history. + Deletes the history of played streams + Delete entire watch history? Watch history deleted. Clear search history - Deletes history of search keywords. - Delete whole search history. + Deletes history of search keywords + Delete entire search history? Search history deleted. Error - External storage not available. - Download to external SD Card is not possible yet. Should the download place be reset? + External storage unavailable + Download to external SD card is not possible yet. Reset download folder location? Network error Could not load all thumbnails Could not decrypt video URL signature Could not parse website Could not parse website completely - Content not available + Content unavailable Blocked by GEMA Could not set up download menu - This is a LIVE STREAM, which is not yet supported. + Live streams are not supported yet Could not get any stream Could not load image App/UI crashed @@ -191,10 +191,10 @@ Invalid URL No video streams found No audio streams found - Invalid directory - Invalid file/content source - File doesn\'t exist or insufficient permission to read or write to it - File name cannot be empty + No such folder + No such file/content source + The file doesn\'t exist or permission to read or write to it is lacking + Filename cannot be empty An error occurred: %1$s No streams available to download @@ -223,7 +223,7 @@ User report No results @string/no_videos - Nothing Here But Crickets + Nothing here but crickets Drag to reorder Cannot create download directory \'%1$s\' @@ -279,7 +279,7 @@ Filename Threads Error - Server unsupported + Unsupported server File already exists Malformed URL or Internet not available NewPipe Downloading @@ -294,8 +294,8 @@ MD5 SHA-1 reCAPTCHA - reCAPTCHA Challenge - reCAPTCHA Challenge requested + reCAPTCHA challenge + reCAPTCHA challenge requested @@ -340,7 +340,7 @@ https://newpipe.schabi.org/legal/privacy/ Read privacy policy NewPipe\'s License - NewPipe is copyleft libre software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + NewPipe is copyleft libre software: You can use, study share and improve it at will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Read license @@ -348,7 +348,7 @@ History Searched Watched - History is disabled + History is turned off History The history is empty History cleared @@ -364,11 +364,11 @@ What tabs are shown on the main page Selection Your tabs - Blank Page - Kiosk Page - Subscription Page - Feed Page - Channel Page + Nothing + Kiosk + Subscriptions + Feed + Channel @string/blank_page_summary @string/kiosk_page_summary @@ -377,10 +377,10 @@ @string/channel_page_summary Select a channel - No channel subscribed yet + No channel subscriptions yet Select a kiosk - Export complete - Import complete + Exported + Imported No valid ZIP file Warning: Could not import all files. This will override your current setup. @@ -394,17 +394,17 @@ %1$s/%2$s - Background Player - Popup Player + Background player + Popup player Remove Details Audio Settings - Hold To Enqueue - Enqueue on Background - Enqueue on Popup - Start Playing Here - Start Here on Background - Start Here on Popup + Hold To enqueue + Enqueue when backgrounded + Enqueue on new popup + Start playing here + Start here when backgrounded + Start here on new popup Open Drawer @@ -428,9 +428,9 @@ "Loading requested content" - Create New Playlist - Delete Playlist - Rename Playlist + New Playlist + Delete + Rename Name Add To Playlist Set as Playlist Thumbnail @@ -438,11 +438,11 @@ Bookmark Playlist Remove Bookmark - Do you want to delete this playlist? + Delete this playlist? Playlist created - Added to playlist - Playlist thumbnail changed - Could not delete playlist + Playlisted + Playlist thumbnail changed. + Could not delete playlist. No Captions @@ -461,11 +461,11 @@ Enable LeakCanary Memory leak monitoring may cause the app to become unresponsive when heap dumping - Report Out-of-lifecycle Errors + Report out-of-lifecycle errors Force reporting of undeliverable Rx exceptions outside of fragment or activity lifecycle after disposal - Import/Export + Import/export Import Import from Export to @@ -516,8 +516,8 @@ - Minimize on application switch - Action when switching to other application from main video player — %s + Minimize on app switch + Action when switching to other app from main video player — %s None Minimize to background player Minimize to popup player From 995d79e373aabc9f2f84d823b4914d271efb42ae Mon Sep 17 00:00:00 2001 From: postsorino Date: Sun, 2 Sep 2018 16:27:54 +0000 Subject: [PATCH 026/131] Translated using Weblate (Greek) Currently translated at 98.1% (376 of 383 strings) --- app/src/main/res/values-el/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 975ad4025..8851570dc 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -217,7 +217,7 @@ Μη έγκυρο URL Δε βρέθηκαν ροές βίντεο Δε βρέθηκαν ροές ήχου - Μη έγκυρη τοποθεσία + Μη έγκυρη διεύθυνση Μη έγκυρο αρχείο ή πηγή περιεχομένου Το αρχείο δεν υπάρχει ή δεν έχουμε επαρκή εξουσιοδότηση για να διαβάσουμε ή να γράψουμε σε αυτό Το όνομα αρχείου δεν μπορεί να είναι κενό @@ -301,7 +301,7 @@ Δεν ήταν δυνατή η φόρτωση της άδειας Περί Συνεισφέροντες - Ελέυθερη και ελαφριά εφαρμογή αναπαραγωγής ροών στο Android. + Ανοιχτού κώδικα, ελαφριά εφαρμογή του Android, για την αναπαραγωγή πολυμεσων από το ίντερνετ. Συνεισφέρετε Αν έχετε ιδέες για μετάφραση, αλλαγή σχεδιασμού, εκκαθάριση ή ριζικές αλλαγές κώδικα της εφαρμογής—η βοήθεια σας είναι πάντα ευπρόσδεκτη. Όσο περισσότερη έχουμε, τόσο καλύτεροι γινόμαστε! Δείτε το στο GitHub From 99ebf03876b53fc72cf2b49c61f16c8699fa56c7 Mon Sep 17 00:00:00 2001 From: notramo Date: Sun, 2 Sep 2018 17:03:40 +0000 Subject: [PATCH 027/131] Translated using Weblate (Hungarian) Currently translated at 40.7% (156 of 383 strings) --- app/src/main/res/values-hu/strings.xml | 28 ++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 965b19031..c102beb17 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -2,7 +2,7 @@ %1$s megtekintés Közzétéve: %1$s - Nem található megfelelő lejátszó. Feltelepíti a VLC lejátszót? + Nem található megfelelő lejátszó. Telepíted a VLC lejátszót? Telepítés Mégse Megnyitás böngészőben @@ -15,24 +15,24 @@ Válasszon böngészőt forgatás Videófájlok letöltési helye - Útvonal a letöltött videók tárolásához. + Útvonal a letöltött videók tárolásához Adja meg a videófájlok letöltési helyét Alapértelmezett felbontás Lejátszás Kodi-val - A Kore alkalmazás nem található. Feltelepíti a Kore lejátszót? + A Kore alkalmazás nem található. Telepíted a Kore lejátszót? \"Lejátszás Kodi-val\" opció mutatása - Mutat egy opciót a videók Kodi médiaközponttal való lejátszására. + Opció mutatása a videók Kodi médiaközponttal való lejátszására Hang Alapértelmezett hang formátum WebM — szabad formátum - m4a — jobb minőség + M4A — jobb minőség Letöltés Következő videó A webcím nem támogatott Külső videólejátszó használata Külső hanglejátszó használata - Adja meg a hangfájlok letöltési helyét. + Add meg a hangfájlok letöltési helyét Tor használata (Kísérleti) Adatforgalom Tor-on keresztüli kényszerítése a biztonság fokozása érdekében (a videó stream-elés még nem támogatott). @@ -65,8 +65,8 @@ A tartalom nem elérhető. GEMA által blokkolt. Ez egy élö közvetités. Még nem támogatva. - Automatikus lejátszás külső indítás esetén - Videók automatikus lejátszása a NewPipe külső indításakor. + Automatikus lejátszás + Videók automatikus lejátszása, ha a NewPipe egy másik alkalmazásból lett indítva A video korhatáros. A megtekintéséhez engedélyezze a korhatáros videókat. élő @@ -194,4 +194,16 @@ Mi:\\nKérés:\\nTartalom nyelve:\\nSzolgáltatás:\\nGMT Idő:\\nCsomag:\\nVerzió:\\nOperációs Rendszer verzió: Nincs találat Régi lejátszó használata + Adatfolyam fájl letöltése. + Hozzáadás + + Gyorsabb, de pontatlan tekerés használata + A pontatlan tekerés lehetővé teszi, hogy gyorsabban ugorjon a pozíciókra, de kevesebb pontossággal + Bélyegképek betöltése + Kapcsold ki, hogy a bélyegképek ne legyenek betöltve és mentve, így csökkentve az adat és memória használatot. Ennek az értéknek a megváltoztatása törli a memóriában és a meghajtón lévő bélyegkép gyorsítótárat + A bélyegkép gyorsítótár törölve + Gyorsítótárazott metaadat törlése + Minden gyorsítótárazott weboldal adat törlése + A metaadat gyorsítótár törölve lett + Következő videó automatikus lejátszása From 2257f3484d0d348edf3fffc27ee2669d31631b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fda=C5=9F=20Tatar?= Date: Tue, 4 Sep 2018 06:14:22 +0000 Subject: [PATCH 028/131] Translated using Weblate (Turkish) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-tr/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index df5f25999..7605e3e3c 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -338,7 +338,7 @@ Yer imleri - Şuna Ekle + Listeye Ekle Yeniden sıralamak için sürükle @@ -382,7 +382,7 @@ Normal yazı tipi Daha büyük yazı tipi Hata Ayıklama - Yakında burada bir şeyler görünecek ;D + Yakında burada bir şeyler görünecek :) Kendiliğinden Üretilmiş From e350f43adc65aedf0ac3e7e946d9a2795ae8d680 Mon Sep 17 00:00:00 2001 From: kaka Thic Date: Wed, 5 Sep 2018 03:32:12 +0000 Subject: [PATCH 029/131] Translated using Weblate (Vietnamese) Currently translated at 95.8% (367 of 383 strings) --- app/src/main/res/values-vi/strings.xml | 312 +++++++++++++++++++++++-- 1 file changed, 292 insertions(+), 20 deletions(-) diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 1c3fe27a6..f7b7538c2 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -28,20 +28,20 @@ Đường dẫn để lưu trữ âm thanh đã tải xuống Nhập đường dẫn tải xuống cho tệp âm thanh - Tự động phát khi được gọi từ một ứng dụng khác - Tự động phát một video khi NewPipe được gọi từ một ứng dụng khác + Tự động phát + Phát video khi NewPipe được gọi từ một ứng dụng khác Độ phân giải mặc định Độ phân giải popup mặc định Hiển thị độ phân giải cao hơn Chỉ một số thiết bị hỗ trợ chơi các video 2K / 4K Phát với Kodi - Ứng dụng Kore không tìm thấy. Cài đặt Kore? + Không tìm thấy ứng dụng Kore. Cài đặt nó? Hiển thị tùy chọn \"Phát với Kodi\" Hiển thị tùy chọn để phát video qua trung tâm media Kodi Âm thanh Định dạng âm thanh mặc định Định dạng video ưa thích - WebM — Định dạng miễn phí + WebM - định dạng thấp M4a — chất lượng tốt hơn Nền Chủ đề @@ -49,7 +49,7 @@ Tối Đen Nhớ kích thước và vị trí bật lên - Nhớ kích thước và vị trí cuối cùng được đặt vào cửa sổ bật lên + Nhớ kích thước và vị trí bật lên cuối cùng Điều khiển cử chỉ trình phát Sử dụng cử chỉ để kiểm soát độ sáng và âm lượng của trình phát Đề xuất tìm kiếm @@ -58,7 +58,7 @@ Tải về Video tiếp theo - Hiển thị các video tiếp theo và tương tự + Hiển thị video \'tiếp theo\' và \'tương tự\' URL không được hỗ trợ Hiển thị Khác @@ -67,7 +67,7 @@ Phát Nội dung Hiển thị nội dung bị hạn chế độ tuổi - Video bị giới hạn về tuổi. Bật chế độ cho phép hiển thị video bị hạn chế về độ tuổi ở trong cài đặt trước. + Video giới hạn độ tuổi người xem. Cho phép các tài liệu đó có thể từ Cài đặt. Trực tiếp Tải xuống Tải xuống @@ -86,20 +86,20 @@ Lỗi Lỗi kết nối mạng Không thể tải tất cả các thumbnails - Không thể giải mã chữ ký URL của video. - Không thể phân tích trang web. - Không thể phân tích trang web hoàn toàn. - Nội dung không có sẵn. + Không thể giải mã chữ ký URL video + Không thể phân tích cú pháp trang web + Không thể phân tích cú pháp hoàn toàn trang web + Nội dung không khả dụng Chặn bởi GEMA. - Không thể thiết lập trình đơn tải xuống. - Đây là một video phát trực tiếp. Chúng chưa được hỗ trợ. + Không thể thiết lập menu tải xuống + Đây là STREAM LIVE, chưa được hỗ trợ. Không thể lấy bất kỳ luồng nào. Không thể tải hình ảnh Ứng dụng / Giao diện người dùng bị lỗi Xin lỗi, điều đó không nên xảy ra. Báo lỗi qua email Xin lỗi, một số lỗi đã xảy ra. - BÁo CÁO + BÁO CÁO Thông tin: Chuyện gì đã xảy ra: Gì: \\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version: @@ -134,7 +134,7 @@ Bắt đầu Dừng - Xem + Chơi Xóa checksum @@ -176,11 +176,11 @@ Đọc giấy phép Sự đóng góp Quay - Ngôn ngữ nội dung ưu tiên + Ngôn ngữ nội dung mặc định Video & Âm thanh - Bật lên - Lịch sử - Lịch sử + Cửa sổ + Lịch sử & bộ nhớ cache + Lịch sử & bộ nhớ cache Danh sách Không tìm thấy Theo dõi @@ -189,4 +189,276 @@ Không thể thay đổi tình trạng theo dõi Không thể cập nhật tình trạng theo dõi - + Không tìm thấy trình phát luồng nào (bạn có thể cài đặt VLC để phát) + Tải xuống tệp luồng. + Hiển thị thông tin + + main + Đăng ký + Dấu trang + + Có gì mới + + Thêm vào + + Sử dụng tìm kiếm không chính xác nhanh + Tìm kiếm không chính xác cho phép người chơi tìm kiếm vị trí nhanh hơn với độ chính xác giảm + Tải hình thu nhỏ + Vô hiệu hóa để ngăn chặn tất cả các hình thu nhỏ tải và lưu dữ liệu và sử dụng bộ nhớ. Thay đổi điều này sẽ xóa bộ nhớ cache hình ảnh trong bộ nhớ và trên đĩa + Đã xóa bộ nhớ cache hình ảnh + Xóa siêu dữ liệu đã lưu vào bộ nhớ cache + Xóa tất cả dữ liệu trang web được lưu trong bộ nhớ cache + Đã xóa bộ nhớ cache siêu dữ liệu + Tự động phát tiếp theo theo hàng + Tự động thêm một luồng có liên quan khi phát luồng cuối cùng trong hàng đợi không lặp lại + Lịch sử tìm kiếm + Lưu trữ truy vấn tìm kiếm cục bộ + Theo dõi các video đã xem + Tiếp tục lấy tiêu điểm + Tiếp tục phát sau khi bị gián đoạn (ví dụ: cuộc gọi điện thoại) + Hiển thị mẹo \"giữ để nối thêm\" + Hiển thị mẹo khi nhấn nút nền hoặc bật lên trên trang chi tiết video + Quốc gia nội dung mặc định + Dịch vụ + Phát + Hành vi + Gỡ lỗi + Đã xếp hàng đợi trên trình phát nền + Xếp hàng đợi trên trình phát bật lên + Kênh + Danh sách phát + Bản nhạc + Người dùng + Hủy bỏ + Chơi tất cả + Luôn luôn + Chỉ một lần + Tập tin + + Thông báo NewPipe + Thông báo cho nền mới và Trình phát Popup + + [Không xác định] + + Chuyển đổi hướng màn hình + Chuyển sang nền + Chuyển sang Popup + Chuyển sang Main + + Nhập cơ sở dữ liệu + Xuất cơ sở dữ liệu + Sẽ ghi đè lịch sử và đăng ký hiện tại của bạn + Xuất lịch sử, đăng ký và danh sách phát + Xóa lịch sử xem + Xóa lịch sử của các luồng đã phát + Xóa toàn bộ lịch sử xem. + Đã xóa lịch sử xem. + Xóa lịch sử tìm kiếm + Xóa lịch sử của từ khóa tìm kiếm + Xóa toàn bộ lịch sử tìm kiếm. + Đã xóa lịch sử tìm kiếm. + Không thể phát luồng này + Đã xảy ra lỗi trình phát không thể khôi phục + Phục hồi từ lỗi trình phát + Người chơi bên ngoài không hỗ trợ các loại liên kết này + URL không hợp lệ + Không tìm thấy luồng video nào + Không tìm thấy luồng âm thanh nào + Thư mục không hợp lệ + Nguồn tệp / nội dung không hợp lệ + Tệp không tồn tại hoặc không đủ quyền đọc hoặc ghi vào tệp + Tên tệp không được để trống + Đã xảy ra lỗi: %1$s + Không có luồng nào để tải xuống + + Không có gì ở đây Nhưng dế + Kéo để sắp xếp lại + + Không có người đăng ký + + %s người đăng kí + + + Không có lượt xem nào + + %s lượt xem + + + Không có video nào + + %s video + + + Tạo nên + Xóa một + Xóa hết + Bỏ qua + Đổi tên + + Đã xóa 1 mục. + + Tải về + Các ký tự được cho phép trong tên tệp + Ký tự không hợp lệ được thay thế bằng giá trị này + Ký tự thay thế + + Chữ cái và chữ số + Hầu hết các ký tự đặc biệt + + Không có ứng dụng nào được cài đặt để phát tệp này + + Đóng góp + NewPipe được phát triển bởi các tình nguyện viên dành thời gian mang lại cho bạn những trải nghiệm tốt nhất. Hãy trở lại để giúp các nhà phát triển làm cho NewPipe thậm chí còn tốt hơn trong khi thưởng thức một tách cà phê. + Trả lại + Trang mạng + Truy cập trang web NewPipe để biết thêm thông tin và tin tức. + Chính sách bảo mật của NewPipe + Dự án NewPipe rất coi trọng quyền riêng tư của bạn. Do đó, ứng dụng không thu thập bất kỳ dữ liệu nào mà không có sự đồng ý của bạn. +\nChính sách bảo mật của NewPipe giải thích chi tiết dữ liệu nào được gửi và lưu trữ khi bạn gửi báo cáo sự cố. + Đọc chính sách bảo mật + NewPipe là phần mềm miễn phí copyleft: Bạn có thể sử dụng, chia sẻ nghiên cứu và cải thiện nó theo ý muốn của bạn. Cụ thể bạn có thể phân phối lại và / hoặc sửa đổi nó theo các điều khoản của Giấy phép Công cộng GNU như được xuất bản bởi Quỹ Phần mềm Tự do, hoặc phiên bản 3 của Giấy phép, hoặc (tùy chọn của bạn) bất kỳ phiên bản nào sau này. + Lịch sử + Đã tìm kiếm + Đã xem + Lịch sử bị tắt + Lịch sử + Lịch sử trống + Đã xóa lịch sử + Đã xóa mục + Bạn có muốn xóa mục này khỏi lịch sử tìm kiếm không? + Bạn có muốn xóa mục này khỏi lịch sử xem không? + Bạn có chắc chắn muốn xóa tất cả các mục khỏi lịch sử không? + Lần chơi cuối + Hầu hết phát + + Nội dung trang chính + Trang trống + Trang chủ + Trang đăng ký + Trang nguồn cấp dữ liệu + Trang kênh + Chọn kênh + Chưa có kênh nào được đăng ký + Chọn Trang chủ + Xuất xong + Nhập hoàn tất + Không có tệp ZIP hợp lệ + Cảnh báo: Không thể nhập tất cả các tệp. + Thao tác này sẽ ghi đè cài đặt hiện tại của bạn. + Bạn cũng muốn nhập cài đặt? + + Trang chủ + Xu hướng + Mới & hot + Trình phát nền + Trình phát Popup + Tẩy xoá + Chi tiết + Cài đặt âm thanh + Giữ để Enqueue + Phát trên nền + Phát qua cửa sổ + Bắt đầu chơi ở đây + Bắt đầu ở đây trên nền + Bắt đầu ở đây trên Popup + + Mở ngăn kéo + Đóng ngăn + Một cái gì đó sẽ xuất hiện ở đây sớm ;D + + + Hành động \'mở\' được ưu tiên + Hành động mặc định khi mở nội dung — %s + + Trình phát video + Trình phát nền + Trình phát Popup + Luôn luôn hỏi + + Đang nhận thông tin… + Đang tải nội dung được yêu cầu + + Tạo danh sách mới + Xóa danh sách phát + Đổi tên danh sách phát + Tên + Thêm vào danh sách phát + Đặt làm Hình thu nhỏ của danh sách phát + + Đánh dấu trang danh sách phát + Xóa dấu trang + + Bạn có muốn xóa danh sách phát này không? + Đã tạo danh sách phát + Đã thêm vào danh sách phát + Đã thay đổi hình thu nhỏ của danh sách phát + Không thể xóa danh sách phát + + Không có phụ đề + + Phù hợp + Lấp đầy + Thu phóng + + Tự động tạo ra + + Phụ đề + Sửa đổi tỷ lệ văn bản chú thích của người chơi và kiểu nền. Yêu cầu khởi động lại ứng dụng để có hiệu lực + + Bật LeakCanary + Theo dõi rò rỉ bộ nhớ có thể khiến ứng dụng trở nên không phản hồi khi đổ xô đống + + Báo cáo lỗi ngoài vòng đời + Buộc báo cáo ngoại lệ Rx không thể gửi được bên ngoài vòng đời của mảnh hoặc hoạt động sau khi xử lý + + Nhập khẩu/xuất khẩu + Nhập + Nhập từ + Xuất sang + + Đang nhập… + Đang xuất … + + Nhập tệp + Xuất trước + + Không thể nhập đăng ký + Không thể xuất đăng ký + + Nhập đăng ký YouTube bằng cách tải xuống tệp xuất: +\n +\n1. Truy cập URL này: %1$s +\n2. Đăng nhập khi được hỏi +\n3. Quá trình tải xuống sẽ bắt đầu (đó là tệp xuất) + Nhập hồ sơ SoundCloud bằng cách nhập URL hoặc ID của bạn: +\n +\n1. Bật \"chế độ màn hình\" trong trình duyệt web (trang web không khả dụng cho thiết bị di động) +\n2. Truy cập URL này: %1$s +\n3. Đăng nhập khi được hỏi +\n4. Sao chép URL tiểu sử mà bạn đã được chuyển hướng đến. + Hãy nhớ rằng hoạt động này có thể là mạng đắt tiền. +\n +\nBạn có muốn tiếp tục? + + Điều khiển tốc độ phát lại + Speed + Chiều cao + Hủy liên kết (có thể gây méo) + Tua đi nhanh trong khi im lặng + Tiếp theo + Cài lại + + Để tuân thủ Quy định bảo vệ dữ liệu chung của châu Âu (GDPR), chúng tôi sẽ thu hút sự chú ý của bạn đến chính sách bảo mật của NewPipe. Vui lòng đọc kỹ. +\nBạn phải chấp nhận nó để gửi cho chúng tôi báo cáo lỗi. + Chấp nhận + Từ chối + + Không giới hạn + Giới hạn độ phân giải khi sử dụng dữ liệu di động + Giảm thiểu trên công tắc ứng dụng + Hành động khi chuyển sang ứng dụng khác từ trình phát video chính — %s + không ai + Thu nhỏ xuống trình phát nền + Thu nhỏ trình phát bật lên + + From 6d04e3915118000e7d78f630bcad2145c51c0e7b Mon Sep 17 00:00:00 2001 From: Stjepan Date: Fri, 7 Sep 2018 16:43:16 +0000 Subject: [PATCH 030/131] Translated using Weblate (Croatian) Currently translated at 65.7% (252 of 383 strings) --- app/src/main/res/values-hr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 3fd74e7df..bce1b6197 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -118,7 +118,7 @@ Nije moguće dobaviti stream Nije moguće učitati sliku Aplikacija/UI se srušio - Oprostitee, ovo se nije trebalo dogoditi. + Oprostite, ovo se nije trebalo dogoditi. Prijavi pogrešku putem e-maila Oprostite, neke greške su se dogodile. PRIJAVI From 4c6dd2cdf213a61d3d55b73176f5679eff097796 Mon Sep 17 00:00:00 2001 From: M Andreev Date: Sat, 8 Sep 2018 07:01:10 +0000 Subject: [PATCH 031/131] Translated using Weblate (Bulgarian) Currently translated at 99.4% (381 of 383 strings) --- app/src/main/res/values-bg/strings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index b0595a2fa..266c458e7 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -290,7 +290,7 @@ Изтрива историята на възпроизвежданите стриймове Не са намерени видео стриймове Не са намерени аудио стриймове - "Какво:\\nЗаявка:\\nЕзик на съдържанието:\\nУслуга:\\nВреме по GMT:\\nПакет:\\nВерсия:\\nОС версия: " + Какво:\\nЗаявка:\\nЕзик на съдържанието:\\nУслуга:\\nВреме по GMT:\\nПакет:\\nВерсия:\\nОС версия: Миниатюра на видео Потребителски доклад Пренареди чрез плъзгане @@ -463,4 +463,5 @@ Потребители Възстанови + Стъпка From 372932abaf55524074bea63734050cb67d3fda04 Mon Sep 17 00:00:00 2001 From: skil3z Date: Sat, 8 Sep 2018 16:44:24 +0000 Subject: [PATCH 032/131] Translated using Weblate (Finnish) Currently translated at 74.6% (286 of 383 strings) --- app/src/main/res/values-fi/strings.xml | 83 +++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index c755f8e73..46cd82f86 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -54,7 +54,7 @@ Ääni Oletusääniformaatti Oletusvideoformaatti - WebM — vapaa formaatti + WebM — vapaa tiedostomuoto M4A — parempi laatu Teema Kirkas @@ -68,18 +68,18 @@ Näytä ehdotuksia hakiessa Hakuhistoria Tallentaa hakutietokannan paikallisesti - Historia + Historia ja Välimuisti Pidä muistissa katsotut videot Jatka toistoa keskeytysten jälkeen (esim. puhelut) Lataus Seuraava video Näytä seuraavia ja samankaltaisia videoita - URL ei tueta + Osoitetta ei tueta Oletus-sisällon kieli Soitin Käyttäytyminen Video & Ääni - Historia + Historia ja välimuisti Ponnahdusikkuna Ulkoasu Muu @@ -257,7 +257,7 @@ Lisätty ikkunajonoon Toista kaikki - Toisto epäonnistui + Tämän toisto epäonnistui Palautuskelvoton soittimen virhe Palaudutaan soittimen virheestä @@ -267,7 +267,7 @@ Yksityiskohdat Ääniasetukset Pidä pohjassa lisätäksesi jonoon -Näytä vihje soittolistalle +"Näytä vihje soittolistalle lisäämiselle " [Tuntematon] Lisää taustatoistojonoon @@ -279,5 +279,74 @@ NewPipe kehitetään vapaaehtoisten toimesta, jotka käyttävät vapaa-aikaansa tuottaakseen parhaimman kokemuksen sinulle. Nyt on aika antaa takaisin, jotta kehittäjät voivat tehdä NewPipe:sta vielä paremman nauttiessaan kupin kahvia! Anna takaisin Websivu - Käy verkkosivuillamme saadaksesi lisää tietoa ja uusimmat uutiset NewPipe:sta. + Käy verkkosivuillamme saadaksesi lisää tietoa ja uusimmat uutiset NewPipe:stä. + Soitinta ei löytynyt (voit asentaa VLC:n toistaaksesi) + Lataa toistotiedosto. + Näytä lisätietoja + + Kirjanmerkit + + Lisää soittolistaan + + Käytä nopeampaa epätarkkaa pikakelausta + Epätarkka kelaus mahdollistaa videon kelauksen nopeammin, huonommalla tarkkuudella + Näytä videoiden pikkukuvat + Poista käytöstä lopettaaksesi kaikkien pikkukuvien lataus säästääksesi mobiilidataa ja muistinkäyttöä. Tämän asetuksen muuttaminen poistaa kaikki pikkukuvat välimuistista + Kuvavälimuisti tyhjennetty + Tyhjennä tallennettu metadata + Poista kaikki tallennettu nettisivujen tieto + Välimuistin tiedot poistettu + Automaattisesti lisää ehdotuksista video soittolistaan kun repeat on pois päältä + Sisällön oletusmaa + Palvelu + "Virheenkorjaus " + Kanavat + Soittolistat + Ääniraidat + Käyttäjät + Aina + Vain kerran + Tiedosto + + Muuta näytön suuntausta + Vaihda taustalle + Vaihda pop-up toistoon + Vaihda normaalitilaan + + Tuo tietokanta + Vie tietokanta + Kirjoittaa yli tämänhetkisen historian ja tilaukset + Vie historia, tilaukset tai soittolistat + Poista katseluhistoria + Poistaa toistettujen videoiden historian + Poista koko katseluhistoria. + Katseluhistoria onnistuneesti poistettu. + Poista hakuhistoria + Poistaa historian haetuista videoista + Poista koko hakuhistoria. + Hakuhistoria onnistuneesti poistettu. + Ulkoiset soittimet eivät tue tämänkaltaisia linkkejä + Viallinen osoite + Videostriimejä ei löytynyt + Audiostriimejä ei löytynyt + Virheellinen kansio + Virheellinen tiedosto/lähde + Tiedosta ei löydy tai sen kirjoittamiseen/lukemiseen ei ole lupaa + Tiedostonimi ei voi olla tyhjä + Hups! Tapahtui virhe: %1$s + Vedä järjestelläksesi + + Luo + Poista yksi + Poista kaikki + Hyväksy + Nimeä uudelleen + + 1 poistettu. + + Ohjelmaa tämän toistamiseen ei ole asennettu + + NewPipen tietosuojakäytäntö + NewPipen projekti ottaa yksityisyytesi tosissaan. Siksi se ei kerää sinulta mitään tietoja ilman lupaasi. NewPipen tietosuojakäytännössä selitetään tarkasti mitä tietoja lähetetään tai tallennetaan virheraportin yhteydessä. + Lue tietosuojakäytäntö From 31efa7a8f8f7bbe5f843df814939ec8a9fb46b29 Mon Sep 17 00:00:00 2001 From: ScratchBuild Date: Sat, 8 Sep 2018 16:31:49 +0000 Subject: [PATCH 033/131] Translated using Weblate (Japanese) Currently translated at 74.1% (284 of 383 strings) --- app/src/main/res/values-ja/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 3eff27ff9..19b270acb 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -393,4 +393,9 @@ 設定をインポートしますか? 字幕 + チャンネル + プレイリスト + ユーザー + NewPipe プライバシーポリシー + プライバシーポリシーを確認 From f56193ac1810cfadc54d0ac9ccbc7e98d0c53f8f Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Sat, 8 Sep 2018 23:13:04 +0530 Subject: [PATCH 034/131] We don't need to check this --- app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index 7ca790d92..de7960a0d 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -992,7 +992,6 @@ public final class MainVideoPlayer extends AppCompatActivity private final boolean isVolumeGestureEnabled = PlayerHelper.isVolumeGestureEnabled(getApplicationContext()); private final boolean isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(getApplicationContext()); - private final boolean isPlayerGestureEnabled = PlayerHelper.isPlayerGestureEnabled(getApplicationContext()); private final int maxVolume = playerImpl.getAudioReactor().getMaxVolume(); @Override From 3bf318e2b78e2787f25d5bd3255dd525d758a68b Mon Sep 17 00:00:00 2001 From: Rex_sa Date: Sun, 9 Sep 2018 04:05:37 +0000 Subject: [PATCH 035/131] Translated using Weblate (Arabic) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-ar/strings.xml | 52 +++++++++++++------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index aff9ff1af..81ccc6c81 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -29,10 +29,10 @@ خطأ في الشبكة الفيديو التالي لا يوجد مشغل فيديو. هل تريد تثبيت VLC ؟ - فتح في المتصفح + افتح في المتصفح الصوت تشغيل - تشغيل بواسطة Kodi + تشغيل بواسطة كودي التدوير بحث اللغة الإفتراضية للمحتوى @@ -43,8 +43,8 @@ مشاركة مشاركة بواسطة عرض الفديوهات \'التالية\'و\'المماثلة\' - عرض خيار لتشغيل الفيديو بواسطة Kodi Media Center - عرض خيار التشغيل بواسطة Kodi + عرض خيار لتشغيل الفيديو بواسطة مشغل كودي + عرض خيار التشغيل بواسطة كودي السمة تم النشر يوم %1$s الرابط غير مدعوم @@ -52,7 +52,7 @@ استخدام مشغل فيديو خارجي (إختبارية) إجراء التنزيلات من خلال استخدام بروكسي Tor لزيادة الخصوصية ( تشغيل الفيديو المباشر غير مدعوم حتى الأن ). استخدام تور - مشاهدات %1$s + "مشاهدة %1$s" تنسيق حر — WebM تم حجبه بواسطة GEMA المحتوى غير متاح @@ -68,30 +68,30 @@ ما الجديد - الخلفية + في الخلفية تشغيل تلقائي اسود التاريخ وذاكرة التخزين المؤقت - التاريخ و ذاكرة التخزين المؤقتة + التاريخ و التخزين المؤقت المحتوى التنزيلات التنزيلات الكل القناة - فيديو + الفيديو التنزيل عن التطبيق عن التطبيق التاريخ التاريخ - فتح في وضع النافذة المنبثقة + افتح في وضع النافذة المنبثقة "بعض الخيارات الدقة لن تحتوي على صوت عند تمكين هذا الخيار " وضع النوافذ المنبثقة NewPipe تم إلغاء الاشتراك في القناة تعذر تغيير حالة الاشتراك تعذر تحديث الاشتراك - نافذة + نافذة المنبثقة تشغيل مقطع الفيديو عند إستدعاء NewPipe من تطبيق آخر الدقة الافتراضية لنوافذ المنبثقة @@ -109,11 +109,11 @@ تتبع مقاطع الفيديو التي تمت مشاهدتها استئناف عند اكتساب التركيز متابعة التشغيل بعد المقاطعات (مثل المكالمات الهاتفية) - عرض\"عقد لإلحاق\"عنوان - عرض تلميح أو زر منبثق عند الضغط على خلفية على صفحة تفاصيل الفيديو + عرض تلميح \"اضغط للتجاهل\" + عرض تلميح على صفحة التفاصيل عند استخدام وضع مشغل الخلفية أو النافذة المنبثقة المشغل السلوك - المنبثق + الوضع المنبثق يتم التشغيل في الوضع المنبثق تم وضعه على قائمة الانتظار في مشغل الخلفية تم وضعه على قائمة الانتظار في مشغل النافذة المنبثقة @@ -181,7 +181,7 @@ مشترِكان %s مشترك %s مشترك - %s مشتركون + %s مشترك دون مشاهدات @@ -196,7 +196,7 @@ حسناً اسم الملف - الخيوط + التقسيم الخطأ الخادم غير معتمد الملف موجود مسبقا @@ -210,8 +210,8 @@ \nللفتح في وضع النافذة المنبثقة اختبار reCAPTCHA - الأحرف المسموح بها في أسماء الملفات - يتم استبدال الأحرف غير الصالحة بهذه القيمة + السماح بالرموز في أسماء الملفات + يتم استبدال الرموز غير المسموح بها بهذه القيمة استبدال الحرف الحروف والأرقام @@ -224,7 +224,7 @@ فتح الموقع المساهمون التراخيص - تطبيق حُر و خفيف لالتقاط البث على نظام الأندرويد. + تطبيق حُر و خفيف لتشغيل اليوتيوب على نظام الأندرويد. ساهم إذا كانت لديك أفكار؛ أو ترجمة، أو تغييرات تخص التصميم، أو تنظيف و تحسين الشفرة البرمجية ، أو تعديلات عميقة عليها، فتذكر أنّ مساعدتك دائما موضع ترحيب. وكلما أتممنا شيئا كلما كان ذلك أفضل ! عرض على GitHub @@ -260,7 +260,7 @@ حذف التفاصيل الإعدادات الصوتية - ابدء التشغيل هنا + تشغيل هنا تشغيل هنا في وضع النافذة المنبثقة تحدي ريكابتشا اضغط للإدراج في قائمة الانتظار @@ -268,9 +268,9 @@ لاتوجد مشاهدة %s مشاهدة مشاهدتين - %s مشاهدات كثيرة - %s عدد المشاهدات - %s أقصى مشاهدات + %s مشاهدة + %s مشاهدة + %s مشاهدة @@ -291,7 +291,7 @@ الكشك إدراج في قائمة الانتظار في الخلفية إدراج في قائمة الانتظار على المنبثقة - ابدأ هنا في الخلفية + تشغيل في الخلفية المحتوى الإفتراضي حسب البلد تغيير الإتجاه الإنتقال إلى التشغيل في الخلفية @@ -377,7 +377,7 @@ تناسب مع الشاشة توليد تلقائي - إستيراد وتصدير + إستيراد او تصدير إستيراد إستعادة مِن تصدير إلى @@ -421,7 +421,7 @@ المشغل الخارجي لا يدعم هذه الأنواع من الروابط ملف غير صالح / محتوى غير صالح الملف غير موجود أو ليس لديك الإذن الكافي للقراءة أو الكتابة فيه - لا توجد تدفقات متاحة للتنزيل + لا يوجد بث متاح للتنزيل تم حذف عنصر واحد. @@ -440,7 +440,7 @@ مشغل الخلفية المشغل المنبثق - التصدير السابق + نسخة احتياطية تعذر استيراد الاشتراكات لا يمكن تصدير الاشتراكات From 7c33e49ef626b76b309e7e9ee4c51e64798b85cb Mon Sep 17 00:00:00 2001 From: skil3z Date: Sat, 8 Sep 2018 17:16:17 +0000 Subject: [PATCH 036/131] Translated using Weblate (Finnish) Currently translated at 99.7% (382 of 383 strings) --- app/src/main/res/values-fi/strings.xml | 153 ++++++++++++++++++++++--- 1 file changed, 134 insertions(+), 19 deletions(-) diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 46cd82f86..87c0b49e5 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -42,7 +42,7 @@ Aseta sijainti minne äänitiedostot tallennetaan Automaattitoisto - Toistaa automaattisesti videon, kun NewPipe sovellusta kutsutaan toisesta sovelluksesta + Toistaa automaattisesti videon, kun NewPipe avataan toisesta ohjelmasta Oletusresoluutio Ponnahdusikkunan oletusresoluutio Näytä korkeampia resoluutioita @@ -73,7 +73,7 @@ Jatka toistoa keskeytysten jälkeen (esim. puhelut) Lataus Seuraava video - Näytä seuraavia ja samankaltaisia videoita + Näytä seuraava ja samankaltaisia videoita Osoitetta ei tueta Oletus-sisällon kieli Soitin @@ -172,7 +172,7 @@ Ei videoita %s video - %s videota + %s videoita Aloita @@ -218,7 +218,7 @@ Tietoja Hyväntekijät Lisenssit - Vapaa kevyt Android YouTube-frontend. + Vapaa ja kevyt nettivideo- ja audiostriimitoistin Androidille. Näytä GitHub:ssa NewPipe:n Lisenssi Olkoon sinulla ideoita; käännöksistä, design muutoksista, koodin siivoamisesta tai raskaista koodimuutoksista—apu on aina tervetullutta. Mitä enemmän saadaan tehtyä, sen paremmaksi sovellus tulee! @@ -257,7 +257,7 @@ Lisätty ikkunajonoon Toista kaikki - Tämän toisto epäonnistui + Tätä ei voitu toistaa Palautuskelvoton soittimen virhe Palaudutaan soittimen virheestä @@ -267,7 +267,7 @@ Yksityiskohdat Ääniasetukset Pidä pohjassa lisätäksesi jonoon -"Näytä vihje soittolistalle lisäämiselle " +"Näytä vihje soittolistaan lisäämiseen " [Tuntematon] Lisää taustatoistojonoon @@ -276,7 +276,7 @@ Aloita toisto taustalla Aloita toisto ikkunassa Lahjoita - NewPipe kehitetään vapaaehtoisten toimesta, jotka käyttävät vapaa-aikaansa tuottaakseen parhaimman kokemuksen sinulle. Nyt on aika antaa takaisin, jotta kehittäjät voivat tehdä NewPipe:sta vielä paremman nauttiessaan kupin kahvia! + NewPipe kehitetään vapaaehtoisten toimesta, jotka käyttävät vapaa-aikaansa tuottaakseen parhaan mahdollisen käyttökokemuksen sinulle. Nyt on aika antaa takaisin, jotta kehittäjät voivat tehdä NewPipe:sta vielä paremman nauttiessaan kupin kahvia! Anna takaisin Websivu Käy verkkosivuillamme saadaksesi lisää tietoa ja uusimmat uutiset NewPipe:stä. @@ -293,10 +293,10 @@ Näytä videoiden pikkukuvat Poista käytöstä lopettaaksesi kaikkien pikkukuvien lataus säästääksesi mobiilidataa ja muistinkäyttöä. Tämän asetuksen muuttaminen poistaa kaikki pikkukuvat välimuistista Kuvavälimuisti tyhjennetty - Tyhjennä tallennettu metadata - Poista kaikki tallennettu nettisivujen tieto - Välimuistin tiedot poistettu - Automaattisesti lisää ehdotuksista video soittolistaan kun repeat on pois päältä + Poista tallennettu metatieto + Poista kaikki tallennettu sivutieto + Metatiedot poistettu + Automaattisesti lisää seuraavan youtuben ehdottaman videon soittolistaan, sen viimeisen kappaleen soidessa (Youtuben Autoplay) Sisällön oletusmaa Palvelu "Virheenkorjaus " @@ -310,15 +310,15 @@ Muuta näytön suuntausta Vaihda taustalle - Vaihda pop-up toistoon - Vaihda normaalitilaan + Vaihda ponnahdusikkunatoistoon + Vaihda normaalitoistoon Tuo tietokanta Vie tietokanta Kirjoittaa yli tämänhetkisen historian ja tilaukset Vie historia, tilaukset tai soittolistat Poista katseluhistoria - Poistaa toistettujen videoiden historian + Poistaa toistohistorian Poista koko katseluhistoria. Katseluhistoria onnistuneesti poistettu. Poista hakuhistoria @@ -327,8 +327,8 @@ Hakuhistoria onnistuneesti poistettu. Ulkoiset soittimet eivät tue tämänkaltaisia linkkejä Viallinen osoite - Videostriimejä ei löytynyt - Audiostriimejä ei löytynyt + Videojonoja ei löytynyt + Audiojonoja ei löytynyt Virheellinen kansio Virheellinen tiedosto/lähde Tiedosta ei löydy tai sen kirjoittamiseen/lukemiseen ei ole lupaa @@ -339,7 +339,7 @@ Luo Poista yksi Poista kaikki - Hyväksy + Hylkää Nimeä uudelleen 1 poistettu. @@ -347,6 +347,121 @@ Ohjelmaa tämän toistamiseen ei ole asennettu NewPipen tietosuojakäytäntö - NewPipen projekti ottaa yksityisyytesi tosissaan. Siksi se ei kerää sinulta mitään tietoja ilman lupaasi. NewPipen tietosuojakäytännössä selitetään tarkasti mitä tietoja lähetetään tai tallennetaan virheraportin yhteydessä. + NewPipe ottaa yksityisyytesi tosissaan. Siksi se ei kerää sinulta mitään tietoja ilman lupaasi. NewPipen tietosuojakäytännössä selitetään tarkasti mitä tietoja lähetetään tai tallennetaan virheraportin yhteydessä. Lue tietosuojakäytäntö - + Automaattisesti lisää ehdotettu video soittolistaan + Videostriimejä ei löytynyt ladattavaksi + + NewPipe on vapaata softaa. Voit käyttää sitä, katsella sekä muokata sen koodia ja parannella sitä ilmaiseksi mielesi mukaan. Tarkemmin sanottuna, voit jakaa sitä edelleen ja/tai muokata sitä Free Software Foundationin julkaiseman GNU GPL:n, joko versio kolmosen (GPLv3), tai uudemman, ehdoilla. + Haluatko poistaa tämän katseluhistoriasta? + Oletko varma että haluat poistaa kaiken katseluhistoriasta? + Viimeksi toistettu + Eniten toistetut + + Vienti valmis + Tuonti valmis + Virheellinen ZIP-tiedosto + Varoitus: Ei voitu tuoda kaikkia tiedostoja. + Tämä nollaa nykyiset asetuksesi. + Haluatko myös tuoda asetukset? + + Avaa alasvetovalikko + Sulje alasvetovalikko + Tähän tulee jotain jossainvaiheessa ;D + + + Ensisijainen avaustapa + Oletustoiminto avatessa sisältöä — %s + + Videosoitin + Taustasoitin + Ponnahdusikkunasoitin + Kysy aina + + Haetaan infoa… + Ladataan pyydettyä sisältöä + + Luo uusi soittolista + Poista soittolista + Uudelleennimeä soittolista + Nimi + Lisää soittolistaan + Aseta soittolistan kuvakkeeksi + + Tallenna soittolista kirjanmerkkeihin + Poista kirjanmerkki + + Haluatko poistaa tämän soittolistan? + Soittolista luotu + Lisätty soittolistaan + Soittolistan kuvake muutettu + Soittolistaa ei voitu poistaa + + Ei tekstityksiä + + Sovita + Täytä + Suurenna + + Automaattisesti luotu + + Tekstitykset + Muokkaa tekstitysten kokoa ja taustaa. Asetusten päivittämiseksi sinun tulee käynnistää ohjelma uudelleen + + Laita päälle LeakCanary-muistivuodonpaljastin (virheenkorjausta varten) + Muistivuotojen valvonta voi aiheuttaa ohjelman hidastumisen virhetilanteissa + + Raportoi yhteensopimattomuusvirheitä jotka aiheutuvat vanhoista ohjelmista + Pakota raportointi kuljetuskelvottomille Rx-poikkeuksille jotka ovat muistisirpaleiden tai aktiviteettielämänkaaren ulkopuolella poiston jälkeen + + Tuo/Vie + Tuo + Tuo kohteesta + Vie kohteeseen + + Tuodaan… + Viedään… + + Tuo tiedosto + Edellinen vienti + + Tilauksia ei voitu tuoda + Tilauksia ei voitu viedä + + Tuo youtube-tilaukset lataamalla ensin tilauslistatiedostosi: +\n +\n1. Mene osoitteeseen: %1$s +\n2. Kirjaudu sisään kun niin vaaditaan +\n3. Latauksen pitäisi alkaa (se on se tiedosto) + Tuo SoundCloud-profiili kirjoittamalla joko osoite tai ID:si: +\n +\n1. Laita päälle työpöytämoodi selaimessasi (tai käytä tietokonetta, tämä sivu ei toimi mobiilisivuna) +\n2. Mene tähän osoitteeseen: %1$s +\n3. Kirjaudu sisään kysyttäessä. +\n4. Kopioi se nettiosoite johon sinut ohjattiin. + sinun käyttäjänimesi, soundcloud.com/<sinun käyttäjänimesi> + + Ota huomioon että tämä operaatio voi käyttää paljon dataa. +\nHaluatko jatkaa? + + Toiston nopeuden säätimet + Musiikkitempo + Sävelkorkeus + Irroita tempo ja nopeus toisistaan (saattaa aiheuttaa säröä äänessä) + Kelaa eteenpäin hiljaisissa kohdissa + Askel + Nollaa + + Jotta olisimme kelpoisia EU:n uuden yleisen tietosuoja-asetuksen (GDPR) kannalta, meidän pitää muistuttaa sinua lukemaan NewPipen tietosuojakäytäntö. Lue se oikeasti. Sinun pitää myös hyväksyä se jotta voit lähettää virheraportin. + Hyväksy + Hylkää + + Ei rajaa + Rajoita resoluutiota kun mobiilidata on käytössä + Pienennä vaihtaessa ohjelmaa + Toiminto kun vaihdetaan toiseen ohjelmaan päävideosoittimesta — %s + Ei koskaan + Pienennä taustasoittimeksi + Muuta ponnahdusikkunaksi + + From 58bfde33a9cbc2896551ca441855cd588ae0d868 Mon Sep 17 00:00:00 2001 From: Duppadaadadii Date: Sat, 8 Sep 2018 18:29:57 +0000 Subject: [PATCH 037/131] Translated using Weblate (Finnish) Currently translated at 99.7% (382 of 383 strings) --- app/src/main/res/values-fi/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 87c0b49e5..3f0a8a262 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -234,7 +234,7 @@ Historia pyyhitty Poistettu Haluatko poistaa tämän hakuhistoriasta? -Jatka toistoa +Jatka keskeytyksen jälkeen Info: Mikä:\\nPyyntö:\\nSisällön kieli:\\nPalvelu:\\nGMT Aika:\\nPaketti:\\nVersio:\\nOS versio: © %1$s %2$s %3$s alla From 440cdbdb23b1ee02465b2795675def9044d75330 Mon Sep 17 00:00:00 2001 From: Dominik Zabicki Date: Sat, 8 Sep 2018 21:00:03 +0000 Subject: [PATCH 038/131] Translated using Weblate (Polish) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-pl/strings.xml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index a03e69748..b156f60db 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -146,7 +146,7 @@ Kanał Tak Później - Wyłączone + Wyłączony Filtr Odśwież Wyczyść @@ -483,4 +483,18 @@ Brak limitu Limit przy użyciu danych mobilnych - + Kanały + Playlisty + Utwory + Użytkownicy + Przewiń w przód podczas ciszy + Krok + Zresetuj + + Zminimalizuj podczas przełączenia aplikacji + "Akcja podczas przełączenia do innej aplikacji z głównego odtwarzacza — %s" + Zminimalizuj + Zminimalizuj do odtwarzania w tle + Zminimalizuj do odtwarzania w okienku + + From c4f4583f2033619644c3a1f65132d205a3c1942d Mon Sep 17 00:00:00 2001 From: switchtegrax1 Date: Sun, 9 Sep 2018 04:26:00 +0000 Subject: [PATCH 039/131] Translated using Weblate (Portuguese (Brazil)) Currently translated at 99.7% (382 of 383 strings) --- app/src/main/res/values-pt-rBR/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 19209941b..542620cf7 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -293,7 +293,7 @@ abrir em modo popup Alterar a orientação Alterar para Plano de Fundo Alterar para Popup - Aletar para principal + Alterar para principal Reprodutores externos não suportam estes tipos de links URL inválida From b1957773bb112f9ea84f15afaaf0de4829e33bc7 Mon Sep 17 00:00:00 2001 From: ButterflyOfFire Date: Sun, 9 Sep 2018 16:58:22 +0000 Subject: [PATCH 040/131] Translated using Weblate (Arabic) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-ar/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 81ccc6c81..45ff232ea 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -179,7 +179,7 @@ صفر مشترِك %s مشترِك مشترِكان - %s مشترك + %s مشتركين %s مشترك %s مشترك @@ -268,8 +268,8 @@ لاتوجد مشاهدة %s مشاهدة مشاهدتين - %s مشاهدة - %s مشاهدة + %s مشاهدات + %s مشاهدات %s مشاهدة From dcb9380b509883020d0a470e66ed1c40a5c55b67 Mon Sep 17 00:00:00 2001 From: Robson Cassiano Date: Mon, 10 Sep 2018 13:59:40 +0000 Subject: [PATCH 041/131] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-pt-rBR/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 542620cf7..d2a6669c0 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -293,7 +293,7 @@ abrir em modo popup Alterar a orientação Alterar para Plano de Fundo Alterar para Popup - Alterar para principal + Alterar para o Principal Reprodutores externos não suportam estes tipos de links URL inválida From 5cc21a831bc8e018be6bbdc4c926200ee6977429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emin=20Tufan=20=C3=87etin?= Date: Sun, 9 Sep 2018 21:03:51 +0000 Subject: [PATCH 042/131] Translated using Weblate (Turkish) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-tr/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 7605e3e3c..fb4953d1d 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -67,7 +67,7 @@ Web sitesi tümüyle ayrıştırılamadı İçerik kullanılabilir değil GEMA tarafından engellendi - Bu, henüz desteklenmeyen, bir CANLI AKIŞ. + Bu, henüz desteklenmeyen bir CANLI AKIŞ. Herhangi bir akış alınamadı Resim yüklenemedi Uygulama/arayüz çöktü @@ -256,7 +256,7 @@ Geçmiş temizlendi Öge silindi Bu içeriği arama geçmişinden silmek istiyor musunuz? -\"Kuyruğa almak İçin bas\" ipucunu göster +\"Kuyruğa almak için basılı tut\" ipucunu göster Video ayrıntıları sayfasında arka plan veya açılır oynatıcı düğmesine basıldığında ipucu göster Arka plan oynatıcıda kuyruğa eklendi Açılır oynatıcıda kuyruğa eklendi @@ -274,7 +274,7 @@ Abonelik Sayfası Besleme Sayfası Kanal Sayfası - Bir kanal seç + Kanal seç Henüz abone olunan kanal yok Köşk seç @@ -287,7 +287,7 @@ Kaldır Ayrıntılar Ses Ayarları - Kuyruğa Almak İçin Bas + Kuyruğa Almak İçin Basılı Tut Arka Planda Kuyruğa Al Açılır Oynatıcıda Kuyruğa Al Burada Oynatmaya Başla @@ -336,7 +336,7 @@ Akış dosyasını indir. Bilgileri göster - Yer imleri + Yer İmleri Listeye Ekle @@ -437,7 +437,7 @@ \n \nDevam etmek istiyor musunuz? Küçük resimleri yükle - Küçük resimlerin hepsinin yüklenmesini engellemek ve bellek ve veri kullanımını azaltmak için devre dışı bırakın. Bunu değiştirmek, hem bellekteki hem de diskteki resim önbelleğini temizler + Küçük resimlerin tümünün yüklenmesini engellemek, bellek ve veri kullanımını azaltmak için devre dışı bırakın. Bunu değiştirmek, hem bellekteki hem de diskteki resim önbelleğini temizler Resim önbelleği temizlendi Önbelleklenmiş üst veriyi temizle Önbelleklenmiş tüm web sayfası verisini kaldır From 784e01347cf30f5c5ca7f0bad31938c83b242a62 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Tue, 11 Sep 2018 15:16:39 +0200 Subject: [PATCH 043/131] fix wrong subscriptini count --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 4b717cafc..4ae9f0fb7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -55,7 +55,7 @@ dependencies { exclude module: 'support-annotations' } - implementation 'com.github.TeamNewPipe:NewPipeExtractor:66c3c3f45241d4b0c909' + implementation 'com.github.TeamNewPipe:NewPipeExtractor:217d13b1028' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.8.9' From 27fbe690333f460f44841559c5b2d8926085ca50 Mon Sep 17 00:00:00 2001 From: BO41 Date: Tue, 28 Aug 2018 19:17:14 +0200 Subject: [PATCH 044/131] code cleanup mainly removes throw statements automated using Android Studio, staged by hand BUILD SUCCESSFUL in 52s 39 actionable tasks: 37 executed, 2 up-to-date --- app/src/main/java/org/schabi/newpipe/App.java | 2 +- .../newpipe/local/dialog/PlaylistDialog.java | 2 +- .../subscription/SubscriptionService.java | 2 +- .../mediasession/PlayQueueNavigator.java | 2 +- .../player/playback/CustomTrackSelector.java | 2 +- .../playqueue/AbstractInfoPlayQueue.java | 2 +- .../newpipe/report/AcraReportSender.java | 2 +- .../settings/SelectChannelFragment.java | 2 +- .../newpipe/settings/SelectKioskFragment.java | 2 +- .../schabi/newpipe/util/ExtractorHelper.java | 2 +- .../services/ImportExportJsonHelperTest.java | 2 +- .../newpipe/report/ErrorActivityTest.java | 2 +- .../schabi/newpipe/util/ListHelperTest.java | 20 +++++++++---------- .../util/QuadraticSliderStrategyTest.java | 18 ++++++++--------- .../giga/get/DownloadManagerImplTest.java | 12 +++++------ 15 files changed, 37 insertions(+), 37 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java index f436a26b8..dfce8f100 100644 --- a/app/src/main/java/org/schabi/newpipe/App.java +++ b/app/src/main/java/org/schabi/newpipe/App.java @@ -106,7 +106,7 @@ public class App extends Application { // https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling RxJavaPlugins.setErrorHandler(new Consumer() { @Override - public void accept(@NonNull Throwable throwable) throws Exception { + public void accept(@NonNull Throwable throwable) { Log.e(TAG, "RxJavaPlugins.ErrorHandler called with -> : " + "throwable = [" + throwable.getClass().getName() + "]"); diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java index 4b8e391c7..96d628683 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java @@ -58,7 +58,7 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave @Override @SuppressWarnings("unchecked") - public void readFrom(@NonNull Queue savedObjects) throws Exception { + public void readFrom(@NonNull Queue savedObjects) { streamEntities = (List) savedObjects.poll(); } diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionService.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionService.java index fc4230711..b4545a2dd 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionService.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionService.java @@ -116,7 +116,7 @@ public class SubscriptionService { public Completable updateChannelInfo(final ChannelInfo info) { final Function, CompletableSource> update = new Function, CompletableSource>() { @Override - public CompletableSource apply(@NonNull List subscriptionEntities) throws Exception { + public CompletableSource apply(@NonNull List subscriptionEntities) { if (DEBUG) Log.d(TAG, "updateChannelInfo() called with: subscriptionEntities = [" + subscriptionEntities + "]"); if (subscriptionEntities.size() == 1) { SubscriptionEntity subscription = subscriptionEntities.get(0); diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasession/PlayQueueNavigator.java b/app/src/main/java/org/schabi/newpipe/player/mediasession/PlayQueueNavigator.java index 429c26fd9..3d1fd171f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasession/PlayQueueNavigator.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasession/PlayQueueNavigator.java @@ -79,7 +79,7 @@ public class PlayQueueNavigator implements MediaSessionConnector.QueueNavigator private void publishFloatingQueueWindow() { if (callback.getQueueSize() == 0) { - mediaSession.setQueue(Collections.emptyList()); + mediaSession.setQueue(Collections.emptyList()); activeQueueItemId = MediaSessionCompat.QueueItem.UNKNOWN_ID; return; } diff --git a/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java b/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java index d80ea5bae..45cf545ce 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java +++ b/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java @@ -55,7 +55,7 @@ public class CustomTrackSelector extends DefaultTrackSelector { /** @see DefaultTrackSelector#selectTextTrack(TrackGroupArray, int[][], Parameters) */ @Override protected TrackSelection selectTextTrack(TrackGroupArray groups, int[][] formatSupport, - Parameters params) throws ExoPlaybackException { + Parameters params) { TrackGroup selectedGroup = null; int selectedTrackIndex = 0; int selectedTrackScore = 0; diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/AbstractInfoPlayQueue.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/AbstractInfoPlayQueue.java index 2c08f4f92..5ff766313 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/AbstractInfoPlayQueue.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/AbstractInfoPlayQueue.java @@ -26,7 +26,7 @@ abstract class AbstractInfoPlayQueue ext transient Disposable fetchReactor; AbstractInfoPlayQueue(final U item) { - this(item.getServiceId(), item.getUrl(), null, Collections.emptyList(), 0); + this(item.getServiceId(), item.getUrl(), null, Collections.emptyList(), 0); } AbstractInfoPlayQueue(final int serviceId, diff --git a/app/src/main/java/org/schabi/newpipe/report/AcraReportSender.java b/app/src/main/java/org/schabi/newpipe/report/AcraReportSender.java index 2d3226ab6..4ef075353 100644 --- a/app/src/main/java/org/schabi/newpipe/report/AcraReportSender.java +++ b/app/src/main/java/org/schabi/newpipe/report/AcraReportSender.java @@ -31,7 +31,7 @@ import org.schabi.newpipe.R; public class AcraReportSender implements ReportSender { @Override - public void send(@NonNull Context context, @NonNull CrashReportData report) throws ReportSenderException { + public void send(@NonNull Context context, @NonNull CrashReportData report) { ErrorActivity.reportError(context, report, ErrorActivity.ErrorInfo.make(UserAction.UI_ERROR,"none", "App crash, UI failure", R.string.app_ui_crash)); diff --git a/app/src/main/java/org/schabi/newpipe/settings/SelectChannelFragment.java b/app/src/main/java/org/schabi/newpipe/settings/SelectChannelFragment.java index 0ebdbefe0..6d85d5967 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SelectChannelFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SelectChannelFragment.java @@ -89,7 +89,7 @@ public class SelectChannelFragment extends DialogFragment { @Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.select_channel_fragment, container, false); - recyclerView = (RecyclerView) v.findViewById(R.id.items_list); + recyclerView = v.findViewById(R.id.items_list); recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); channelAdapter = new SelectChannelAdapter(); recyclerView.setAdapter(channelAdapter); diff --git a/app/src/main/java/org/schabi/newpipe/settings/SelectKioskFragment.java b/app/src/main/java/org/schabi/newpipe/settings/SelectKioskFragment.java index 44cb16682..16ba6fec6 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SelectKioskFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SelectKioskFragment.java @@ -75,7 +75,7 @@ public class SelectKioskFragment extends DialogFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.select_kiosk_fragment, container, false); - recyclerView = (RecyclerView) v.findViewById(R.id.items_list); + recyclerView = v.findViewById(R.id.items_list); recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); try { selectKioskAdapter = new SelectKioskAdapter(); diff --git a/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java b/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java index e445233c3..fb9579802 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java @@ -183,7 +183,7 @@ public final class ExtractorHelper { cache.removeInfo(serviceId, url); load = loadFromNetwork; } else { - load = Maybe.concat(ExtractorHelper.loadFromCache(serviceId, url), + load = Maybe.concat(ExtractorHelper.loadFromCache(serviceId, url), loadFromNetwork.toMaybe()) .firstElement() //Take the first valid .toSingle(); diff --git a/app/src/test/java/org/schabi/newpipe/local/subscription/services/ImportExportJsonHelperTest.java b/app/src/test/java/org/schabi/newpipe/local/subscription/services/ImportExportJsonHelperTest.java index 4a8b3d8c8..7f5f818be 100644 --- a/app/src/test/java/org/schabi/newpipe/local/subscription/services/ImportExportJsonHelperTest.java +++ b/app/src/test/java/org/schabi/newpipe/local/subscription/services/ImportExportJsonHelperTest.java @@ -27,7 +27,7 @@ public class ImportExportJsonHelperTest { } @Test - public void testInvalidSource() throws Exception { + public void testInvalidSource() { List invalidList = Arrays.asList( "{}", "", diff --git a/app/src/test/java/org/schabi/newpipe/report/ErrorActivityTest.java b/app/src/test/java/org/schabi/newpipe/report/ErrorActivityTest.java index 44a2f7cd0..ca6c76ff3 100644 --- a/app/src/test/java/org/schabi/newpipe/report/ErrorActivityTest.java +++ b/app/src/test/java/org/schabi/newpipe/report/ErrorActivityTest.java @@ -15,7 +15,7 @@ import static org.junit.Assert.assertNull; */ public class ErrorActivityTest { @Test - public void getReturnActivity() throws Exception { + public void getReturnActivity() { Class returnActivity; returnActivity = ErrorActivity.getReturnActivity(MainActivity.class); assertEquals(MainActivity.class, returnActivity); diff --git a/app/src/test/java/org/schabi/newpipe/util/ListHelperTest.java b/app/src/test/java/org/schabi/newpipe/util/ListHelperTest.java index 278ea81e1..abc09dc98 100644 --- a/app/src/test/java/org/schabi/newpipe/util/ListHelperTest.java +++ b/app/src/test/java/org/schabi/newpipe/util/ListHelperTest.java @@ -45,7 +45,7 @@ public class ListHelperTest { new VideoStream("", MediaFormat.MPEG_4, /**/ "1080p60", true)); @Test - public void getSortedStreamVideosListTest() throws Exception { + public void getSortedStreamVideosListTest() { List result = ListHelper.getSortedStreamVideosList(MediaFormat.MPEG_4, true, videoStreamsTestList, videoOnlyStreamsTestList, true); List expected = Arrays.asList("144p", "240p", "360p", "480p", "720p", "720p60", "1080p", "1080p60", "1440p60", "2160p", "2160p60"); @@ -67,7 +67,7 @@ public class ListHelperTest { } @Test - public void getSortedStreamVideosExceptHighResolutionsTest() throws Exception { + public void getSortedStreamVideosExceptHighResolutionsTest() { //////////////////////////////////// // Don't show Higher resolutions // ////////////////////////////////// @@ -79,7 +79,7 @@ public class ListHelperTest { } @Test - public void getDefaultResolutionTest() throws Exception { + public void getDefaultResolutionTest() { List testList = Arrays.asList( new VideoStream("", MediaFormat.MPEG_4, /**/ "720p"), new VideoStream("", MediaFormat.v3GPP, /**/ "240p"), @@ -130,7 +130,7 @@ public class ListHelperTest { } @Test - public void getHighestQualityAudioFormatTest() throws Exception { + public void getHighestQualityAudioFormatTest() { AudioStream stream = audioStreamsTestList.get(ListHelper.getHighestQualityAudioIndex(MediaFormat.M4A, audioStreamsTestList)); assertEquals(320, stream.average_bitrate); assertEquals(MediaFormat.M4A, stream.getFormat()); @@ -145,7 +145,7 @@ public class ListHelperTest { } @Test - public void getHighestQualityAudioFormatPreferredAbsent() throws Exception { + public void getHighestQualityAudioFormatPreferredAbsent() { ////////////////////////////////////////// // Doesn't contain the preferred format // @@ -186,13 +186,13 @@ public class ListHelperTest { } @Test - public void getHighestQualityAudioNull() throws Exception { + public void getHighestQualityAudioNull() { assertEquals(-1, ListHelper.getHighestQualityAudioIndex(null, null)); assertEquals(-1, ListHelper.getHighestQualityAudioIndex(null, new ArrayList())); } @Test - public void getLowestQualityAudioFormatTest() throws Exception { + public void getLowestQualityAudioFormatTest() { AudioStream stream = audioStreamsTestList.get(ListHelper.getMostCompactAudioIndex(MediaFormat.M4A, audioStreamsTestList)); assertEquals(128, stream.average_bitrate); assertEquals(MediaFormat.M4A, stream.getFormat()); @@ -207,7 +207,7 @@ public class ListHelperTest { } @Test - public void getLowestQualityAudioFormatPreferredAbsent() throws Exception { + public void getLowestQualityAudioFormatPreferredAbsent() { ////////////////////////////////////////// // Doesn't contain the preferred format // @@ -250,13 +250,13 @@ public class ListHelperTest { } @Test - public void getLowestQualityAudioNull() throws Exception { + public void getLowestQualityAudioNull() { assertEquals(-1, ListHelper.getMostCompactAudioIndex(null, null)); assertEquals(-1, ListHelper.getMostCompactAudioIndex(null, new ArrayList())); } @Test - public void getVideoDefaultStreamIndexCombinations() throws Exception { + public void getVideoDefaultStreamIndexCombinations() { List testList = Arrays.asList( new VideoStream("", MediaFormat.MPEG_4, /**/ "1080p"), new VideoStream("", MediaFormat.MPEG_4, /**/ "720p60"), diff --git a/app/src/test/java/org/schabi/newpipe/util/QuadraticSliderStrategyTest.java b/app/src/test/java/org/schabi/newpipe/util/QuadraticSliderStrategyTest.java index 8c8d52043..c652472d1 100644 --- a/app/src/test/java/org/schabi/newpipe/util/QuadraticSliderStrategyTest.java +++ b/app/src/test/java/org/schabi/newpipe/util/QuadraticSliderStrategyTest.java @@ -11,25 +11,25 @@ public class QuadraticSliderStrategyTest { private final SliderStrategy.Quadratic standard = new SliderStrategy.Quadratic(0f, 100f, 50f, STEP); @Test - public void testLeftBound() throws Exception { + public void testLeftBound() { assertEquals(standard.progressOf(0), 0); assertEquals(standard.valueOf(0), 0f, DELTA); } @Test - public void testCenter() throws Exception { + public void testCenter() { assertEquals(standard.progressOf(50), 50); assertEquals(standard.valueOf(50), 50f, DELTA); } @Test - public void testRightBound() throws Exception { + public void testRightBound() { assertEquals(standard.progressOf(100), 100); assertEquals(standard.valueOf(100), 100f, DELTA); } @Test - public void testLeftRegion() throws Exception { + public void testLeftRegion() { final int leftProgress = standard.progressOf(25); final double leftValue = standard.valueOf(25); assertTrue(leftProgress > 0 && leftProgress < 50); @@ -37,7 +37,7 @@ public class QuadraticSliderStrategyTest { } @Test - public void testRightRegion() throws Exception { + public void testRightRegion() { final int leftProgress = standard.progressOf(75); final double leftValue = standard.valueOf(75); assertTrue(leftProgress > 50 && leftProgress < 100); @@ -45,7 +45,7 @@ public class QuadraticSliderStrategyTest { } @Test - public void testConversion() throws Exception { + public void testConversion() { assertEquals(standard.progressOf(standard.valueOf(0)), 0); assertEquals(standard.progressOf(standard.valueOf(25)), 25); assertEquals(standard.progressOf(standard.valueOf(50)), 50); @@ -54,7 +54,7 @@ public class QuadraticSliderStrategyTest { } @Test - public void testReverseConversion() throws Exception { + public void testReverseConversion() { // Need a larger delta since step size / granularity is too small and causes // floating point round-off errors during conversion final float largeDelta = 1f; @@ -67,7 +67,7 @@ public class QuadraticSliderStrategyTest { } @Test - public void testQuadraticPropertyLeftRegion() throws Exception { + public void testQuadraticPropertyLeftRegion() { final double differenceCloserToCenter = Math.abs(standard.valueOf(40) - standard.valueOf(45)); final double differenceFurtherFromCenter = @@ -76,7 +76,7 @@ public class QuadraticSliderStrategyTest { } @Test - public void testQuadraticPropertyRightRegion() throws Exception { + public void testQuadraticPropertyRightRegion() { final double differenceCloserToCenter = Math.abs(standard.valueOf(75) - standard.valueOf(70)); final double differenceFurtherFromCenter = diff --git a/app/src/test/java/us/shandian/giga/get/DownloadManagerImplTest.java b/app/src/test/java/us/shandian/giga/get/DownloadManagerImplTest.java index 6ff702273..49bfd4840 100644 --- a/app/src/test/java/us/shandian/giga/get/DownloadManagerImplTest.java +++ b/app/src/test/java/us/shandian/giga/get/DownloadManagerImplTest.java @@ -110,7 +110,7 @@ public class DownloadManagerImplTest { } @Test - public void resumeMission() throws Exception { + public void resumeMission() { DownloadMission mission = missions.get(0); mission.running = true; verify(mission, never()).start(); @@ -122,7 +122,7 @@ public class DownloadManagerImplTest { } @Test - public void pauseMission() throws Exception { + public void pauseMission() { DownloadMission mission = missions.get(0); mission.running = false; downloadManager.pauseMission(0); @@ -133,7 +133,7 @@ public class DownloadManagerImplTest { } @Test - public void deleteMission() throws Exception { + public void deleteMission() { DownloadMission mission = missions.get(0); assertEquals(mission, downloadManager.getMission(0)); downloadManager.deleteMission(0); @@ -143,18 +143,18 @@ public class DownloadManagerImplTest { } @Test(expected = RuntimeException.class) - public void getMissionWithNegativeIndex() throws Exception { + public void getMissionWithNegativeIndex() { downloadManager.getMission(-1); } @Test - public void getMission() throws Exception { + public void getMission() { assertSame(missions.get(0), downloadManager.getMission(0)); assertSame(missions.get(1), downloadManager.getMission(1)); } @Test - public void sortByTimestamp() throws Exception { + public void sortByTimestamp() { ArrayList downloadMissions = new ArrayList<>(); DownloadMission mission = new DownloadMission(); mission.timestamp = 0; From 5660b5ddc6d90299710896a796570d58c563517a Mon Sep 17 00:00:00 2001 From: BO41 Date: Tue, 28 Aug 2018 19:25:56 +0200 Subject: [PATCH 045/131] accessibility image without contentDescription Keyboard inaccessible widget BUILD SUCCESSFUL in 6s 39 actionable tasks: 4 executed, 35 up-to-date --- app/src/main/res/layout-v21/drawer_header.xml | 9 ++++++--- app/src/main/res/layout/drawer_header.xml | 9 ++++++--- app/src/main/res/layout/fragment_about.xml | 3 ++- app/src/main/res/layout/item_search_history.xml | 3 ++- app/src/main/res/layout/item_software_component.xml | 3 ++- app/src/main/res/layout/mission_item.xml | 6 ++++-- app/src/main/res/layout/mission_item_linear.xml | 6 ++++-- app/src/main/res/layout/select_channel_item.xml | 3 ++- app/src/main/res/layout/select_kiosk_item.xml | 6 ++++-- 9 files changed, 32 insertions(+), 16 deletions(-) diff --git a/app/src/main/res/layout-v21/drawer_header.xml b/app/src/main/res/layout-v21/drawer_header.xml index 4cdc2b30e..9336c8d9c 100644 --- a/app/src/main/res/layout-v21/drawer_header.xml +++ b/app/src/main/res/layout-v21/drawer_header.xml @@ -16,7 +16,8 @@ android:layout_height="match_parent" android:background="?attr/colorPrimary" android:scaleType="centerCrop" - android:src="@drawable/background_header" /> + android:src="@drawable/background_header" + android:contentDescription="TODO" /> + android:src="@drawable/np_logo_nude_shadow" + android:contentDescription="TODO" /> + android:src="@drawable/ic_arrow_down_white" + android:contentDescription="TODO" /> \ No newline at end of file diff --git a/app/src/main/res/layout/drawer_header.xml b/app/src/main/res/layout/drawer_header.xml index c119c302a..833abe1c6 100644 --- a/app/src/main/res/layout/drawer_header.xml +++ b/app/src/main/res/layout/drawer_header.xml @@ -16,7 +16,8 @@ android:focusable="true"> android:layout_height="match_parent" android:background="?attr/colorPrimary" android:src="@drawable/background_header" - android:scaleType="centerCrop"/> + android:scaleType="centerCrop" + android:contentDescription="TODO" /> android:layout_width="70dp" android:layout_height="70dp" - android:src="@drawable/np_logo_nude_shadow"/> + android:src="@drawable/np_logo_nude_shadow" + android:contentDescription="TODO" /> android:paddingBottom="20dp" android:paddingRight="20dp" android:src="@drawable/ic_arrow_down_white" - android:paddingEnd="20dp" /> + android:paddingEnd="20dp" + android:contentDescription="TODO" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 320f72ab9..e8537cad3 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -21,7 +21,8 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginBottom="8dp" - app:srcCompat="@mipmap/ic_launcher" /> + app:srcCompat="@mipmap/ic_launcher" + android:contentDescription="TODO" /> + android:paddingTop="8dp" + android:focusable="true"> + android:clickable="true" + android:focusable="true"> + android:scaleType="centerInside" + android:contentDescription="TODO" /> @@ -50,7 +51,8 @@ android:layout_centerHorizontal="true" android:scaleType="fitXY" android:gravity="center" - android:padding="10dp"/> + android:padding="10dp" + android:contentDescription="TODO" /> + android:padding="15dp" + android:contentDescription="TODO" /> + android:scaleType="centerInside" + android:contentDescription="TODO" /> diff --git a/app/src/main/res/layout/select_channel_item.xml b/app/src/main/res/layout/select_channel_item.xml index 09602a371..5d00c1b01 100644 --- a/app/src/main/res/layout/select_channel_item.xml +++ b/app/src/main/res/layout/select_channel_item.xml @@ -6,7 +6,8 @@ android:layout_height="wrap_content" android:background="?attr/selectableItemBackground" android:clickable="true" - android:padding="5dp"> + android:padding="5dp" + android:focusable="true"> + android:padding="5dp" + android:focusable="true"> + tools:ignore="RtlHardcoded" + android:contentDescription="TODO" /> Date: Tue, 28 Aug 2018 19:30:44 +0200 Subject: [PATCH 046/131] correctness use apply() on SharedPreferences use dp instead of sp for text sizes BUILD SUCCESSFUL in 22s 39 actionable tasks: 10 executed, 29 up-to-date --- .../org/schabi/newpipe/settings/ContentSettingsFragment.java | 2 +- app/src/main/res/layout-v21/drawer_header.xml | 4 ++-- app/src/main/res/layout/drawer_header.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java index 0ca78b34a..ca48ed8b5 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java @@ -264,7 +264,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment { else if (v instanceof String) prefEdit.putString(key, ((String) v)); } - prefEdit.commit(); + prefEdit.apply(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { diff --git a/app/src/main/res/layout-v21/drawer_header.xml b/app/src/main/res/layout-v21/drawer_header.xml index 9336c8d9c..4474ee4ed 100644 --- a/app/src/main/res/layout-v21/drawer_header.xml +++ b/app/src/main/res/layout-v21/drawer_header.xml @@ -40,7 +40,7 @@ android:layout_toRightOf="@id/drawer_header_np_nude_view" android:gravity="center" android:text="@string/app_name" - android:textSize="30dp" + android:textSize="30sp" android:textColor="@color/drawer_header_font_color" android:textStyle="bold|italic" /> @@ -52,7 +52,7 @@ android:layout_alignStart="@id/drawer_header_np_text_view" android:layout_below="@id/drawer_header_np_text_view" android:text="YouTube" - android:textSize="18dp" + android:textSize="18sp" android:textColor="@color/drawer_header_font_color" android:textStyle="italic" /> diff --git a/app/src/main/res/layout/drawer_header.xml b/app/src/main/res/layout/drawer_header.xml index 833abe1c6..0458773d7 100644 --- a/app/src/main/res/layout/drawer_header.xml +++ b/app/src/main/res/layout/drawer_header.xml @@ -40,7 +40,7 @@ android:focusable="true"> android:layout_alignTop="@id/drawer_header_np_nude_view" android:layout_alignBottom="@id/drawer_header_np_nude_view" android:gravity="center" - android:textSize="30dp" + android:textSize="30sp" android:textColor="@color/drawer_header_font_color" android:textStyle="bold|italic"/> @@ -52,7 +52,7 @@ android:focusable="true"> android:layout_below="@id/drawer_header_np_text_view" android:layout_alignLeft="@id/drawer_header_np_text_view" android:layout_alignStart="@id/drawer_header_np_text_view" - android:textSize="18dp" + android:textSize="18sp" android:textColor="@color/drawer_header_font_color" android:textStyle="italic"/> From 5db0cc524174dfda56d19cc7e1bd61d91fa8ec06 Mon Sep 17 00:00:00 2001 From: BO41 Date: Tue, 28 Aug 2018 19:40:05 +0200 Subject: [PATCH 047/131] performance + usability obsolete layout params Ellipsis string can be replaced with ellipsis character Missing inputType Usage of showAsAction=always BUILD SUCCESSFUL in 5s 39 actionable tasks: 4 executed, 35 up-to-date --- app/src/main/res/layout/activity_error.xml | 3 ++- app/src/main/res/layout/mission_item_linear.xml | 3 +-- app/src/main/res/menu/menu_videooptions.xml | 6 +++--- app/src/main/res/values-hu/strings.xml | 2 +- app/src/main/res/values-ko/strings.xml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/layout/activity_error.xml b/app/src/main/res/layout/activity_error.xml index 7752dc7cb..c47077c73 100644 --- a/app/src/main/res/layout/activity_error.xml +++ b/app/src/main/res/layout/activity_error.xml @@ -114,7 +114,8 @@ + android:layout_height="wrap_content" + android:inputType="" />