From 0b6106a89e0cc12f201b8ac6dc950281424004f4 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Tue, 26 Dec 2017 20:40:12 -0800 Subject: [PATCH] Clarify gdrive userscript error when fmt_stream_map is missing --- gdrive-userscript/cytube-google-drive.user.js | 11 +++++++---- package.json | 2 +- www/js/data.js | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gdrive-userscript/cytube-google-drive.user.js b/gdrive-userscript/cytube-google-drive.user.js index c700b59a..58ae25b7 100644 --- a/gdrive-userscript/cytube-google-drive.user.js +++ b/gdrive-userscript/cytube-google-drive.user.js @@ -8,7 +8,7 @@ // @grant GM.xmlHttpRequest // @connect docs.google.com // @run-at document-end -// @version 1.6.0 +// @version 1.7.0 // ==/UserScript== try { @@ -100,8 +100,11 @@ try { } if (!data.fmt_stream_map) { - error = 'Google Drive request failed: ' + - 'metadata lookup returned no valid links'; + error = ( + 'Google has removed the video streams associated' + + ' with this item. It can no longer be played.' + ); + return cb(error); } @@ -234,7 +237,7 @@ try { unsafeWindow.console.log('Initialized userscript Google Drive player'); unsafeWindow.hasDriveUserscript = true; // Checked against GS_VERSION from data.js - unsafeWindow.driveUserscriptVersion = '1.6'; + unsafeWindow.driveUserscriptVersion = '1.7'; } catch (error) { unsafeWindow.console.error(error); } diff --git a/package.json b/package.json index ee21b81e..24e32f33 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.51.14", + "version": "3.51.15", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/www/js/data.js b/www/js/data.js index d0615834..e71bfeb3 100644 --- a/www/js/data.js +++ b/www/js/data.js @@ -1,5 +1,5 @@ var CL_VERSION = 3.0; -var GS_VERSION = 1.6; // Google Drive Userscript +var GS_VERSION = 1.7; // Google Drive Userscript var CLIENT = { rank: -1,