diff options
Diffstat (limited to 'client/src/app/shared/shared-video-miniature')
3 files changed, 6 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts index 0ef842652..405af5fa6 100644 --- a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts +++ b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { fromEvent, Observable, Subject, Subscription } from 'rxjs' | 1 | import { fromEvent, Observable, Subject, Subscription } from 'rxjs' |
2 | import { debounceTime, switchMap, tap } from 'rxjs/operators' | 2 | import { debounceTime, switchMap, tap } from 'rxjs/operators' |
3 | import { OnDestroy, OnInit } from '@angular/core' | 3 | import { OnDestroy, OnInit, Directive } from '@angular/core' |
4 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { | 5 | import { |
6 | AuthService, | 6 | AuthService, |
@@ -30,6 +30,7 @@ enum GroupDate { | |||
30 | OLDER = 5 | 30 | OLDER = 5 |
31 | } | 31 | } |
32 | 32 | ||
33 | @Directive() | ||
33 | export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableForReuseHook { | 34 | export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableForReuseHook { |
34 | pagination: ComponentPaginationLight = { | 35 | pagination: ComponentPaginationLight = { |
35 | currentPage: 1, | 36 | currentPage: 1, |
diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.ts b/client/src/app/shared/shared-video-miniature/video-download.component.ts index 21df8b674..4fd06eacf 100644 --- a/client/src/app/shared/shared-video-miniature/video-download.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-download.component.ts | |||
@@ -1,4 +1,3 @@ | |||
1 | import { FfprobeFormat, FfprobeStream } from 'fluent-ffmpeg' | ||
2 | import { mapValues, pick } from 'lodash-es' | 1 | import { mapValues, pick } from 'lodash-es' |
3 | import { BytesPipe } from 'ngx-pipes' | 2 | import { BytesPipe } from 'ngx-pipes' |
4 | import { Component, ElementRef, ViewChild } from '@angular/core' | 3 | import { Component, ElementRef, ViewChild } from '@angular/core' |
@@ -144,7 +143,7 @@ export class VideoDownloadComponent { | |||
144 | this.type = type | 143 | this.type = type |
145 | } | 144 | } |
146 | 145 | ||
147 | getMetadataFormat (format: FfprobeFormat) { | 146 | getMetadataFormat (format: any) { |
148 | const keyToTranslateFunction = { | 147 | const keyToTranslateFunction = { |
149 | 'encoder': (value: string) => ({ label: this.i18n('Encoder'), value }), | 148 | 'encoder': (value: string) => ({ label: this.i18n('Encoder'), value }), |
150 | 'format_long_name': (value: string) => ({ label: this.i18n('Format name'), value }), | 149 | 'format_long_name': (value: string) => ({ label: this.i18n('Format name'), value }), |
@@ -165,7 +164,7 @@ export class VideoDownloadComponent { | |||
165 | ) | 164 | ) |
166 | } | 165 | } |
167 | 166 | ||
168 | getMetadataStream (streams: FfprobeStream[], type: 'video' | 'audio') { | 167 | getMetadataStream (streams: any[], type: 'video' | 'audio') { |
169 | const stream = streams.find(s => s.codec_type === type) | 168 | const stream = streams.find(s => s.codec_type === type) |
170 | if (!stream) return undefined | 169 | if (!stream) return undefined |
171 | 170 | ||
@@ -201,6 +200,7 @@ export class VideoDownloadComponent { | |||
201 | private hydrateMetadataFromMetadataUrl (file: VideoFile) { | 200 | private hydrateMetadataFromMetadataUrl (file: VideoFile) { |
202 | const observable = this.videoService.getVideoFileMetadata(file.metadataUrl) | 201 | const observable = this.videoService.getVideoFileMetadata(file.metadataUrl) |
203 | observable.subscribe(res => file.metadata = res) | 202 | observable.subscribe(res => file.metadata = res) |
203 | |||
204 | return observable.toPromise() | 204 | return observable.toPromise() |
205 | } | 205 | } |
206 | } | 206 | } |
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts index f434550dd..3c7046de5 100644 --- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts | |||
@@ -12,7 +12,7 @@ import { | |||
12 | } from '@angular/core' | 12 | } from '@angular/core' |
13 | import { AuthService, ScreenService, ServerService, User } from '@app/core' | 13 | import { AuthService, ScreenService, ServerService, User } from '@app/core' |
14 | import { I18n } from '@ngx-translate/i18n-polyfill' | 14 | import { I18n } from '@ngx-translate/i18n-polyfill' |
15 | import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '../../../../../shared' | 15 | import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models' |
16 | import { Video } from '../shared-main' | 16 | import { Video } from '../shared-main' |
17 | import { VideoPlaylistService } from '../shared-video-playlist' | 17 | import { VideoPlaylistService } from '../shared-video-playlist' |
18 | import { VideoActionsDisplayType } from './video-actions-dropdown.component' | 18 | import { VideoActionsDisplayType } from './video-actions-dropdown.component' |