Files
YouTube.js/lib/parser/classes/WatchCardCompactVideo.js
LuanRT 68cb841c00 refactor!: finish parser migration
Finally! :)

This removes all code related to the old parser.

#65
2022-07-11 06:19:10 -03:00

20 lines
486 B
JavaScript

'use strict';
const Text = require('./Text');
const { timeToSeconds } = require('../../utils/Utils');
class WatchCardCompactVideo {
type = 'WatchCardCompactVideo';
constructor(data) {
this.title = new Text(data.title);
this.subtitle = new Text(data.subtitle);
this.duration = {
text: new Text(data.lengthText).toString(),
seconds: timeToSeconds(data.lengthText.simpleText)
};
this.style = data.style;
}
}
module.exports = WatchCardCompactVideo;