diff --git a/main-support.ts b/main-support.ts index 47376e60..0b76adad 100644 --- a/main-support.ts +++ b/main-support.ts @@ -391,9 +391,13 @@ export function extractAllMetadata( * @param metadata the ffProbe metadata object */ function getBestStream(metadata) { - return metadata.streams.reduce(function (a, b) { - return a.width > b.width ? a : b; - }); + try { + return metadata.streams.reduce((a, b) => a.width > b.width ? a : b); + } catch (e) { + // if metadata.streams is an empty array or something else is wrong with it + // return an empty object so later calls to `stream.width` or `stream.height` do not throw exceptions + return {}; + } } /** diff --git a/src/app/components/views/thumbnail/preview.component.html b/src/app/components/views/thumbnail/preview.component.html index d6f65541..3cc1783b 100644 --- a/src/app/components/views/thumbnail/preview.component.html +++ b/src/app/components/views/thumbnail/preview.component.html @@ -7,8 +7,6 @@ [ngClass]="{ 'compact-margins': compactView }" > - -
+ +
-
-
-
+ {{ video.duration | lengthPipe : true : true : true }}
+
{{ video.fileSizeDisplay }}
- -
-
- -
-
-
-
+ - - - + + -
- {{ video.durationDisplay }} - {{ video.resolution }} +
+
+
- - +
- + + + + +
+
+
+
+ +
+ + + + +
+ {{ video.durationDisplay }} + {{ video.resolution }} +
+ + + + + {{ video.cleanName }} +
- {{ video.cleanName }} -
- {{ showMeta ? '(' + video.fileSizeDisplay + ')' : '' }} -
- - - + {{ showMeta ? '(' + video.fileSizeDisplay + ')' : '' }} +
+
-
+
diff --git a/src/app/components/views/thumbnail/preview.component.scss b/src/app/components/views/thumbnail/preview.component.scss index 3e5ff78f..5bf4d72e 100644 --- a/src/app/components/views/thumbnail/preview.component.scss +++ b/src/app/components/views/thumbnail/preview.component.scss @@ -7,6 +7,15 @@ width: 50%; } +.folder-item-fullsize { + background-color: black; + background-size: cover; + height: 100%; + overflow: hidden; + position: absolute; + width: 100%; +} + .folder { border: 3px solid white; border-radius: 10px;