Strip GDrive metadata from saved channel playlists

This commit is contained in:
Calvin Montgomery 2018-03-05 21:56:08 -08:00
parent 8340bf2c81
commit 54bf7f1c5b
2 changed files with 12 additions and 3 deletions

View file

@ -2,7 +2,7 @@
"author": "Calvin Montgomery", "author": "Calvin Montgomery",
"name": "CyTube", "name": "CyTube",
"description": "Online media synchronizer and chat", "description": "Online media synchronizer and chat",
"version": "3.55.3", "version": "3.55.4",
"repository": { "repository": {
"url": "http://github.com/calzoneman/sync" "url": "http://github.com/calzoneman/sync"
}, },

View file

@ -25,14 +25,13 @@ Media.prototype = {
}, },
pack: function () { pack: function () {
return { const result = {
id: this.id, id: this.id,
title: this.title, title: this.title,
seconds: this.seconds, seconds: this.seconds,
duration: this.duration, duration: this.duration,
type: this.type, type: this.type,
meta: { meta: {
direct: this.meta.direct,
restricted: this.meta.restricted, restricted: this.meta.restricted,
codec: this.meta.codec, codec: this.meta.codec,
bitrate: this.meta.bitrate, bitrate: this.meta.bitrate,
@ -42,6 +41,16 @@ Media.prototype = {
textTracks: this.meta.textTracks 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 () { getTimeUpdate: function () {