mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-30 23:03:00 +00:00 
			
		
		
		
	Added an "isYouTube" check to start of long click handler
This commit is contained in:
		| @@ -3,6 +3,7 @@ package org.schabi.newpipe.player.ui; | ||||
| import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; | ||||
| import static org.schabi.newpipe.MainActivity.DEBUG; | ||||
| import static org.schabi.newpipe.QueueItemMenuUtil.openPopupMenu; | ||||
| import static org.schabi.newpipe.extractor.ServiceList.YouTube; | ||||
| import static org.schabi.newpipe.ktx.ViewUtils.animate; | ||||
| import static org.schabi.newpipe.player.Player.STATE_COMPLETED; | ||||
| import static org.schabi.newpipe.player.Player.STATE_PAUSED; | ||||
| @@ -61,6 +62,7 @@ import org.schabi.newpipe.player.gesture.BasePlayerGestureListener; | ||||
| import org.schabi.newpipe.player.gesture.MainPlayerGestureListener; | ||||
| import org.schabi.newpipe.player.helper.PlaybackParameterDialog; | ||||
| import org.schabi.newpipe.player.helper.PlayerHelper; | ||||
| import org.schabi.newpipe.player.mediaitem.MediaItemTag; | ||||
| import org.schabi.newpipe.player.playqueue.PlayQueue; | ||||
| import org.schabi.newpipe.player.playqueue.PlayQueueAdapter; | ||||
| import org.schabi.newpipe.player.playqueue.PlayQueueItem; | ||||
| @@ -708,6 +710,12 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh | ||||
|  | ||||
|             @Override | ||||
|             public void onItemLongClick(@NonNull final StreamSegmentItem item, final int seconds) { | ||||
|                 @Nullable final MediaItemTag currentMetadata = player.getCurrentMetadata(); | ||||
|                 if (currentMetadata == null | ||||
|                         || currentMetadata.getServiceId() != YouTube.getServiceId()) { | ||||
|                     return; | ||||
|                 } | ||||
|  | ||||
|                 final PlayQueueItem currentItem = player.getCurrentItem(); | ||||
|                 if (currentItem != null) { | ||||
|                     String videoUrl = player.getVideoUrl(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Daniel M
					Daniel M