Deprecate jwplayer and googleplus videos

This commit is contained in:
Calvin Montgomery 2017-04-11 21:55:31 -07:00
parent 25c663c110
commit 8d40c87dda
6 changed files with 3 additions and 183 deletions

View file

@ -26,12 +26,6 @@ MediaRefresherModule.prototype.onPreMediaChange = function (data, cb) {
pl._refreshing = true;
return this.initGoogleDocs(data, function () {
pl._refreshing = false;
cb(null, ChannelModule.PASSTHROUGH);
});
case "gp":
pl._refreshing = true;
return this.initGooglePlus(data, function () {
pl._refreshing = false;
cb(null, ChannelModule.PASSTHROUGH);
});
@ -169,65 +163,6 @@ MediaRefresherModule.prototype.refreshGoogleDocs = function (media, cb) {
});
};
MediaRefresherModule.prototype.initGooglePlus = function (media, cb) {
var self = this;
if (self.dead || self.channel.dead) {
self.unload();
return;
}
self.channel.refCounter.ref("MediaRefresherModule::initGooglePlus");
InfoGetter.getMedia(media.id, "gp", function (err, data) {
if (self.dead || self.channel.dead) {
return;
}
if (typeof err === "string") {
err = err.replace(/Forbidden/, "Access Denied");
}
switch (err) {
case "Access Denied":
case "Not Found":
case "Internal Server Error":
case "Service Unavailable":
case "The video is still being processed":
case "A processing error has occured":
case "The video has been processed but is not yet accessible":
case ("Unable to retreive video information. Check that the video exists " +
"and is shared publicly"):
self.channel.logger.log("[mediarefresher] Google+ refresh failed: " +
err);
self.channel.refCounter.unref("MediaRefresherModule::initGooglePlus");
if (cb) cb();
return;
default:
if (err) {
self.channel.logger.log("[mediarefresher] Google+ refresh failed: " +
err);
LOGGER.error("Google+ refresh failed for ID " + media.id +
": " + err);
self.channel.refCounter.unref("MediaRefresherModule::initGooglePlus");
if (cb) cb();
return;
}
}
if (media !== self._media) {
self.channel.refCounter.unref("MediaRefresherModule::initGooglePlus");
if (cb) cb();
return;
}
self.channel.logger.log("[mediarefresher] Refreshed Google+ video with ID " +
media.id);
media.meta = data.meta;
self.channel.refCounter.unref("MediaRefresherModule::initGooglePlus");
if (cb) cb();
});
};
MediaRefresherModule.prototype.initVidme = function (data, cb) {
var self = this;
self.refreshVidme(data, cb);

View file

@ -126,7 +126,7 @@ PlaylistModule.prototype.load = function (data) {
} catch (e) {
return;
}
} else if (item.media.type === "gd" || item.media.type === "gp") {
} else if (item.media.type === "gd") {
delete item.media.meta.gpdirect;
}
@ -394,11 +394,6 @@ PlaylistModule.prototype.handleQueue = function (user, data) {
var queueby = user.getName();
var duration = undefined;
/**
* Duration can optionally be specified for a livestream.
* The UI for it only shows up for jw: queues, but it is
* accepted for any live media
*/
if (util.isLive(type) && typeof data.duration === "number") {
duration = !isNaN(data.duration) ? data.duration : undefined;
}
@ -821,7 +816,7 @@ PlaylistModule.prototype.handleUpdate = function (user, data) {
}
var media = this.current.media;
if (util.isLive(media.type) && media.type !== "jw") {
if (util.isLive(media.type)) {
return;
}