+ for (const resolution of resolutionsEnabled) {
+ dataInput.push({
+ type: 'new-resolution-to-hls',
+ videoUUID: video.uuid,
+ resolution,
+ isPortraitMode: false,
+ copyCodecs: false
+ })
+ }
+ } else if (program.resolution !== undefined) {
+ dataInput.push({
+ type: 'new-resolution-to-webtorrent',
+ videoUUID: video.uuid,
+ isNewVideo: false,
+ resolution: program.resolution
+ })
+ } else {
+ dataInput.push({
+ type: 'optimize-to-webtorrent',
+ videoUUID: video.uuid,
+ isNewVideo: false
+ })