From 54bf7f1c5b4f933e70d4fd9ee8c7691fd0e69659 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Mon, 5 Mar 2018 21:56:08 -0800 Subject: [PATCH] Strip GDrive metadata from saved channel playlists --- package.json | 2 +- src/media.js | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2a9bf61f..52c943ef 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.55.3", + "version": "3.55.4", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/src/media.js b/src/media.js index b9503645..21244d56 100644 --- a/src/media.js +++ b/src/media.js @@ -25,14 +25,13 @@ Media.prototype = { }, pack: function () { - return { + const result = { id: this.id, title: this.title, seconds: this.seconds, duration: this.duration, type: this.type, meta: { - direct: this.meta.direct, restricted: this.meta.restricted, codec: this.meta.codec, bitrate: this.meta.bitrate, @@ -42,6 +41,16 @@ Media.prototype = { textTracks: this.meta.textTracks } }; + + /* + * 2018-03-05: Remove GDrive metadata from saved playlists to save + * space since this is no longer used. + */ + if (this.type !== "gd") { + result.meta.direct = this.meta.direct; + } + + return result; }, getTimeUpdate: function () {