sync icon indicating copy to clipboard operation
sync copied to clipboard

Catch removed videos and skip to next

Open AdmiralJensen opened this issue 9 years ago • 11 comments

Please add the functionality to skip removed or private videos. As far as I can tell if onError returns a "100" then the video is no longer available.

Thanks.

AdmiralJensen avatar Sep 07 '16 17:09 AdmiralJensen

When you first add a video to the playlist, CyTube will check to make sure it exists and is playable before even adding it. So there are 2 situations that can lead to deleted videos being played on the playlist (taking YouTube as an example):

  1. The video was added to the playlist, but was later deleted from YouTube
  2. The video was added to the channel library, meaning any time it is added to the playlist in the future, the video information will be loaded from the library instead of checking the YouTube API

I'm planning to separate the video information caching from the library, which should make (2) less likely to happen in the future (even if the video exists in the library, the metadata will be looked up again if it hasn't been looked up in the past x days). However, solving (1) and (2) completely is a bit more trouble.

Detecting it clientside is troublesome because you need a way to prevent nefarious users from faking it to skip videos they don't like. You could require a majority or something, but that has complications with people using chat-only mode and essentially amounts to reinventing the existing voteskip feature. Detecting it serverside reliably would require calling out to the source API every time a video plays, which is not ideal, because for the majority of videos there will be no change.

The easiest solution if moderators are unavailable to skip it is to configure the voteskip feature reasonably so that users can skip broken videos.

calzoneman avatar Sep 08 '16 03:09 calzoneman

Thank you for the reply and the thorough explanation. I'll see if there is a way to let users know, or remind them, that a skip feature is available for them. Thanks again!

AdmiralJensen avatar Sep 08 '16 05:09 AdmiralJensen

Letting clients skip videos on their own authority is bad. Having the server check every video is bad. But how about clients asking the server to check the video when they think it's removed?

henke37 avatar Apr 12 '17 06:04 henke37

Seconded. It would work out well for many rooms to have a "Check For Missing" button next to Voteskip, so members can move it along without setting Voteskip really low. Good idea, henke37 👍

AdmiralJensen avatar Apr 12 '17 12:04 AdmiralJensen

No need for a separate button. This doesn't need any buttons, this should be automatic.

henke37 avatar Apr 12 '17 15:04 henke37

It's not really possible to automate on the clientside because the video player APIs don't expose a way to tell that the video has been removed, or distinguish this case from other cases in which the playback fails

On Apr 12, 2017, at 08:28, henke37 [email protected] wrote:

No need for a separate button. This doesn't need any buttons, this should be automatic.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

calzoneman avatar Apr 12 '17 15:04 calzoneman

@henke37 "Should be automatic" but sadly it is not. I've come into the room many a time when a video has been pulled, or the account closed, and it's been that way for hours. We survive though :)

@calzoneman Thanks for the info. If you ever have an AHA moment and figure it out, would be appreciated. Thanks, and thanks for CT.

AdmiralJensen avatar Apr 12 '17 19:04 AdmiralJensen

A few things to bring up here:

  • It would be helpful to quantify the impact. I have been proceeding under the assumption that videos being removed is rare, and that either a moderator is around to handle it, or voteskipping them is not a big deal, so looking into a mitigation strategy for removed videos just hasn't been a priority.
  • Would it improve the situation if the videos were re-checked when adding from the library, or are you mostly concerned about videos that are permanently on the playlist?
  • As noted above, I can't think of a good way to automate detecting broken videos that are actually broken upstream and not just a localized issue (such as a browser that doesn't support the video codec, crappy internet causing the stream to fail, etc.). So it would likely have to be some form of a "report broken video" button.
  • Some more consideration is needed around the user experience. Even if we assume the detection mechanism is solved perfectly, having the server skip/delete videos from the playlist without some kind of notification for why it happened is just going to drive a lot of users to IRC and email to report some "weird bug where sometimes CyTube deletes my videos".

calzoneman avatar Apr 13 '17 05:04 calzoneman

I thought of a potential approach to revalidate videos while avoiding wasteful revalidations: each video could be assigned a "time to live" for its metadata, and would be revalidated if the last time the server looked up that video was beyond the time to live. For example, videos added more than 48 hours ago could be revalidated. I don't have the metrics on the distribution of times between adding and playing a video to determine whether this is a good idea.

This still leaves the unanswered question of what to actually do when a bad video is detected -- remove it from the playlist? flag it with a specific color/icon to indicate it's now unplayable? somehow notify the moderators?

calzoneman avatar Jul 22 '17 18:07 calzoneman

While OP vanished, i'd still like this feature in.

My take would be that the video stays on the playlist but flagged and it would automatically skip the video until a moderator/owner approves or deletes it.

BillTube avatar Oct 12 '17 19:10 BillTube

Maybe clients could automatically report playback errors to the server. Next, the server would issue a re-scan of that video if say 90% of those clients report it as broken. That way you don't really skip anything, and only crawl if there is really demand for it.

luckydonald avatar Jan 07 '19 02:01 luckydonald