Added stream URL to channel settings.
This commit is contained in:
parent
e4bebce431
commit
93265b7890
6 changed files with 92 additions and 14 deletions
|
|
@ -32,8 +32,15 @@ module.exports.yankMedia = async function(url, title){
|
|||
//return media object list from IA module
|
||||
return await iaUtil.fetchMetadata(pullType.id, title);
|
||||
case "yt":
|
||||
//return mediao object list from the YT-DLP module's youtube function
|
||||
//return media object list from the YT-DLP module's youtube function
|
||||
return await ytdlpUtil.fetchYoutubeMetadata(pullType.id, title);
|
||||
case "ytp":
|
||||
//return media object list from YT-DLP module's youtube playlist function
|
||||
//return await ytdlpUtil.fetchYoutubePlaylistMetadata(pullType.id, title);
|
||||
//Holding off on this since YT-DLP takes 10 years to do a playlist as it needs to pull each and every video one-by-one
|
||||
//Maybe in the future a piped alternative might be in order, however this would most likely require us to host our own local instance.
|
||||
//Though it could give us added resistance against youtube/google's rolling IP bans
|
||||
return null;
|
||||
case "dm":
|
||||
//return mediao object list from the YT-DLP module's dailymotion function
|
||||
return await ytdlpUtil.fetchDailymotionMetadata(pullType.id, title);
|
||||
|
|
@ -85,7 +92,7 @@ module.exports.getMediaType = async function(url){
|
|||
|
||||
//If we have link to a resource from archive.org
|
||||
if(match = url.match(/archive\.org\/(?:details|download)\/([a-zA-Z0-9\/._-\s\%]+)/)){
|
||||
//return internet archive code
|
||||
//return internet archive upload id and filepath
|
||||
return {
|
||||
type: "ia",
|
||||
id: match[1]
|
||||
|
|
@ -101,6 +108,15 @@ module.exports.getMediaType = async function(url){
|
|||
}
|
||||
}
|
||||
|
||||
//If we have a match to a youtube playlist
|
||||
if((match = url.match(/youtube\.com\/playlist\?list=([a-zA-Z0-9_-]{34})/)) || (match = url.match(/youtu\.be\/playlist\?list=([a-zA-Z0-9_-]{34})/))){
|
||||
//return youtube playlist id
|
||||
return {
|
||||
type: "ytp",
|
||||
id: match[1]
|
||||
}
|
||||
}
|
||||
|
||||
//If we have a match to a dailymotion video
|
||||
if(match = url.match(/dailymotion\.com\/video\/([a-z0-9]{7})/)){
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue