openvibers/openvibe.live Commits
Media requests: report the yt-dlp-missing failure as itself
Changes
@@@ -5101,12 +5101,12 @@ function _mediaItemHTML(m, pos) {// yt-dlp errors are paragraphs; the queue only has room for the part that matters.function _mediaShortError(err) {const m = String(err || '').toLowerCase();++ if (m.includes('yt-dlp is not available')) return 'The server cannot play media right now.';if (m.includes('bot')) return 'YouTube blocked this on the server (sign-in check).';if (m.includes('private')) return 'This video is private.';if (m.includes('members-only')) return 'This video is members-only.';if (m.includes('age')) return 'This video is age-restricted.';if (m.includes('unavailable') || m.includes('not available')) return 'This video is unavailable.';-- if (m.includes('yt-dlp is not available')) return 'The server cannot play media right now.';return 'This media could not be prepared.';}@@@ -278,12 +278,12 @@ class MediaQueue {/** Turn a yt-dlp wall of text into one line a viewer can act on. */_viewerFacingError(message) {const m = String(message || '').toLowerCase();++ if (m.includes('yt-dlp is not available')) return 'The server cannot play media right now. Refunded.';if (m.includes('bot')) return 'YouTube blocked this video on the server (sign-in check). Refunded.';if (m.includes('private')) return 'That video is private. Refunded.';if (m.includes('members-only')) return 'That video is members-only. Refunded.';if (m.includes('age')) return 'That video is age-restricted. Refunded.';if (m.includes('unavailable') || m.includes('not available')) return 'That video is unavailable. Refunded.';-- if (m.includes('yt-dlp is not available')) return 'The server cannot play media right now. Refunded.';return 'That media could not be played. Refunded.';}
@@ -5101,12 +5101,12 @@ function _mediaItemHTML(m, pos) {
@@ -5101,12 +5101,12 @@ function _mediaItemHTML(m, pos) {
// yt-dlp errors are paragraphs; the queue only has room for the part that matters.
// yt-dlp errors are paragraphs; the queue only has room for the part that matters.
function _mediaShortError(err) {
function _mediaShortError(err) {
const m = String(err || '').toLowerCase();
const m = String(err || '').toLowerCase();
+ if (m.includes('yt-dlp is not available')) return 'The server cannot play media right now.';
if (m.includes('bot')) return 'YouTube blocked this on the server (sign-in check).';
if (m.includes('bot')) return 'YouTube blocked this on the server (sign-in check).';
if (m.includes('private')) return 'This video is private.';
if (m.includes('private')) return 'This video is private.';
if (m.includes('members-only')) return 'This video is members-only.';
if (m.includes('members-only')) return 'This video is members-only.';
if (m.includes('age')) return 'This video is age-restricted.';
if (m.includes('age')) return 'This video is age-restricted.';
if (m.includes('unavailable') || m.includes('not available')) return 'This video is unavailable.';
if (m.includes('unavailable') || m.includes('not available')) return 'This video is unavailable.';
- if (m.includes('yt-dlp is not available')) return 'The server cannot play media right now.';
return 'This media could not be prepared.';
return 'This media could not be prepared.';
}
}
@@ -278,12 +278,12 @@ class MediaQueue {
@@ -278,12 +278,12 @@ class MediaQueue {
/** Turn a yt-dlp wall of text into one line a viewer can act on. */
/** Turn a yt-dlp wall of text into one line a viewer can act on. */
_viewerFacingError(message) {
_viewerFacingError(message) {
const m = String(message || '').toLowerCase();
const m = String(message || '').toLowerCase();
+ if (m.includes('yt-dlp is not available')) return 'The server cannot play media right now. Refunded.';
if (m.includes('bot')) return 'YouTube blocked this video on the server (sign-in check). Refunded.';
if (m.includes('bot')) return 'YouTube blocked this video on the server (sign-in check). Refunded.';
if (m.includes('private')) return 'That video is private. Refunded.';
if (m.includes('private')) return 'That video is private. Refunded.';
if (m.includes('members-only')) return 'That video is members-only. Refunded.';
if (m.includes('members-only')) return 'That video is members-only. Refunded.';
if (m.includes('age')) return 'That video is age-restricted. Refunded.';
if (m.includes('age')) return 'That video is age-restricted. Refunded.';
if (m.includes('unavailable') || m.includes('not available')) return 'That video is unavailable. Refunded.';
if (m.includes('unavailable') || m.includes('not available')) return 'That video is unavailable. Refunded.';
- if (m.includes('yt-dlp is not available')) return 'The server cannot play media right now. Refunded.';
return 'That media could not be played. Refunded.';
return 'That media could not be played. Refunded.';
}
}