ytdl-core
Advanced tools
Comparing version 4.1.7 to 4.2.0
@@ -184,3 +184,2 @@ const utils = require('./utils'); | ||
[Symbol.toPrimitive]() { | ||
// eslint-disable-next-line no-console | ||
console.warn(`\`relatedVideo.author\` will be removed in a near future release, ` + | ||
@@ -252,1 +251,19 @@ `use \`relatedVideo.author.name\` instead.`); | ||
}; | ||
/** | ||
* Cleans up a few fields on `videoDetails`. | ||
* | ||
* @param {Object} videoDetails | ||
* @returns {Object} | ||
*/ | ||
exports.cleanVideoDetails = videoDetails => { | ||
videoDetails.thumbnails = videoDetails.thumbnail.thumbnails; | ||
delete videoDetails.thumbnail; | ||
utils.deprecate(videoDetails, 'thumbnail', { thumbnails: videoDetails.thumbnails }, | ||
'videoDetails.thumbnail.thumbnails', 'videoDetails.thumbnails'); | ||
videoDetails.description = videoDetails.shortDescription || getText(videoDetails.description); | ||
delete videoDetails.shortDescription; | ||
utils.deprecate(videoDetails, 'shortDescription', videoDetails.description, | ||
'videoDetails.shortDescription', 'videoDetails.description'); | ||
return videoDetails; | ||
}; |
@@ -80,6 +80,6 @@ const urllib = require('url'); | ||
info.videoDetails = Object.assign({}, | ||
info.videoDetails = extras.cleanVideoDetails(Object.assign({}, | ||
info.player_response && info.player_response.microformat && | ||
info.player_response.microformat.playerMicroformatRenderer, | ||
info.player_response && info.player_response.videoDetails, additional); | ||
info.player_response && info.player_response.videoDetails, additional)); | ||
@@ -86,0 +86,0 @@ return info; |
@@ -134,3 +134,2 @@ const miniget = require('miniget'); | ||
get: () => { | ||
// eslint-disable-next-line no-console | ||
console.warn(`\`${oldPath}\` will be removed in a near future release, ` + | ||
@@ -137,0 +136,0 @@ `use \`${newPath}\` instead.`); |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "4.1.7", | ||
"version": "4.2.0", | ||
"repository": { | ||
@@ -12,0 +12,0 @@ "type": "git", |
@@ -158,3 +158,3 @@ # node-ytdl-core | ||
Youtube updates their website all the time, it's not that rare for this to stop working. If it doesn't work for you and you're using the latest version, feel free to open up an issue. Make sure to check if there isn't one already with the same error. | ||
YouTube updates their website all the time, it's not that rare for this to stop working. If it doesn't work for you and you're using the latest version, feel free to open up an issue. Make sure to check if there isn't one already with the same error. | ||
@@ -161,0 +161,0 @@ Run the tests at `test/irl-test.js` to make sure this is really an issue with ytdl-core. |
@@ -194,3 +194,3 @@ declare module 'ytdl-core' { | ||
interface MoreVideoDetails extends Omit<VideoDetails, 'author'>, Omit<MicroformatRenderer, 'title' | 'description'> { | ||
interface MoreVideoDetails extends Omit<VideoDetails, 'author' | 'thumbnail' | 'shortDescription'>, Omit<MicroformatRenderer, 'title' | 'description'> { | ||
published: number; | ||
@@ -203,2 +203,3 @@ video_url: string; | ||
author: Author; | ||
thumbnails: thumbnail[]; | ||
} | ||
@@ -205,0 +206,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87564
2346