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