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