mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
chore(server): remove unneeded debug logging (#2203)
* chore(server): commented out debug log line for codecs * chore(server): removed debug log line for codecs as it's not needed * Prettier run * Make the log more useful and move it to verbose level
This commit is contained in:
parent
fb42a736f1
commit
d76b3c8f78
@ -1,4 +1,4 @@
|
||||
import { AssetType, TranscodePreset } from '@app/infra/entities';
|
||||
import { AssetEntity, AssetType, TranscodePreset } from '@app/infra/entities';
|
||||
import { Inject, Injectable, Logger } from '@nestjs/common';
|
||||
import { join } from 'path';
|
||||
import { IAssetRepository, mapAsset, WithoutProperty } from '../asset';
|
||||
@ -137,7 +137,7 @@ export class MediaService {
|
||||
|
||||
const { ffmpeg: config } = await this.configCore.getConfig();
|
||||
|
||||
const required = this.isTranscodeRequired(mainVideoStream, mainAudioStream, containerExtension, config);
|
||||
const required = this.isTranscodeRequired(asset, mainVideoStream, mainAudioStream, containerExtension, config);
|
||||
if (!required) {
|
||||
return;
|
||||
}
|
||||
@ -164,6 +164,7 @@ export class MediaService {
|
||||
}
|
||||
|
||||
private isTranscodeRequired(
|
||||
asset: AssetEntity,
|
||||
videoStream: VideoStreamInfo,
|
||||
audioStream: AudioStreamInfo,
|
||||
containerExtension: string,
|
||||
@ -178,7 +179,9 @@ export class MediaService {
|
||||
const isTargetAudioCodec = audioStream.codecName === ffmpegConfig.targetAudioCodec;
|
||||
const isTargetContainer = ['mov,mp4,m4a,3gp,3g2,mj2', 'mp4', 'mov'].includes(containerExtension);
|
||||
|
||||
this.logger.debug(audioStream.codecName, audioStream.codecType, containerExtension);
|
||||
this.logger.verbose(
|
||||
`${asset.id}: AudioCodecName ${audioStream.codecName}, AudioStreamCodecType ${audioStream.codecType}, containerExtension ${containerExtension}`,
|
||||
);
|
||||
|
||||
const allTargetsMatching = isTargetVideoCodec && isTargetAudioCodec && isTargetContainer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user