Started work on JSDoc. src/app started, src/app/channel/media complete.

This commit is contained in:
rainbow napkin 2025-08-25 08:09:43 -04:00
parent c64b315fdf
commit fd760e4dab
6 changed files with 467 additions and 32 deletions

View file

@ -14,7 +14,20 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.*/
/**
* Object representing a piece of media
*/
module.exports = class{
/**
* Creates a new media object from scraped information
* @param {String} title - Chosen title of media
* @param {String} fileName - Original filename/title of media provided by source
* @param {String} url - Original URL to file
* @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
*/
constructor(title, fileName, url, id, type, duration, rawLink = url){
this.title = title;
this.fileName = fileName