Completed buildPlayer method for youtubeEmbedHandler
This commit is contained in:
parent
1344756449
commit
1b0caa5e02
6 changed files with 43 additions and 19 deletions
|
|
@ -33,7 +33,7 @@ module.exports.yankMedia = async function(url, title){
|
|||
return await iaUtil.fetchMetadata(pullType.id, title);
|
||||
case "yt":
|
||||
//return mediao object list from the YT-DLP module's youtube function
|
||||
return await ytdlpUtil.fetchYoutubeVideoMetadata(pullType.id, title);
|
||||
return await ytdlpUtil.fetchYoutubeMetadata(pullType.id, title);
|
||||
case "dm":
|
||||
//return mediao object list from the YT-DLP module's dailymotion function
|
||||
return await ytdlpUtil.fetchDailymotionMetadata(pullType.id, title);
|
||||
|
|
@ -58,7 +58,7 @@ module.exports.refreshRawLink = async function(mediaObj){
|
|||
}
|
||||
|
||||
//Re-fetch media metadata
|
||||
metadata = await ytdlpUtil.fetchYoutubeVideoMetadata(mediaObj.id);
|
||||
metadata = await ytdlpUtil.fetchYoutubeMetadata(mediaObj.id);
|
||||
//Refresh media rawlink from metadata
|
||||
mediaObj.rawLink = metadata[0].rawLink;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const media = require('../../app/channel/media/media.js');
|
|||
const regexUtils = require('../regexUtils.js');
|
||||
const loggerUtils = require('../loggerUtils.js')
|
||||
|
||||
module.exports.fetchYoutubMetadata = async function(id, title){
|
||||
module.exports.fetchYoutubeMetadata = async function(id, title){
|
||||
try{
|
||||
//Try to pull media from youtube id
|
||||
const media = await fetchMetadata(`https://youtu.be/${id}`, title, 'yt');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue