Open XiangRongLin opened 4 years ago
I second this, I would like to have this feature, too. I don't think having a scrollable bar would be a good UI, so I'd say it would be better to add it just below the next video. This would also mean that if someone disabled suggestions, he wouldn't be able to access mixes, but I think this is consistent (i.e. a mix is, actually, a suggestion). But I am not sure. A question: how would you be able to detect that a video presents a mix on youtube? Will you make the function that generates the mix url return null if the video does not have a mix item on the right?
@Stypox: All videos and channels have a mix, and Music videos/songs have a Music mix as well. Channel mixes are RDCM + channel ID, video mixes are RD + video ID, and Music mixes are RDAMVM + Music video/song ID. My mixes also exist, but I'm not sure what they are. I suggest adding a getAvailableMixes()
(or getAvailableRadios()
or whatever) function to ChannelExtractor
s and StreamExtractor
s (and of course also ChannelInfo
and StreamInfo
), which returns an array of mixes that exist for that channel/stream, and adding some button to show available mixes and open them in the ⋮ menu. I actually thought about this as well, but forgot to open an issue. We should also add support for SoundCloud's stations in NewPipeExtractor and also return them in the function to get the available mixes.
I know mixes can always be generated using the base urls and the video id, but YouTube not always shows "Mix" playlists on the right. It would not be useful to show a mix for a video which is not music.
@Stypox: If you want YouTube's behavior exactly, you should make the next videos list use a MixedInfoItemsCollector
and parse the playlists in it as well. However my suggestion was to do the following: adding some button to show available mixes and open them in the ⋮ menu, so that you can always start a mix anywhere.
That would be a good-ui solution, too
Any update on this?
I have no plans so far for this. Even though I implemented the extractor for mixes, now I don't really need that feature anymore. Since the extractor for mixes got recently merged, anyone who wants to do the UI part can do so. I can help with extractor changes if needed (see https://github.com/TeamNewPipe/NewPipe/issues/3583#issuecomment-628522388)
A new UI solution is also needed since the proposed UI-solution from @wb9688 doesn't work anymore since the 3dot menu doesn't exist anymore.
However my suggestion was to do the following: adding some button to show available mixes and open them in the ⋮ menu, so that you can always start a mix anywhere.
Another idea would be to add buttons after #4534 is merged. I haven't looked at it too closely, but i hope that its dynamic. Meaning if more buttons get added it will expand into new rows if necessary. This would cover video mixes. For channel mixes the 3dot option can be used.
I would recommend carving out the channel mixes out from here and only implement "normal" mixes first.
The discussion about how to handle them can also be moved into a seperate issue
Ok, good idea. Another two questions:
getMixUrls()
to StreamExtractor
or to StreamLinkHandlerFactory
? The advantage of the first approach would be that the mix urls could be generated based on the information of an extracted StreamInfo
(it's not needed for youtube but it may be for other services); the advantage of the second approach is that mix urls could be generated just with the video id (but it may not be enough for some services). So I'd go with the StreamExtractor
approach.getMixUrls()
return? A List<String>
would be the simpler approach (with two/three urls for youtube: normal mix and yt music mix, possibly also the channel mix), but then how dowe distinguish between the two/three link in order to be able to correctly show the labels in the app (i.e. Mix, Music mix, Channel mix)? Do we just use the index in the List
? Maybe we could instead make two/three methods: getMixUrl()
, getSecondaryMixUrl()
(, getChannelMixUrl()
)?Instead of distinguishing it by the order, why not wrap the String into a small class with a type field. The type field could either be another String or an enum or some sort. So this way the diffentiation is explicit in the type
field instead of implicit from the order. Downside is the overhead of the wrapper class.
class Mix {
static String YOUTUBE_MIX = "youtube_mix";
String type;
String url;
}
But non the less I would take the List<T>
approach over the one with multiple methods. Here the method number could grow very big, depending on what the specific services need.
What could also be done is public String getMixUrl(String type)
because usually you don't need the urls for all types of mixes, but just the one that you want to display now. Same here, instead of String an enum could be used
I like the public String getMixUrl(String type)
approach. Let's use an enum so as to reduce typing errors.
Describe the feature you want
Start a YouTube (music) mix from the video details screen
Is your feature request related to a problem? Please describe it
With TeamNewPipe/NewPipeExtractor#280 coming soon ™, i want to be able to start them from NewPipe. Currently i have to share them from the YouTube App to my debug build version and save the playlist.
Related Issue for youtube music mix; #3250
Additional context
~I am willing to implement it myself, but i want to get suggestions for the UI.~ I also want to know if this is possible/wanted, since it is a youtube only feature Possible would be:
How will you/everyone benefit from this feature?
Allow user to get an easily accessible "radio" feature for YouTube