File tree 2 files changed +14
-5
lines changed 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
1
# OpenDistributedFileStorage
2
+ [ ![ Build docker images] ( https://github.com/aczwink/OpenDistributedFileStorage/actions/workflows/docker-image.yml/badge.svg )] ( https://github.com/aczwink/OpenDistributedFileStorage/actions/workflows/docker-image.yml )
3
+
2
4
A web-based file storage service with distributed storage targets
Original file line number Diff line number Diff line change 1
1
/**
2
2
* OpenDistributedFileStorage
3
- * Copyright (C) 2024 Amir Czwink ([email protected] )
3
+ * Copyright (C) 2024-2025 Amir Czwink ([email protected] )
4
4
*
5
5
* This program is free software: you can redistribute it and/or modify
6
6
* it under the terms of the GNU Affero General Public License as published by
@@ -71,11 +71,18 @@ export class FFProbeService
71
71
72
72
public ExtractVideoStream ( mediaInfo : FFProbe_MediaInfo )
73
73
{
74
- const streams = mediaInfo . streams . filter ( x => x . codec_type === "video" ) ;
75
- if ( streams . length != 1 )
76
- throw new Error ( "TODO: implement me" ) ;
74
+ const streams = mediaInfo . streams . filter ( x => x . codec_type === "video" ) as FFProbe_VideoStreamInfo [ ] ;
75
+ if ( streams . length === 0 )
76
+ throw new Error ( "TODO: implement me1" ) ;
77
+ if ( streams . length > 1 )
78
+ {
79
+ const withoutImages = streams . filter ( x => x . codec_name !== "png" ) ;
80
+ if ( withoutImages . length === 1 )
81
+ return withoutImages [ 0 ] ;
82
+ throw new Error ( "TODO: implement me2" ) ;
83
+ }
77
84
78
- return streams [ 0 ] as FFProbe_VideoStreamInfo ;
85
+ return streams [ 0 ] ;
79
86
}
80
87
81
88
public IsStreamable ( mediaType : string , mediaInfo : FFProbe_MediaInfo )
You can’t perform that action at this time.
0 commit comments