From 04bb070afa7f86b0f24f01315964ec7725afc758 Mon Sep 17 00:00:00 2001 From: nmurali94 Date: Tue, 11 Aug 2020 16:53:36 -0400 Subject: [PATCH] Remove timestamp when sharing a live stream --- .../main/java/org/schabi/newpipe/player/VideoPlayerImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 0f98b2296..44bdc1108 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java @@ -880,9 +880,11 @@ public class VideoPlayerImpl extends VideoPlayer private void onShareClicked() { // share video at the current time (youtube.com/watch?v=ID&t=SECONDS) + // Timestamp doesn't make sense in a live stream so drop it + final String ts = isLive() ? "" : ("&t=" + (getPlaybackSeekBar().getProgress() / 1000)); ShareUtils.shareUrl(service, getVideoTitle(), - getVideoUrl() + "&t=" + getPlaybackSeekBar().getProgress() / 1000); + getVideoUrl() + ts); } private void onPlayWithKodiClicked() {