diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-26 08:37:26 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-07 08:28:14 +0200 |
commit | 583eb04b541175035d6d452ca626a96ebf2b7437 (patch) | |
tree | 114ba0a7004b4b2a7fc77444ef5fcb73414c6e93 /shared | |
parent | 4504f09f6e85f09b0489debb547a17209d7176ea (diff) | |
download | PeerTube-583eb04b541175035d6d452ca626a96ebf2b7437.tar.gz PeerTube-583eb04b541175035d6d452ca626a96ebf2b7437.tar.zst PeerTube-583eb04b541175035d6d452ca626a96ebf2b7437.zip |
Upgrade to angular 10
Diffstat (limited to 'shared')
-rw-r--r-- | shared/models/plugins/plugin-settings-manager.model.ts | 8 | ||||
-rw-r--r-- | shared/models/plugins/plugin-storage-manager.model.ts | 6 | ||||
-rw-r--r-- | shared/models/videos/video-file-metadata.ts | 9 | ||||
-rw-r--r-- | shared/models/videos/video-file.model.ts | 6 | ||||
-rw-r--r-- | shared/models/videos/video.model.ts | 10 |
5 files changed, 15 insertions, 24 deletions
diff --git a/shared/models/plugins/plugin-settings-manager.model.ts b/shared/models/plugins/plugin-settings-manager.model.ts index db88ae6e7..165f0dc5b 100644 --- a/shared/models/plugins/plugin-settings-manager.model.ts +++ b/shared/models/plugins/plugin-settings-manager.model.ts | |||
@@ -1,11 +1,9 @@ | |||
1 | import * as Bluebird from 'bluebird' | ||
2 | |||
3 | export interface PluginSettingsManager { | 1 | export interface PluginSettingsManager { |
4 | getSetting: (name: string) => Bluebird<string | boolean> | 2 | getSetting: (name: string) => Promise<string | boolean> |
5 | 3 | ||
6 | getSettings: (names: string[]) => Bluebird<{ [settingName: string]: string | boolean }> | 4 | getSettings: (names: string[]) => Promise<{ [settingName: string]: string | boolean }> |
7 | 5 | ||
8 | setSetting: (name: string, value: string) => Bluebird<any> | 6 | setSetting: (name: string, value: string) => Promise<any> |
9 | 7 | ||
10 | onSettingsChange: (cb: (names: string[]) => void) => void | 8 | onSettingsChange: (cb: (names: string[]) => void) => void |
11 | } | 9 | } |
diff --git a/shared/models/plugins/plugin-storage-manager.model.ts b/shared/models/plugins/plugin-storage-manager.model.ts index 8a1f389f1..51567044a 100644 --- a/shared/models/plugins/plugin-storage-manager.model.ts +++ b/shared/models/plugins/plugin-storage-manager.model.ts | |||
@@ -1,7 +1,5 @@ | |||
1 | import * as Bluebird from 'bluebird' | ||
2 | |||
3 | export interface PluginStorageManager { | 1 | export interface PluginStorageManager { |
4 | getData: (key: string) => Bluebird<string> | 2 | getData: (key: string) => Promise<string> |
5 | 3 | ||
6 | storeData: (key: string, data: any) => Bluebird<any> | 4 | storeData: (key: string, data: any) => Promise<any> |
7 | } | 5 | } |
diff --git a/shared/models/videos/video-file-metadata.ts b/shared/models/videos/video-file-metadata.ts index 010bf7cf5..8f527c0a7 100644 --- a/shared/models/videos/video-file-metadata.ts +++ b/shared/models/videos/video-file-metadata.ts | |||
@@ -1,14 +1,9 @@ | |||
1 | import { FfprobeData } from 'fluent-ffmpeg' | 1 | export class VideoFileMetadata { |
2 | import { DeepOmit } from '../../core-utils' | ||
3 | |||
4 | export type VideoFileMetadataModel = DeepOmit<FfprobeData, 'filename'> | ||
5 | |||
6 | export class VideoFileMetadata implements VideoFileMetadataModel { | ||
7 | streams: { [x: string]: any, [x: number]: any }[] | 2 | streams: { [x: string]: any, [x: number]: any }[] |
8 | format: { [x: string]: any, [x: number]: any } | 3 | format: { [x: string]: any, [x: number]: any } |
9 | chapters: any[] | 4 | chapters: any[] |
10 | 5 | ||
11 | constructor (hash: Partial<VideoFileMetadataModel>) { | 6 | constructor (hash: { chapters: any[], format: any, streams: any[] }) { |
12 | this.chapters = hash.chapters | 7 | this.chapters = hash.chapters |
13 | this.format = hash.format | 8 | this.format = hash.format |
14 | this.streams = hash.streams | 9 | this.streams = hash.streams |
diff --git a/shared/models/videos/video-file.model.ts b/shared/models/videos/video-file.model.ts index 6cc2d5aee..cbef05ac0 100644 --- a/shared/models/videos/video-file.model.ts +++ b/shared/models/videos/video-file.model.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { VideoConstant, VideoResolution } from '@shared/models' | 1 | |
2 | import { FfprobeData } from 'fluent-ffmpeg' | 2 | import { VideoConstant, VideoFileMetadata, VideoResolution } from '@shared/models' |
3 | 3 | ||
4 | export interface VideoFile { | 4 | export interface VideoFile { |
5 | magnetUri: string | 5 | magnetUri: string |
@@ -10,6 +10,6 @@ export interface VideoFile { | |||
10 | fileUrl: string | 10 | fileUrl: string |
11 | fileDownloadUrl: string | 11 | fileDownloadUrl: string |
12 | fps: number | 12 | fps: number |
13 | metadata?: FfprobeData | 13 | metadata?: VideoFileMetadata |
14 | metadataUrl?: string | 14 | metadataUrl?: string |
15 | } | 15 | } |
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 0f8822125..557e66e09 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | import { AccountSummary, VideoChannelSummary, VideoState } from '../../index' | 1 | import { Account, AccountSummary } from '../actors' |
2 | import { Account } from '../actors' | 2 | import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model' |
3 | import { VideoChannel } from './channel/video-channel.model' | 3 | import { VideoConstant } from './video-constant.model' |
4 | import { VideoFile } from './video-file.model' | ||
4 | import { VideoPrivacy } from './video-privacy.enum' | 5 | import { VideoPrivacy } from './video-privacy.enum' |
5 | import { VideoScheduleUpdate } from './video-schedule-update.model' | 6 | import { VideoScheduleUpdate } from './video-schedule-update.model' |
6 | import { VideoConstant } from './video-constant.model' | 7 | import { VideoState } from './video-state.enum' |
7 | import { VideoStreamingPlaylist } from './video-streaming-playlist.model' | 8 | import { VideoStreamingPlaylist } from './video-streaming-playlist.model' |
8 | import { VideoFile } from './video-file.model' | ||
9 | 9 | ||
10 | export interface Video { | 10 | export interface Video { |
11 | id: number | 11 | id: number |