Started working on pushing multiple raw links to user.

This commit is contained in:
rainbow napkin 2025-10-29 08:35:37 -04:00
parent 349a6b82aa
commit e0832c2c1f
3 changed files with 47 additions and 12 deletions

View file

@ -26,9 +26,9 @@ class media{
* @param {String} id - Video ID from source (IE: youtube watch code/archive.org file path)
* @param {String} type - Original video source
* @param {Number} duration - Length of media in seconds
* @param {String} rawLink - URL to raw file copy of media, not applicable to all sources
* @param {String} rawLink - URLs to raw file copies of media, not applicable to all sources, not saved to the DB
*/
constructor(title, fileName, url, id, type, duration, rawLink = url){
constructor(title, fileName, url, id, type, duration, rawLink){
/**
* Chosen title of media
*/
@ -59,10 +59,18 @@ class media{
*/
this.duration = duration;
/**
* URL to raw file copy of media, not applicable to all sources
*/
this.rawLink = rawLink;
if(rawLink == null){
/**
* URL to raw file copy of media, not applicable to all sources
*/
this.rawLink = {
audio: [],
video: [],
combo: [['default',url]]
};
}else{
this.rawLink = rawLink;
}
}
}