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];