Fix resolution to transcode hook name

This commit is contained in:
Chocobozzz 2022-08-05 13:40:56 +02:00
parent 84cae54e7a
commit 64fd6158fd
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
6 changed files with 7 additions and 7 deletions

View File

@ -33,7 +33,7 @@ async function createTranscoding (req: express.Request, res: express.Response) {
const { resolution: maxResolution, audioStream } = await video.probeMaxQualityFile()
const resolutions = await Hooks.wrapObject(
computeResolutionsToTranscode({ inputResolution: maxResolution, type: 'vod', includeInputResolution: true }),
'filter:transcoding.manual.lower-resolutions-to-transcode.result',
'filter:transcoding.manual.resolutions-to-transcode.result',
body
)

View File

@ -266,7 +266,7 @@ async function createLowerResolutionsJobs (options: {
// Create transcoding jobs if there are enabled resolutions
const resolutionsEnabled = await Hooks.wrapObject(
computeResolutionsToTranscode({ inputResolution: videoFileResolution, type: 'vod', includeInputResolution: false }),
'filter:transcoding.auto.lower-resolutions-to-transcode.result',
'filter:transcoding.auto.resolutions-to-transcode.result',
options
)

View File

@ -245,7 +245,7 @@ class LiveManager {
const allResolutions = await Hooks.wrapObject(
this.buildAllResolutionsToTranscode(resolution),
'filter:transcoding.auto.lower-resolutions-to-transcode.result',
'filter:transcoding.auto.resolutions-to-transcode.result',
{ video }
)

View File

@ -301,7 +301,7 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
})
registerHook({
target: 'filter:transcoding.auto.lower-resolutions-to-transcode.result',
target: 'filter:transcoding.auto.resolutions-to-transcode.result',
handler: (object, context) => {
if (context.video.name.includes('transcode-filter')) {
object = [ 100 ]

View File

@ -680,7 +680,7 @@ describe('Test plugin filter hooks', function () {
describe('Transcoding filters', async function () {
it('Should run filter:transcoding.auto.lower-resolutions-to-transcode.result', async function () {
it('Should run filter:transcoding.auto.resolutions-to-transcode.result', async function () {
const { uuid } = await servers[0].videos.quickUpload({ name: 'transcode-filter' })
await waitJobs(servers)

View File

@ -102,8 +102,8 @@ export const serverFilterHookObject = {
'filter:job-queue.process.params': true,
'filter:job-queue.process.result': true,
'filter:transcoding.manual.lower-resolutions-to-transcode.result': true,
'filter:transcoding.auto.lower-resolutions-to-transcode.result': true
'filter:transcoding.manual.resolutions-to-transcode.result': true,
'filter:transcoding.auto.resolutions-to-transcode.result': true
}
export type ServerFilterHookName = keyof typeof serverFilterHookObject