mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-01 12:59:15 -06:00
Fix resolution to transcode hook name
This commit is contained in:
parent
84cae54e7a
commit
64fd6158fd
@ -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
|
||||
)
|
||||
|
||||
|
@ -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
|
||||
)
|
||||
|
||||
|
@ -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 }
|
||||
)
|
||||
|
||||
|
@ -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 ]
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user