diff --git a/README.md b/README.md
index 08d3fb49e..030963a89 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,7 @@
Screenshots • Description • Features • Contribution • Donate • License
+Website • Blog • Press
WARNING: PUTTING NEWPIPE OR ANY FORK OF IT INTO GOOGLE PLAYSTORE VIOLATES THEIR TERMS OF CONDITIONS.
diff --git a/app/build.gradle b/app/build.gradle
index 03081b3e1..50fa6ab12 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -8,8 +8,8 @@ android {
applicationId "org.schabi.newpipe"
minSdkVersion 15
targetSdkVersion 27
- versionCode 42
- versionName "0.11.1"
+ versionCode 43
+ versionName "0.11.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@@ -47,21 +47,24 @@ android {
}
}
+ext {
+ supportLibVersion = '27.0.2'
+}
dependencies {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2') {
exclude module: 'support-annotations'
}
- implementation 'com.github.TeamNewPipe:NewPipeExtractor:17ce9f537e8df'
+ implementation 'com.github.TeamNewPipe:NewPipeExtractor:044b8fe32f47e28'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
- implementation 'com.android.support:appcompat-v7:27.0.1'
- implementation 'com.android.support:support-v4:27.0.1'
- implementation 'com.android.support:design:27.0.1'
- implementation 'com.android.support:recyclerview-v7:27.0.1'
- implementation 'com.android.support:preference-v14:27.0.1'
+ implementation "com.android.support:appcompat-v7:$supportLibVersion"
+ implementation "com.android.support:support-v4:$supportLibVersion"
+ implementation "com.android.support:design:$supportLibVersion"
+ implementation "com.android.support:recyclerview-v7:$supportLibVersion"
+ implementation "com.android.support:preference-v14:$supportLibVersion"
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'ch.acra:acra:4.9.2'
@@ -76,7 +79,7 @@ dependencies {
debugImplementation 'com.facebook.stetho:stetho-urlconnection:1.5.0'
debugImplementation 'com.android.support:multidex:1.0.2'
- implementation 'io.reactivex.rxjava2:rxjava:2.1.6'
+ implementation 'io.reactivex.rxjava2:rxjava:2.1.7'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
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 2f73e7582..5b445e813 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
@@ -545,8 +545,8 @@ public class VideoDetailFragment extends BaseStateFragment implement
}
});
}
-
- if (TextUtils.isEmpty(info.getUploaderAvatarUrl())) {
+
+ if (!TextUtils.isEmpty(info.getUploaderAvatarUrl())) {
imageLoader.displayImage(info.getUploaderAvatarUrl(), uploaderThumb, DISPLAY_AVATAR_OPTIONS);
}
}
diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java
index c50a8a66a..ad0d0432f 100644
--- a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java
@@ -5,6 +5,7 @@ import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -153,7 +154,11 @@ public class KioskFragment extends BaseListInfoFragment {
@Override
public Single loadMoreItemsLogic() {
- return ExtractorHelper.getMoreKioskItems(serviceId, url, currentNextItemsUrl);
+ String contentCountry = PreferenceManager
+ .getDefaultSharedPreferences(activity)
+ .getString(getString(R.string.search_language_key),
+ getString(R.string.default_language_value));
+ return ExtractorHelper.getMoreKioskItems(serviceId, url, currentNextItemsUrl, contentCountry);
}
/*//////////////////////////////////////////////////////////////////////////
diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java
index f260b86a6..482f8f803 100644
--- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java
+++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java
@@ -177,7 +177,7 @@ public final class BackgroundPlayer extends Service {
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, getString(R.string.notification_channel_id))
.setOngoing(true)
- .setSmallIcon(R.drawable.ic_play_circle_filled_white_24dp)
+ .setSmallIcon(R.drawable.ic_newpipe_triangle_white)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setCustomContentView(notRemoteView)
.setCustomBigContentView(bigNotRemoteView);
diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java
index d141dfaae..50a02beec 100644
--- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java
+++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java
@@ -44,6 +44,7 @@ import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
+import android.widget.ImageButton;
import android.widget.PopupMenu;
import android.widget.RemoteViews;
import android.widget.SeekBar;
@@ -275,7 +276,7 @@ public final class PopupVideoPlayer extends Service {
return new NotificationCompat.Builder(this, getString(R.string.notification_channel_id))
.setOngoing(true)
- .setSmallIcon(R.drawable.ic_play_arrow_white)
+ .setSmallIcon(R.drawable.ic_newpipe_triangle_white)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setContent(notRemoteView);
}
@@ -401,6 +402,7 @@ public final class PopupVideoPlayer extends Service {
protected class VideoPlayerImpl extends VideoPlayer {
private TextView resizingIndicator;
+ private ImageButton fullScreenButton;
@Override
public void handleIntent(Intent intent) {
@@ -418,6 +420,13 @@ public final class PopupVideoPlayer extends Service {
public void initViews(View rootView) {
super.initViews(rootView);
resizingIndicator = rootView.findViewById(R.id.resizing_indicator);
+ fullScreenButton = rootView.findViewById(R.id.fullScreenButton);
+ fullScreenButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ onFullScreenButtonClicked();
+ }
+ });
}
@Override
diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java
index c3d52aeae..a3c8b53dc 100644
--- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java
+++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java
@@ -75,7 +75,13 @@ import static org.schabi.newpipe.util.AnimationUtils.animateView;
* @author mauriciocolli
*/
@SuppressWarnings({"WeakerAccess", "unused"})
-public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.VideoListener, SeekBar.OnSeekBarChangeListener, View.OnClickListener, Player.EventListener, PopupMenu.OnMenuItemClickListener, PopupMenu.OnDismissListener {
+public abstract class VideoPlayer extends BasePlayer
+ implements SimpleExoPlayer.VideoListener,
+ SeekBar.OnSeekBarChangeListener,
+ View.OnClickListener,
+ Player.EventListener,
+ PopupMenu.OnMenuItemClickListener,
+ PopupMenu.OnDismissListener {
public static final boolean DEBUG = BasePlayer.DEBUG;
public final String TAG;
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 4763b6a02..5293ff3d6 100644
--- a/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java
+++ b/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java
@@ -143,16 +143,16 @@ public final class ExtractorHelper {
return checkCache(forceLoad, serviceId, url, Single.fromCallable(new Callable() {
@Override
public KioskInfo call() throws Exception {
- return KioskInfo.getInfo(NewPipe.getService(serviceId), url, contentCountry);
+ return KioskInfo.getInfo(NewPipe.getService(serviceId), url, toUpperCase(contentCountry));
}
}));
}
- public static Single getMoreKioskItems(final int serviceId, final String url, final String nextStreamsUrl) {
+ public static Single getMoreKioskItems(final int serviceId, final String url, final String nextStreamsUrl, final String contentCountry) {
return Single.fromCallable(new Callable() {
@Override
public NextItemsResult call() throws Exception {
- return KioskInfo.getMoreItems(NewPipe.getService(serviceId), url, nextStreamsUrl);
+ return KioskInfo.getMoreItems(NewPipe.getService(serviceId), url, nextStreamsUrl, toUpperCase(contentCountry));
}
});
}
@@ -267,4 +267,17 @@ public final class ExtractorHelper {
public static boolean isInterruptedCaused(Throwable throwable) {
return ExtractorHelper.hasExactCauseThrowable(throwable, InterruptedIOException.class, InterruptedException.class);
}
+
+ public static String toUpperCase(String value) {
+ StringBuilder sb = new StringBuilder(value);
+ for (int index = 0; index < sb.length(); index++) {
+ char c = sb.charAt(index);
+ if (Character.isLowerCase(c)) {
+ sb.setCharAt(index, Character.toUpperCase(c));
+ } else {
+ sb.setCharAt(index, Character.toLowerCase(c));
+ }
+ }
+ return sb.toString();
+ }
}
diff --git a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java
index e59ad10b2..4475356fa 100644
--- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java
+++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java
@@ -1,6 +1,7 @@
package org.schabi.newpipe.util;
import android.app.Activity;
+import android.app.PendingIntent;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
@@ -45,6 +46,8 @@ import org.schabi.newpipe.settings.SettingsActivity;
public class NavigationHelper {
public static final String MAIN_FRAGMENT_TAG = "main_fragment_tag";
+ public static final int PENDING_INTENT_OPEN_PLAYER_ACTIVITY = 1546;
+
/*//////////////////////////////////////////////////////////////////////////
// Players
//////////////////////////////////////////////////////////////////////////*/
@@ -269,13 +272,24 @@ public class NavigationHelper {
openServicePlayerControl(context, PopupVideoPlayerActivity.class);
}
- private static void openServicePlayerControl(final Context context, final Class clazz) {
- final Intent intent = new Intent(context, clazz);
+ private static void openServicePlayerControl(final Context context, final Class activityClass) {
+ Intent intent = getServicePlayerControlIntent(context, activityClass);
+ context.startActivity(intent);
+ context.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
+ }
+
+ public static Intent getServicePlayerControlIntent(final Context context, final Class activityClass) {
+ final Intent intent = new Intent(context, activityClass);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}
- context.startActivity(intent);
- context.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
+ return intent;
+ }
+
+ public static PendingIntent getServicePlayerControlPendingIntent(final Context context, final Class activityClass) {
+ Intent intent = getServicePlayerControlIntent(context, activityClass);
+ PendingIntent pIntent = PendingIntent.getActivity(context, PENDING_INTENT_OPEN_PLAYER_ACTIVITY, intent, 0);
+ return pIntent;
}
/*//////////////////////////////////////////////////////////////////////////
diff --git a/app/src/main/res/drawable-hdpi/ic_newpipe_triangle_white.png b/app/src/main/res/drawable-hdpi/ic_newpipe_triangle_white.png
new file mode 100644
index 000000000..cb26a5f65
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_newpipe_triangle_white.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_newpipe_triangle_white.png b/app/src/main/res/drawable-mdpi/ic_newpipe_triangle_white.png
new file mode 100644
index 000000000..fc86823ac
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_newpipe_triangle_white.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_newpipe_triangle_white.png b/app/src/main/res/drawable-xhdpi/ic_newpipe_triangle_white.png
new file mode 100644
index 000000000..b90c55050
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_newpipe_triangle_white.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_newpipe_triangle_white.png b/app/src/main/res/drawable-xxhdpi/ic_newpipe_triangle_white.png
new file mode 100644
index 000000000..acde4439e
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_newpipe_triangle_white.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_newpipe_triangle_white.png b/app/src/main/res/drawable-xxxhdpi/ic_newpipe_triangle_white.png
new file mode 100644
index 000000000..93cfda12d
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_newpipe_triangle_white.png differ
diff --git a/app/src/main/res/layout/player_notification.xml b/app/src/main/res/layout/player_notification.xml
index 2a3e7aff3..bab0c9db3 100644
--- a/app/src/main/res/layout/player_notification.xml
+++ b/app/src/main/res/layout/player_notification.xml
@@ -11,8 +11,6 @@
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="@color/background_notification_color"
- android:clickable="true"
- android:focusable="true"
android:gravity="center_vertical"
android:orientation="horizontal">
diff --git a/app/src/main/res/layout/player_notification_expanded.xml b/app/src/main/res/layout/player_notification_expanded.xml
index 7d59720e0..090642303 100644
--- a/app/src/main/res/layout/player_notification_expanded.xml
+++ b/app/src/main/res/layout/player_notification_expanded.xml
@@ -6,8 +6,6 @@
android:layout_width="match_parent"
android:layout_height="128dp"
android:background="@color/background_notification_color"
- android:clickable="true"
- android:focusable="true"
android:gravity="center_vertical"
android:orientation="horizontal">
diff --git a/app/src/main/res/layout/player_popup.xml b/app/src/main/res/layout/player_popup.xml
index fb3d6920e..299b3b110 100644
--- a/app/src/main/res/layout/player_popup.xml
+++ b/app/src/main/res/layout/player_popup.xml
@@ -92,6 +92,7 @@
android:layout_alignParentRight="true"
android:background="#00ffffff"
android:clickable="true"
+ android:focusable="true"
android:scaleType="fitCenter"
android:src="@drawable/ic_fullscreen_white"
tools:ignore="ContentDescription,RtlHardcoded"/>
diff --git a/assets/new_pipe_icon_5_beta2.svg b/assets/new_pipe_icon_5_beta2.svg
new file mode 100644
index 000000000..d74fd8722
--- /dev/null
+++ b/assets/new_pipe_icon_5_beta2.svg
@@ -0,0 +1,565 @@
+
+
diff --git a/build.gradle b/build.gradle
index c0c46fdc2..fea1f7422 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.0.0'
+ classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files