mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-03-13 14:38:37 +01:00
msg
This commit is contained in:
parent
c49e3cb648
commit
e0646a579b
1 changed files with 2 additions and 2 deletions
|
@ -338,14 +338,14 @@ export class FileInfoService {
|
|||
try {
|
||||
FFmpeg.ffprobe(path, (err, metadata) => {
|
||||
if (err) {
|
||||
sublogger.warn(`Could not determine video file. Returns true. File path: ${path}`, err);
|
||||
sublogger.warn(`Could not check the video file. Returns true. File path: ${path}`, err);
|
||||
resolve(true);
|
||||
return;
|
||||
}
|
||||
resolve(metadata.streams.some((stream) => stream.codec_type === 'video'));
|
||||
});
|
||||
} catch (err) {
|
||||
sublogger.warn(`Could not determine video file. Returns true. File path: ${path}`, err as Error);
|
||||
sublogger.warn(`Could not check the video file. Returns true. File path: ${path}`, err as Error);
|
||||
resolve(true);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue