2018-08-02 17:02:51 +03:00
|
|
|
import { AbstractScheduler } from './abstract-scheduler'
|
2019-04-11 15:26:41 +03:00
|
|
|
import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants'
|
2018-09-19 17:24:24 +03:00
|
|
|
import { updateYoutubeDLBinary } from '../../helpers/youtube-dl'
|
2018-08-02 17:02:51 +03:00
|
|
|
|
|
|
|
export class YoutubeDlUpdateScheduler extends AbstractScheduler {
|
|
|
|
|
|
|
|
private static instance: AbstractScheduler
|
|
|
|
|
|
|
|
protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.youtubeDLUpdate
|
|
|
|
|
|
|
|
private constructor () {
|
|
|
|
super()
|
|
|
|
}
|
|
|
|
|
2018-12-20 16:31:11 +03:00
|
|
|
protected internalExecute () {
|
2018-09-19 17:24:24 +03:00
|
|
|
return updateYoutubeDLBinary()
|
2018-08-02 17:02:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static get Instance () {
|
|
|
|
return this.instance || (this.instance = new this())
|
|
|
|
}
|
|
|
|
}
|