mirror of https://github.com/calzoneman/sync.git
Remove references to defunct services
Imgur discontinued support for albums SmashCast/Hitbox disappeared Ustream was sunset by IBM Mixer is dead Picasa is long dead Vidme is long dead IE11 is dead
This commit is contained in:
parent
3ea16944d2
commit
0e3307b9f4
|
@ -20,9 +20,6 @@ var order = [
|
||||||
'livestream.com.coffee',
|
'livestream.com.coffee',
|
||||||
'custom-embed.coffee',
|
'custom-embed.coffee',
|
||||||
'rtmp.coffee',
|
'rtmp.coffee',
|
||||||
'smashcast.coffee',
|
|
||||||
'ustream.coffee',
|
|
||||||
'imgur.coffee',
|
|
||||||
'hls.coffee',
|
'hls.coffee',
|
||||||
'twitchclip.coffee',
|
'twitchclip.coffee',
|
||||||
'update.coffee'
|
'update.coffee'
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
window.ImgurPlayer = class ImgurPlayer extends EmbedPlayer
|
|
||||||
constructor: (data) ->
|
|
||||||
if not (this instanceof ImgurPlayer)
|
|
||||||
return new ImgurPlayer(data)
|
|
||||||
|
|
||||||
@load(data)
|
|
||||||
|
|
||||||
load: (data) ->
|
|
||||||
data.meta.embed =
|
|
||||||
tag: 'iframe'
|
|
||||||
src: "https://imgur.com/a/#{data.id}/embed"
|
|
||||||
super(data)
|
|
|
@ -1,12 +0,0 @@
|
||||||
window.SmashcastPlayer = class SmashcastPlayer extends EmbedPlayer
|
|
||||||
constructor: (data) ->
|
|
||||||
if not (this instanceof SmashcastPlayer)
|
|
||||||
return new SmashcastPlayer(data)
|
|
||||||
|
|
||||||
@load(data)
|
|
||||||
|
|
||||||
load: (data) ->
|
|
||||||
data.meta.embed =
|
|
||||||
src: "https://www.smashcast.tv/embed/#{data.id}"
|
|
||||||
tag: 'iframe'
|
|
||||||
super(data)
|
|
|
@ -3,7 +3,6 @@ TYPE_MAP =
|
||||||
vi: VimeoPlayer
|
vi: VimeoPlayer
|
||||||
dm: DailymotionPlayer
|
dm: DailymotionPlayer
|
||||||
gd: GoogleDrivePlayer
|
gd: GoogleDrivePlayer
|
||||||
gp: VideoJSPlayer
|
|
||||||
fi: FilePlayer
|
fi: FilePlayer
|
||||||
sc: SoundCloudPlayer
|
sc: SoundCloudPlayer
|
||||||
li: LivestreamPlayer
|
li: LivestreamPlayer
|
||||||
|
@ -11,9 +10,6 @@ TYPE_MAP =
|
||||||
tv: TwitchPlayer
|
tv: TwitchPlayer
|
||||||
cu: CustomEmbedPlayer
|
cu: CustomEmbedPlayer
|
||||||
rt: RTMPPlayer
|
rt: RTMPPlayer
|
||||||
hb: SmashcastPlayer
|
|
||||||
us: UstreamPlayer
|
|
||||||
im: ImgurPlayer
|
|
||||||
hl: HLSPlayer
|
hl: HLSPlayer
|
||||||
sb: StreamablePlayer
|
sb: StreamablePlayer
|
||||||
tc: TwitchClipPlayer
|
tc: TwitchClipPlayer
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
window.UstreamPlayer = class UstreamPlayer extends EmbedPlayer
|
|
||||||
constructor: (data) ->
|
|
||||||
if not (this instanceof UstreamPlayer)
|
|
||||||
return new UstreamPlayer(data)
|
|
||||||
|
|
||||||
@load(data)
|
|
||||||
|
|
||||||
load: (data) ->
|
|
||||||
data.meta.embed =
|
|
||||||
tag: 'iframe'
|
|
||||||
src: "https://www.ustream.tv/embed/#{data.id}?html5ui"
|
|
||||||
super(data)
|
|
|
@ -158,11 +158,14 @@ PlaylistModule.prototype.load = function (data) {
|
||||||
}
|
}
|
||||||
} else if (item.media.type === "gd") {
|
} else if (item.media.type === "gd") {
|
||||||
delete item.media.meta.gpdirect;
|
delete item.media.meta.gpdirect;
|
||||||
} else if (["vm", "jw", "mx", "im"].includes(item.media.type)) {
|
} else if (["vm", "jw", "mx", "im", "gp", "us", "hb"].includes(item.media.type)) {
|
||||||
// JW has been deprecated for a long time
|
// JW has been deprecated for a long time
|
||||||
// VM shut down in December 2017
|
// VM shut down in December 2017
|
||||||
// Mixer shut down in July 2020
|
// Mixer shut down in July 2020
|
||||||
// Dunno when imgur album embeds stopped working but they don't work either
|
// Imgur replaced albums with a feature called galleries in 2019
|
||||||
|
// Picasa shut down in 2016
|
||||||
|
// Ustream was sunset by IBM in September 2018
|
||||||
|
// SmashCast (Hitbox) seemed to just vanish November 2020
|
||||||
LOGGER.warn(
|
LOGGER.warn(
|
||||||
"Dropping playlist item with deprecated type %s",
|
"Dropping playlist item with deprecated type %s",
|
||||||
item.media.type
|
item.media.type
|
||||||
|
|
|
@ -278,47 +278,6 @@ var Getters = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/* ustream.tv */
|
|
||||||
us: function (id, callback) {
|
|
||||||
var m = id.match(/(channel\/[^?&#]+)/);
|
|
||||||
if (m) {
|
|
||||||
id = m[1];
|
|
||||||
} else {
|
|
||||||
callback("Invalid ID", null);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = {
|
|
||||||
host: "www.ustream.tv",
|
|
||||||
port: 443,
|
|
||||||
path: "/" + id,
|
|
||||||
method: "GET",
|
|
||||||
timeout: 1000
|
|
||||||
};
|
|
||||||
|
|
||||||
urlRetrieve(https, options, function (status, data) {
|
|
||||||
if(status !== 200) {
|
|
||||||
callback("Ustream HTTP " + status, null);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Yes, regexing this information out of the HTML sucks.
|
|
||||||
* No, there is not a better solution -- it seems IBM
|
|
||||||
* deprecated the old API (or at least replaced with an
|
|
||||||
* enterprise API marked "Contact sales") so fuck it.
|
|
||||||
*/
|
|
||||||
var m = data.match(/https:\/\/www\.ustream\.tv\/embed\/(\d+)/);
|
|
||||||
if (m) {
|
|
||||||
var title = "Ustream.tv - " + id;
|
|
||||||
var media = new Media(m[1], title, "--:--", "us");
|
|
||||||
callback(false, media);
|
|
||||||
} else {
|
|
||||||
callback("Channel ID not found", null);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
/* rtmp stream */
|
/* rtmp stream */
|
||||||
rt: function (id, callback) {
|
rt: function (id, callback) {
|
||||||
var title = "Livestream";
|
var title = "Livestream";
|
||||||
|
@ -391,28 +350,6 @@ var Getters = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/* hitbox.tv / smashcast.tv */
|
|
||||||
hb: function (id, callback) {
|
|
||||||
var m = id.match(/([\w-]+)/);
|
|
||||||
if (m) {
|
|
||||||
id = m[1];
|
|
||||||
} else {
|
|
||||||
callback("Invalid ID", null);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var title = "Smashcast - " + id;
|
|
||||||
var media = new Media(id, title, "--:--", "hb");
|
|
||||||
callback(false, media);
|
|
||||||
},
|
|
||||||
|
|
||||||
/* vid.me */
|
|
||||||
vm: function (id, callback) {
|
|
||||||
process.nextTick(
|
|
||||||
callback,
|
|
||||||
"As of December 2017, vid.me is no longer in service."
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
/* streamable */
|
/* streamable */
|
||||||
sb: function (id, callback) {
|
sb: function (id, callback) {
|
||||||
if (!/^[\w-]+$/.test(id)) {
|
if (!/^[\w-]+$/.test(id)) {
|
||||||
|
@ -439,13 +376,6 @@ var Getters = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/* mixer.com */
|
|
||||||
mx: function (id, callback) {
|
|
||||||
process.nextTick(
|
|
||||||
callback,
|
|
||||||
"As of July 2020, Mixer is no longer in service."
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
@ -38,8 +38,7 @@ Media.prototype = {
|
||||||
scuri: this.meta.scuri,
|
scuri: this.meta.scuri,
|
||||||
embed: this.meta.embed,
|
embed: this.meta.embed,
|
||||||
gdrive_subtitles: this.meta.gdrive_subtitles,
|
gdrive_subtitles: this.meta.gdrive_subtitles,
|
||||||
textTracks: this.meta.textTracks,
|
textTracks: this.meta.textTracks
|
||||||
mixer: this.meta.mixer
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -193,14 +193,10 @@
|
||||||
return "https://twitch.tv/" + id;
|
return "https://twitch.tv/" + id;
|
||||||
case "rt":
|
case "rt":
|
||||||
return id;
|
return id;
|
||||||
case "us":
|
|
||||||
return "https://ustream.tv/channel/" + id;
|
|
||||||
case "gd":
|
case "gd":
|
||||||
return "https://docs.google.com/file/d/" + id;
|
return "https://docs.google.com/file/d/" + id;
|
||||||
case "fi":
|
case "fi":
|
||||||
return id;
|
return id;
|
||||||
case "hb":
|
|
||||||
return "https://www.smashcast.tv/" + id;
|
|
||||||
case "hl":
|
case "hl":
|
||||||
return id;
|
return id;
|
||||||
case "sb":
|
case "sb":
|
||||||
|
@ -218,10 +214,8 @@
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "li":
|
case "li":
|
||||||
case "tw":
|
case "tw":
|
||||||
case "us":
|
|
||||||
case "rt":
|
case "rt":
|
||||||
case "cu":
|
case "cu":
|
||||||
case "hb":
|
|
||||||
case "hl":
|
case "hl":
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -38,14 +38,10 @@ function formatURL(data) {
|
||||||
return "https://twitch.tv/" + data.id;
|
return "https://twitch.tv/" + data.id;
|
||||||
case "rt":
|
case "rt":
|
||||||
return data.id;
|
return data.id;
|
||||||
case "us":
|
|
||||||
return "https://ustream.tv/channel/" + data.id;
|
|
||||||
case "gd":
|
case "gd":
|
||||||
return "https://docs.google.com/file/d/" + data.id;
|
return "https://docs.google.com/file/d/" + data.id;
|
||||||
case "fi":
|
case "fi":
|
||||||
return data.id;
|
return data.id;
|
||||||
case "hb":
|
|
||||||
return "https://www.smashcast.tv/" + data.id;
|
|
||||||
case "hl":
|
case "hl":
|
||||||
return data.id;
|
return data.id;
|
||||||
case "sb":
|
case "sb":
|
||||||
|
@ -2097,16 +2093,7 @@ function waitUntilDefined(obj, key, fn) {
|
||||||
fn();
|
fn();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
function chatDialog(div, zin = 'auto') {
|
||||||
God I hate supporting IE11
|
|
||||||
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters
|
|
||||||
https://caniuse.com/#search=default%20function
|
|
||||||
|
|
||||||
This would be the ideal:
|
|
||||||
function chatDialog(div, zin = "auto") {
|
|
||||||
*/
|
|
||||||
function chatDialog(div, zin) {
|
|
||||||
if(!zin){ zin = 'auto'; }
|
|
||||||
var parent = $("<div/>").addClass("profile-box")
|
var parent = $("<div/>").addClass("profile-box")
|
||||||
.css({
|
.css({
|
||||||
padding: "10px",
|
padding: "10px",
|
||||||
|
@ -3286,15 +3273,6 @@ function startQueueSpinner(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopQueueSpinner(data) {
|
function stopQueueSpinner(data) {
|
||||||
// TODO: this is a temp hack, need to replace media ID check with
|
|
||||||
// a passthrough request ID (since media ID from API is not necessarily
|
|
||||||
// the same as the URL "ID" from the user)
|
|
||||||
if (data && data.type === "us") {
|
|
||||||
data = { id: data.title.match(/Ustream.tv - (.*)/)[1] };
|
|
||||||
} else if (data && data.type === "mx") {
|
|
||||||
data = { id: data.meta.mixer.channelToken };
|
|
||||||
}
|
|
||||||
|
|
||||||
var shouldRemove = (data !== null &&
|
var shouldRemove = (data !== null &&
|
||||||
typeof data === 'object' &&
|
typeof data === 'object' &&
|
||||||
$("#queueprogress").data("queue-id") === data.id);
|
$("#queueprogress").data("queue-id") === data.id);
|
||||||
|
|
Loading…
Reference in New Issue