diff --git a/app/src/main/java/org/schabi/newpipe/player/NotificationUtil.java b/app/src/main/java/org/schabi/newpipe/player/NotificationUtil.java
index 62f1d5dc2..510e4f882 100644
--- a/app/src/main/java/org/schabi/newpipe/player/NotificationUtil.java
+++ b/app/src/main/java/org/schabi/newpipe/player/NotificationUtil.java
@@ -146,7 +146,11 @@ public final class NotificationUtil {
notificationBuilder.setContentText(player.getUploaderName());
notificationBuilder.setTicker(player.getVideoTitle());
updateActions(notificationBuilder, player);
- setLargeIcon(notificationBuilder, player);
+ final boolean showThumbnail = player.sharedPreferences.getBoolean(
+ player.context.getString(R.string.show_thumbnail_key), true);
+ if (showThumbnail) {
+ setLargeIcon(notificationBuilder, player);
+ }
}
diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java
index fa016e158..3d626bb37 100644
--- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java
+++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java
@@ -671,9 +671,13 @@ public class VideoPlayerImpl extends VideoPlayer
super.onUpdateProgress(currentProgress, duration, bufferPercent);
updateProgress(currentProgress, duration, bufferPercent);
+ final boolean showThumbnail =
+ sharedPreferences.getBoolean(
+ context.getString(R.string.show_thumbnail_key),
+ true);
// setMetadata only updates the metadata when any of the metadata keys are null
- mediaSessionManager.setMetadata(getVideoTitle(), getUploaderName(), getThumbnail(),
- duration);
+ mediaSessionManager.setMetadata(getVideoTitle(), getUploaderName(),
+ showThumbnail ? getThumbnail() : null, duration);
}
@Override
diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml
index 9c9fa4853..75c090e84 100644
--- a/app/src/main/res/values/settings_keys.xml
+++ b/app/src/main/res/values/settings_keys.xml
@@ -222,6 +222,8 @@
feed_update_threshold_key
300
+ show_thumbnail_key
+
- @string/feed_update_threshold_option_always_update
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 394a78d0c..60d2dc313 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -681,4 +681,6 @@
Created by %s
By %s
Playlist page
+ Show thumbnail
+ Show thumbnail on lock screen as background and inside notifications
diff --git a/app/src/main/res/xml/notification_settings.xml b/app/src/main/res/xml/notification_settings.xml
index 65d4af48a..5d937efa6 100644
--- a/app/src/main/res/xml/notification_settings.xml
+++ b/app/src/main/res/xml/notification_settings.xml
@@ -17,6 +17,13 @@
android:title="@string/notification_colorize_title"
app:iconSpaceReserved="false" />
+
+