]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-video-miniature/video-download.component.ts
Update build steps for localization
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-miniature / video-download.component.ts
index 21df8b674bd94b89092bc352c0b85c199ffc9ecc..e3d6a1969ee62a82f7287f49fe8bec82944c97d6 100644 (file)
@@ -1,12 +1,10 @@
-import { FfprobeFormat, FfprobeStream } from 'fluent-ffmpeg'
 import { mapValues, pick } from 'lodash-es'
-import { BytesPipe } from 'ngx-pipes'
 import { Component, ElementRef, ViewChild } from '@angular/core'
 import { AuthService, Notifier } from '@app/core'
 import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { VideoCaption, VideoFile, VideoPrivacy } from '@shared/models'
-import { NumberFormatterPipe, VideoDetails, VideoService } from '../shared-main'
+import { BytesPipe, NumberFormatterPipe, VideoDetails, VideoService } from '../shared-main'
 
 type DownloadType = 'video' | 'subtitles'
 type FileMetadata = { [key: string]: { label: string, value: string }}
@@ -144,7 +142,7 @@ export class VideoDownloadComponent {
     this.type = type
   }
 
-  getMetadataFormat (format: FfprobeFormat) {
+  getMetadataFormat (format: any) {
     const keyToTranslateFunction = {
       'encoder': (value: string) => ({ label: this.i18n('Encoder'), value }),
       'format_long_name': (value: string) => ({ label: this.i18n('Format name'), value }),
@@ -165,7 +163,7 @@ export class VideoDownloadComponent {
     )
   }
 
-  getMetadataStream (streams: FfprobeStream[], type: 'video' | 'audio') {
+  getMetadataStream (streams: any[], type: 'video' | 'audio') {
     const stream = streams.find(s => s.codec_type === type)
     if (!stream) return undefined
 
@@ -201,6 +199,7 @@ export class VideoDownloadComponent {
   private hydrateMetadataFromMetadataUrl (file: VideoFile) {
     const observable = this.videoService.getVideoFileMetadata(file.metadataUrl)
     observable.subscribe(res => file.metadata = res)
+
     return observable.toPromise()
   }
 }