im85288 / service.upnext

GNU General Public License v2.0
81 stars 42 forks source link

Request: Add button/option for Shuffle/Random playback #224

Open nuentes opened 3 years ago

nuentes commented 3 years ago

The issue: UpNext does not play very well with RandomTV. This is understandable since the two services are entirely unrelated. However, when I initiate a RandomTV playback of a TV series via context menu, I constantly get UpNext appearing at the end of the episode. However, RandomTV does continue doing it's thing randomizing episodes, when it reaches the end of my timeout rule (5 episodes), UpNext takes over and continues from that point. Or if I play a random episode of a TV series launched from a widget, UpNext can only resume with linear playback, rather than random.

The Solution: UpNext could integrate RandomTV via an dependancy (or by simply reinventing the wheel). Enabling random playback could be an option in the settings, and ticking this box adds another button to the OSD for shuffle playback. The three options could be "Continue"/"Shuffle"/"Close". When UpNext is in shuffle mode, the 3 buttons at the top could be "Continue Shuffling"/"Continue From Here"/"Close"

I would love to see UpNext embrace a non-linear playback method.

dagwieers commented 3 years ago

If this is about playing local content, then the RandomTV add-on does not initiate and cannot instruct what to play next.

One solution is that your add-on, rather than playing the local content, plays a plugin://script.video.randomtv URL which points to your own endpoint which initiates the local playback. In this case your add-on has full control what to play next and tell Up Next about it.

This would not give you the option to "Continue", or at least "Continue" in this case would mean play the next thing your add-on proposed, which probably would be another random episode.

Did you consider that the local Kodi library could already consist of plugin:// locations, rather than local media? Because in that case Up Next would follow that add-ons integration, which would not be random. It either would not do anything, or play the next episode.

dagwieers commented 3 years ago

I don't think we want to add a "Shuffle" button in our interface. We want to make the interface as simple as possible.

im85288 commented 3 years ago

Have to agree here, this addon is only about playing the next episode to facilitate a Netflix style binge watching. Shuffle mode would not make sense to be included here.

nuentes commented 3 years ago

I'm proposing an opt-in option, rather than an opt-out. If a user would like the ability to shuffle, I don't see the harm in providing that as an option which may result in OSD clutter. The add-on would still be living up to it's purpose by simply telling the user what is "Up Next". If that's a shuffled episode or the next chronological episode would become irrelevent.

I'm not having trouble with the two services. They are both working. I just feel that they could be combined into one service that works more seamlessly.

dagwieers commented 3 years ago

The pop-up already shows the next episode, having then the shuffle button would be really confusing IMO. (Would you shuffle inside the running TV Show, or any random TV show? How would this work for non-local media content?)

Also the use-case for a random episode starts from the user who wants this, Up Next does not provide an entrypoint for this use-case. So I don't think the functionality belongs inside UpNext, and since your add-on is not driving UpNext this would be impossible to integrate better.

Maybe an option to disable UpNext for local content may be useful so people can decide to turn it off when they are using RandomTV.

im85288 commented 3 years ago

Yes perhaps an option to disable would be best or to do it automatically like it used to do when pseudoTV was detected (as it also provide a sort of random auto tv episode function)

michaelarnauts commented 3 years ago

This is a really specific use case, and doesn't really belong in UpNext in my opinion. You could however provide such a functionality in the Random TV addon itself.

MoojMidge commented 3 years ago

However, when I initiate a RandomTV playback of a TV series via context menu, I constantly get UpNext appearing at the end of the episode. However, RandomTV does continue doing it's thing randomizing episodes, when it reaches the end of my timeout rule (5 episodes), UpNext takes over and continues from that point.

RandomTV looks like it works by creating and playing a playlist. This should work with UpNext without issue, except UpNext currently has a few issues with playlist handling. However I'm not sure if those issues effect the interaction of these two addons.

Can you describe in greater detail what actually happens here? Step by step if possible, including what you expect or wish to happen?

I tend to agree that playing random episodes is not something UpNext should be doing (its not UpRandom), but handling an existing playlist of random episodes should work.

nuentes commented 3 years ago

Man, I didn't expect to get so much negative feedback on this. Please, try to remember that Netflix has been considering adding this recently. So if Netflix adds it, would UpNext?

Somewhere along the line, it seems like I gave the impression that I'm involved with RandomTV. I'm not a developer for RandomTV.

The pop-up already shows the next episode, having then the shuffle button would be really confusing IMO. (Would you shuffle inside the running TV Show, or any random TV show? How would this work for non-local media content?)

I typically will select a TV series node and via context menu select Play With RandomTV. RandomTV then generates a playlist which starts playing. However, while this playlist is running, UpNext tells me that the next chronological episode is up, rather than telling me the next episode queued in the playlist. The other way that I play random episode is via widgets I use on my Kodi skin (Arctic Zephyr 2). I have a widget that simply shows a bunch of random episodes of random shows, and I will occasionally play something from there. When I do this playback, I have no way to resume with random playback. I don't see that these features are completely disparate and non-complementary. As for non-local media - I have no idea. RandomTV doesn't currently work on my non-local media.

