Continued youtube improvements.

This commit is contained in:
rainbow napkin 2025-05-01 06:03:09 -04:00
parent bec209c665
commit 0157262130

View file

@ -124,11 +124,13 @@ var Getters = {
YouTube.lookup(id).then(function (video) {
var meta = {};
if (video.meta.blocked) {
meta.restricted = video.meta.blocked;
meta.restricted = video.meta.blocked;
}
if (video.meta.ytRating) {
meta.ytRating = video.meta.ytRating;
meta.ytRating = video.meta.ytRating;
}
var media = new Media(video.id, video.title, video.duration, "yt", meta);
@ -141,11 +143,13 @@ var Getters = {
try{
var video = await YTDLP(`youtu.be/${id}`,{
dumpSingleJson: true,
format: "b"
}
)
var meta = {
ytRating: video.like_count
ytRating: video.like_count,
rawLink: video.requested_downloads[0].url
}
var media = new Media(video.id, video.title, video.duration, "yt", meta);
@ -215,6 +219,7 @@ var Getters = {
try{
var list = await YTDLP(`youtu.be/${id}`,{
dumpSingleJson: true,
format: "b"
}
);
@ -223,7 +228,8 @@ var Getters = {
list.entries.forEach(function(video){
if(video != null){
var meta = {
ytRating: video.like_count
ytRating: video.like_count,
rawLink: video.requested_downloads[0].url
}
videos.push(new Media(video.id, video.title, video.duration, "yt", meta));