From dab402b1dc78d17eb81a2ce38238271adfbd257b Mon Sep 17 00:00:00 2001 From: Skiptir Engu Date: Mon, 16 Jan 2017 15:13:26 -0200 Subject: [PATCH] Make properties configurable --- lib/youtube-dl.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/youtube-dl.js b/lib/youtube-dl.js index ba2d83a..60d2396 100644 --- a/lib/youtube-dl.js +++ b/lib/youtube-dl.js @@ -222,18 +222,21 @@ function parseInfo(data) { // Add and process some entries to keep backwards compatibility Object.defineProperty(info, 'filename', { + configurable: true, get: function get() { console.warn('`info.filename` is deprecated, use `info._filename`'); return info._filename; } }); Object.defineProperty(info, 'itag', { + configurable: true, get: function get() { console.warn('`info.itag` is deprecated, use `info.format_id`'); return info.format_id; } }); Object.defineProperty(info, 'resolution', { + configurable: true, get: function get() { console.warn('`info.resolution` is deprecated, use `info.format`'); return info.format.split(' - ')[1];