NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Handle properly video with list param in URLs

Open edrex opened this issue 8 years ago • 10 comments

  • [x] I carefully read the contribution guidelines and agree to them.
  • [x] I checked if the issue/feature exists in the latest version.

Hi, I got on NewPipe via F-Droid several months ago as a replacement for FireTube. Very happy this exists. Thanks devs!

I just updated to get the new Playlist support https://github.com/TeamNewPipe/NewPipe/pull/680 in 0.11, and am testing it out. Thanks @karyogamy!

Sharing ~~playlists~~ play queues from the official YouTube Android app, for example http://www.youtube.com/watch?v=HQxJniJHYcU&list=RDHQxJniJHYcU currently only plays the ~~first~~ current item in NewPipe. It would be cool if instead the list in the list param were loaded into the NewPipe play queue view, with the current item playing, like the YouTube app does (but see below). Now that playlist support is available I imagine this should be fairly easy to wire up.

If I missed something and this actually works feel free to close, thanks.

edrex avatar Dec 20 '17 06:12 edrex

Here's an intent capture using intent interceptor. Really TMI, basically it seems to come down to prioritizing the the "list" param from the URL, if present, and then using the "watch" param to set the play cursor.

intent:#Intent;action=android.intent.action.SEND;type=text/plain;launchFlags=0x1b080000;S.android.intent.extra.SUBJECT=Watch%20%22Mix%20-%20You're%20on%20Fire%22%20on%20YouTube;S.android.intent.extra.TEXT=Mix%20-%20You're%20on%20Fire%3A%20http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHQxJniJHYcU%26list%3DRDHQxJniJHYcU;end 
------------ 
ACTION: android.intent.action.SEND 
MIME: text/plain 
URI: intent:#Intent;action=android.intent.action.SEND;type=text/plain;launchFlags=0x1b080000;S.android.intent.extra.SUBJECT=Watch%20%22Mix%20-%20You're%20on%20Fire%22%20on%20YouTube;S.android.intent.extra.TEXT=Mix%20-%20You're%20on%20Fire%3A%20http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHQxJniJHYcU%26list%3DRDHQxJniJHYcU;end 
FLAGS: 
FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET 
FLAG_ACTIVITY_FORWARD_RESULT 
FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT 
FLAG_ACTIVITY_PREVIOUS_IS_TOP 
FLAG_RECEIVER_FOREGROUND 
EXTRAS: 
1 Class: java.lang.String 
Key: android.intent.extra.SUBJECT 
Value: Watch "Mix - You're on Fire" on YouTube 
2 Class: java.lang.String 
Key: android.intent.extra.TEXT 
Value: Mix - You're on Fire: http://www.youtube.com/watch?v=HQxJniJHYcU&list=RDHQxJniJHYcU 

------------ 
MATCHING ACTIVITIES: 
Bluetooth (com.android.bluetooth - com.android.bluetooth.opp.BluetoothOppLauncherActivity) 
...
NewPipe (org.schabi.newpipe - org.schabi.newpipe.RouterActivity) 
NewPipe popup mode (org.schabi.newpipe - org.schabi.newpipe.RouterPopupActivity) 
... 

edrex avatar Dec 20 '17 17:12 edrex

Ah, I see. This happens when sharing a playlist from the Youtube app's play queue. You are right, it is just the order that needs to be switched here.

For the time being, the playlist needs to be opened directly through the playlist activity on Youtube's app:

karyogamy avatar Dec 20 '17 18:12 karyogamy

Oh I see, I didn't really understand the distinction between the playlist activity and the play queue in the official app. Awesome!

For comparison, the playlist intent:

intent:#Intent;action=android.intent.action.SEND;type=text/plain;launchFlags=0x10080001;S.android.intent.extra.SUBJECT=Watch%20%22They%20Might%20Be%20Giants%20-%20Nanobots%20(2013)%22%20on%20YouTube;S.android.intent.extra.TEXT=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLKSo9wM81XLhv1prkgj_VubVI0cHe7_LP;end 
------------ 
ACTION: android.intent.action.SEND 
MIME: text/plain 
URI: intent:#Intent;action=android.intent.action.SEND;type=text/plain;launchFlags=0x10080001;S.android.intent.extra.SUBJECT=Watch%20%22They%20Might%20Be%20Giants%20-%20Nanobots%20(2013)%22%20on%20YouTube;S.android.intent.extra.TEXT=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLKSo9wM81XLhv1prkgj_VubVI0cHe7_LP;end 
FLAGS: 
FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET 
FLAG_GRANT_READ_URI_PERMISSION 
FLAG_RECEIVER_FOREGROUND 
EXTRAS: 
1 Class: java.lang.String 
Key: android.intent.extra.SUBJECT 
Value: Watch "They Might Be Giants - Nanobots (2013)" on YouTube 
2 Class: java.lang.String 
Key: android.intent.extra.TEXT 
Value: https://www.youtube.com/playlist?list=PLKSo9wM81XLhv1prkgj_VubVI0cHe7_LP 

------------ 
MATCHING ACTIVITIES: 
Bluetooth (com.android.bluetooth - com.android.bluetooth.opp.BluetoothOppLauncherActivity) 
...

------------ 
onActivityResult: 
resultCode: 0 

edrex avatar Dec 20 '17 19:12 edrex

screenshot_20171220-121056

screenshot_20171220-120825

screenshot_20171220-122119

edrex avatar Dec 20 '17 19:12 edrex

Sorry about the giant screencaps, still figuring out how to file a bug on android 😃

edrex avatar Dec 20 '17 20:12 edrex

One other thing I noticed in testing is the lack of support for the t param for watch URLs. Not sure if there is an existing issue but that is independent.

edrex avatar Dec 20 '17 20:12 edrex

Moving updated text from screenshot comment here to make sure it gets seen:

Updated the title and issue description (changes in italics).

I guess the expected behavior would be the same as in the YouTube app, so I tested it by selecting the following URL with no default handler set, opening first in YouTube app (first two images) and then in NewPipe.

https://m.youtube.com/watch?list=PLKSo9wM81XLhv1prkgj_VubVI0cHe7_LP&params=OAFIAVgD&v=mwNrUK2LVTg&t=60&mode=NORMAL

YouTube app has a "Watch" activity which supports the same params as the web app for "/watch&v=foo&list=bar&t=x" URLs:

  • It has UI for the current playlist, and the current track is highlighted.
  • The t (seek) param is used to set the play head position relative to the start of the track.
  • It's not loaded into a persistent local queue by default. For that you have to select "Add to+".

It seems like maybe NewPipe should follow suit, and add playlist support to the default watch views. Not sure. Anyway, that's what I found testing :)

edrex avatar Dec 20 '17 20:12 edrex

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 01 '18 20:12 stale[bot]

The same thing (will) happen with PeerTube playlists.

B0pol avatar May 09 '20 22:05 B0pol

maybe related:

  • https://github.com/TeamNewPipe/NewPipe/issues/12513
  • https://github.com/TeamNewPipe/NewPipeExtractor/issues/671

goyalyashpal avatar Nov 12 '25 18:11 goyalyashpal