I tend to agree that playing random episodes is not something UpNext should be doing (its not UpRandom)

Look, I'm not a part of this project, but I just feel like this is backwards thinking. The job of the extension is to tell you the next thing that is queued. Literally telling the user what is "Up Next". I just feel that the way in which that next item is queued could/should be up to the user.

im85288 commented 3 years ago

I wouldn't see it as negative feedback rather us trying to understand the requirement properly. I think as @MoojMidge mentioned the issue here is that upNext is not currently dealing with playlists very well.

I think it would be great to have it respecting the playlist and stating that episode or maybe even movie is the next one to watch.

Let's see what the others think, but yes I feel that would be a great addition.

MoojMidge commented 3 years ago

@nuentes I wasn't trying to be negative, but while almost anything can be done, it still requires time and effort. So if another addon already performs the function of creating the random playlist, then, personally, I think the time and effort would be better spent fixing the interaction between UpNext and the other addon, rather than trying to fully replicate the functionality of the other addon in UpNext, especially as the problem you are describing appears to be a general issue with playlist handling.

Thats just my opinion as a fellow user, which is no more, or less, valid than your own. For what its worth I agree with this:

The job of the extension is to tell you the next thing that is queued. Literally telling the user what is "Up Next".

Either way the underlying playlist handling issue should be fixed.

RandomTV then generates a playlist which starts playing. However, while this playlist is running, UpNext tells me that the next chronological episode is up, rather than telling me the next episode queued in the playlist.

Ok, so this looks like a variation of the issue reported in #134 and #203 - UpNext always looks at the playlist for current episode information, then checks the library for the next episode, rather than properly checking whether addon data or other playlist entries are available.

The other way that I play random episode is via widgets I use on my Kodi skin (Arctic Zephyr 2). I have a widget that simply shows a bunch of random episodes of random shows, and I will occasionally play something from there. When I do this playback, I have no way to resume with random playback.

This is something that UpNext really can't handle because it doesn't know what content is in the widget.

nuentes commented 3 years ago

I wasn't trying to be negative, but while almost anything can be done, it still requires time and effort. So if another addon already performs the function of creating the random playlist, then, personally, I think the time and effort would be better spent fixing the interaction between UpNext and the other addon, rather than trying to fully replicate the functionality of the other addon in UpNext, especially as the problem you are describing appears to be a general issue with playlist handling.

No worries. I feel like this thread has received a lot of responses from contributors saying they hate the idea, so I wasn't necessarily calling you out specifically.

This is something that UpNext really can't handle because it doesn't know what content is in the widget.

I don't necessarily want it to continue playing the widget. That's actually the last thing I would want. I would want it to continue playing this specific show. After I select a show from the widget, UpNext correctly comes up at the end of the episode, and then it will offer playback of the next chronological episode. This is the primary scenario I'd want an OSD shuffle button, I suppose.

MoojMidge commented 3 years ago

@nuentes Ok so is the idea something like this?

  1. Widget is populated with random episodes from random shows
  2. User plays one of the random episodes
  3. At the end of the episode UpNext shows a popup with either: -- The next episode from the same show; or -- A random episode from the same show.

The problem with this is is that by the time UpNext displays a popup, it has already processed the currently playing video to select the next video, not a random video.

Something like the following could be done with a bit of work, but it would also require existing skins that already integrate with UpNext to be updated.

  1. Widget is populated with random episodes from random shows
  2. User plays one of the random episodes
  3. At the end of the episode UpNext shows a popup with the next episode from the same show
  4. There is a small shuffle button on the popup that will reload the popup with a random episode, and continue to load random episodes on subsequent popups until playback is stopped.
nuentes commented 3 years ago

Ok so is the idea something like this?

  1. Widget is populated with random episodes from random shows
  2. User plays one of the random episodes
  3. At the end of the episode UpNext shows a popup with either: -- The next episode from the same show; or -- A random episode from the same show.

More or less. Most of the widgets I use are populated from Smart Playlists I've created. So even the random episode / show widget I use is based on a Smart Playlist that I've customized to remove certain series that I would never want to watch a random episode of. But in addition to this, I also have widgets for non-random holiday episodes. For example, right now I have a playlist that searches for all Halloween-themed episodes in my catalog. After I watch a Halloween episode from this widget, UpNext suggests watching the next chronological episode from that series. I'm not even sure what I would want from UpNext in this scenario, to be completely honest. I feel it would make slightly more sense if it tried to play a different Halloween episode from the playlist, though. But I suppose there is a possibility I would want to play a specific episode of, say, The Office, and then shuffle random episodes of The Office afterwards.

