2023-07-31 14:34:36 +02:00
|
|
|
import { YoutubeDLCLI } from '@server/helpers/youtube-dl/index.js'
|
|
|
|
import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants.js'
|
|
|
|
import { AbstractScheduler } from './abstract-scheduler.js'
|
2018-08-02 16:02:51 +02:00
|
|
|
|
|
|
|
export class YoutubeDlUpdateScheduler extends AbstractScheduler {
|
|
|
|
|
|
|
|
private static instance: AbstractScheduler
|
|
|
|
|
2021-10-22 10:28:00 +02:00
|
|
|
protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.YOUTUBE_DL_UPDATE
|
2018-08-02 16:02:51 +02:00
|
|
|
|
|
|
|
private constructor () {
|
|
|
|
super()
|
|
|
|
}
|
|
|
|
|
2018-12-20 14:31:11 +01:00
|
|
|
protected internalExecute () {
|
2021-10-21 16:28:39 +02:00
|
|
|
return YoutubeDLCLI.updateYoutubeDLBinary()
|
2018-08-02 16:02:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static get Instance () {
|
|
|
|
return this.instance || (this.instance = new this())
|
|
|
|
}
|
|
|
|
}
|