The problem with this is is that by the time UpNext displays a popup, it has already processed the currently playing video to select the next video, not a random video.

Yes, this is what I assumed. However, it seemed like the next episode could be recalculated OTF at the users request.

Something like the following could be done with a bit of work, but it would also require existing skins that already integrate with UpNext to be updated.

  1. Widget is populated with random episodes from random shows
  2. User plays one of the random episodes
  3. At the end of the episode UpNext shows a popup with the next episode from the same show
  4. There is a small shuffle button on the popup that will reload the popup with a random episode, and continue to load random episodes on subsequent popups until playback is stopped.

Yeah, that's almost exactly what I want. I just don't think this functionality needs to be limited to widget playback. As I said before, what if I want to play a specific episode, and then shuffle that series afterwards. Why don't we just remove the first step?

  1. User plays an episode of a series
  2. At the end of the episode UpNext shows a popup with the next episode from the same show
  3. There is a small shuffle button on the popup that will reload the popup with a random episode, and continue to load random episodes on subsequent popups until playback is stopped.
MoojMidge commented 3 years ago

More or less. Most of the widgets I use are populated from Smart Playlists I've created. So even the random episode / show widget I use is based on a Smart Playlist that I've customized to remove certain series that I would never want to watch a random episode of. But in addition to this, I also have widgets for non-random holiday episodes. For example, right now I have a playlist that searches for all Halloween-themed episodes in my catalog. After I watch a Halloween episode from this widget, UpNext suggests watching the next chronological episode from that series. I'm not even sure what I would want from UpNext in this scenario, to be completely honest. I feel it would make slightly more sense if it tried to play a different Halloween episode from the playlist, though. But I suppose there is a possibility I would want to play a specific episode of, say, The Office, and then shuffle random episodes of The Office afterwards.

There are a lot of options and variations you have described here, better to have a dedicated addon to handle this kind of functionality or just play the smart playlist directly (once the bugs with playlist handling are fixed in UpNext)

Yes, this is what I assumed. However, it seemed like the next episode could be recalculated OTF at the users request.

Easier said than done... the bits of code that would need to change, in their current form, do not lend themselves to making such a change in a straightforward manner.

Yeah, that's almost exactly what I want. I just don't think this functionality needs to be limited to widget playback.

It wouldn't be limited to widgets as UpNext has no idea about skin widgets or what/where/how playback is initiated, unless it is from an addon that integrates with UpNext, or a playlist. I was just trying to understand what steps you were following.

My SO has requested pretty much the same thing so she can watch random episodes of her favourite shows, so i'll probably end up doing this. Can then see what the feedback is, once there is a working implementation.

nuentes commented 3 years ago

There are a lot of options and variations you have described here, better to have a dedicated addon to handle this kind of functionality or just play the smart playlist directly (once the bugs with playlist handling are fixed in UpNext)

I'm not really calling these bugs. This was all a feature request anyway. I never meant to imply that UpNext was not functioning correctly. I just feel like it would be better if it added a randomization functionality.

My SO has requested pretty much the same thing so she can watch random episodes of her favourite shows, so i'll probably end up doing this. Can then see what the feedback is, once there is a working implementation.

Sounds awesome. Thanks a bunch. Where can I go to buy you a beer?

dagwieers commented 3 years ago

I never meant to imply that UpNext was not functioning correctly.

You did not have to, we already established that UpNext has a few important bugs we need to squash. And I think that may be part of the down-to-earth responses.

We need to first fix the issues we have before we can think about new functionality. And if we add new functionality, we need to make sure we deliver something that is still manageable. Something I feel we failed to do.

MoojMidge commented 3 years ago

Sounds awesome. Thanks a bunch. Where can I go to buy you a beer?

It's all good. But don't get too excited anyway - its just an idea, and as @dagwieers indicated, its important to make sure that anything that gets added is relevant, and can be maintained by the people who are spending their free time to do so. Not much point adding a rear spoiler to a car with a flat tyre.

It seems like this is a feature that not many people would use and if not many people use it, it is almost inevitable that it will become buggy at some point, just like the playlist handling that causes a problem with the RandomTV addon.

dagwieers commented 3 years ago

@nuentes I looked at PseudoTV, and it seems that a random mode would fit the use-case of PseudoTV quite neatly.

cc @Lunatixz

nuentes commented 3 years ago

PseudoTV has always been extremely slow for me. I gave up trying to make it work years ago, and have decided to instead basically replicate the experience via widgets. I know there is a new version out now which I'm considering trying out, but I now essentially prefer the config I've developed on my own.

Lunatixz commented 3 years ago

@nuentes you are probably thinking of the old project, the new project found here: https://forum.kodi.tv/showthread.php?tid=355549

IMO I think any playlist handling is best served by creating an independent script or creating a custom smartplaylist.... shoehorning into upnext may not be the best solution.