aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-interface.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-interface.ts')
-rw-r--r--server/models/video/video-interface.ts17
1 files changed, 1 insertions, 16 deletions
diff --git a/server/models/video/video-interface.ts b/server/models/video/video-interface.ts
index 89e528acf..be140de86 100644
--- a/server/models/video/video-interface.ts
+++ b/server/models/video/video-interface.ts
@@ -3,13 +3,12 @@ import * as Sequelize from 'sequelize'
3import { VideoTorrentObject } from '../../../shared/models/activitypub/objects/video-torrent-object' 3import { VideoTorrentObject } from '../../../shared/models/activitypub/objects/video-torrent-object'
4import { ResultList } from '../../../shared/models/result-list.model' 4import { ResultList } from '../../../shared/models/result-list.model'
5import { Video as FormattedVideo, VideoDetails as FormattedDetailsVideo } from '../../../shared/models/videos/video.model' 5import { Video as FormattedVideo, VideoDetails as FormattedDetailsVideo } from '../../../shared/models/videos/video.model'
6import { AccountVideoRateInstance } from '../account/account-video-rate-interface'
6 7
7import { TagAttributes, TagInstance } from './tag-interface' 8import { TagAttributes, TagInstance } from './tag-interface'
8import { VideoChannelInstance } from './video-channel-interface' 9import { VideoChannelInstance } from './video-channel-interface'
9import { VideoFileAttributes, VideoFileInstance } from './video-file-interface' 10import { VideoFileAttributes, VideoFileInstance } from './video-file-interface'
10import { VideoShareInstance } from './video-share-interface' 11import { VideoShareInstance } from './video-share-interface'
11import { UserVideoRate } from '../../../shared/models/videos/user-video-rate.model'
12import { AccountVideoRateInstance } from '../account/account-video-rate-interface'
13 12
14export namespace VideoMethods { 13export namespace VideoMethods {
15 export type GetThumbnailName = (this: VideoInstance) => string 14 export type GetThumbnailName = (this: VideoInstance) => string
@@ -40,12 +39,7 @@ export namespace VideoMethods {
40 export type GetLicenceLabel = (this: VideoInstance) => string 39 export type GetLicenceLabel = (this: VideoInstance) => string
41 export type GetLanguageLabel = (this: VideoInstance) => string 40 export type GetLanguageLabel = (this: VideoInstance) => string
42 41
43 // Return thumbnail name
44 export type GenerateThumbnailFromData = (video: VideoInstance, thumbnailData: string) => Promise<string>
45
46 export type List = () => Bluebird<VideoInstance[]> 42 export type List = () => Bluebird<VideoInstance[]>
47 export type ListOwnedAndPopulateAccountAndTags = () => Bluebird<VideoInstance[]>
48 export type ListOwnedByAccount = (account: string) => Bluebird<VideoInstance[]>
49 43
50 export type ListAllAndSharedByAccountForOutbox = ( 44 export type ListAllAndSharedByAccountForOutbox = (
51 accountId: number, 45 accountId: number,
@@ -65,9 +59,6 @@ export namespace VideoMethods {
65 export type Load = (id: number) => Bluebird<VideoInstance> 59 export type Load = (id: number) => Bluebird<VideoInstance>
66 export type LoadByUUID = (uuid: string, t?: Sequelize.Transaction) => Bluebird<VideoInstance> 60 export type LoadByUUID = (uuid: string, t?: Sequelize.Transaction) => Bluebird<VideoInstance>
67 export type LoadByUrlAndPopulateAccount = (url: string, t?: Sequelize.Transaction) => Bluebird<VideoInstance> 61 export type LoadByUrlAndPopulateAccount = (url: string, t?: Sequelize.Transaction) => Bluebird<VideoInstance>
68 export type LoadLocalVideoByUUID = (uuid: string, t?: Sequelize.Transaction) => Bluebird<VideoInstance>
69 export type LoadByHostAndUUID = (fromHost: string, uuid: string, t?: Sequelize.Transaction) => Bluebird<VideoInstance>
70 export type LoadAndPopulateAccount = (id: number) => Bluebird<VideoInstance>
71 export type LoadAndPopulateAccountAndServerAndTags = (id: number) => Bluebird<VideoInstance> 62 export type LoadAndPopulateAccountAndServerAndTags = (id: number) => Bluebird<VideoInstance>
72 export type LoadByUUIDAndPopulateAccountAndServerAndTags = (uuid: string) => Bluebird<VideoInstance> 63 export type LoadByUUIDAndPopulateAccountAndServerAndTags = (uuid: string) => Bluebird<VideoInstance>
73 export type LoadByUUIDOrURL = (uuid: string, url: string, t?: Sequelize.Transaction) => Bluebird<VideoInstance> 64 export type LoadByUUIDOrURL = (uuid: string, url: string, t?: Sequelize.Transaction) => Bluebird<VideoInstance>
@@ -79,21 +70,15 @@ export namespace VideoMethods {
79} 70}
80 71
81export interface VideoClass { 72export interface VideoClass {
82 generateThumbnailFromData: VideoMethods.GenerateThumbnailFromData
83 list: VideoMethods.List 73 list: VideoMethods.List
84 listAllAndSharedByAccountForOutbox: VideoMethods.ListAllAndSharedByAccountForOutbox 74 listAllAndSharedByAccountForOutbox: VideoMethods.ListAllAndSharedByAccountForOutbox
85 listForApi: VideoMethods.ListForApi 75 listForApi: VideoMethods.ListForApi
86 listUserVideosForApi: VideoMethods.ListUserVideosForApi 76 listUserVideosForApi: VideoMethods.ListUserVideosForApi
87 listOwnedAndPopulateAccountAndTags: VideoMethods.ListOwnedAndPopulateAccountAndTags
88 listOwnedByAccount: VideoMethods.ListOwnedByAccount
89 load: VideoMethods.Load 77 load: VideoMethods.Load
90 loadAndPopulateAccount: VideoMethods.LoadAndPopulateAccount
91 loadAndPopulateAccountAndServerAndTags: VideoMethods.LoadAndPopulateAccountAndServerAndTags 78 loadAndPopulateAccountAndServerAndTags: VideoMethods.LoadAndPopulateAccountAndServerAndTags
92 loadByHostAndUUID: VideoMethods.LoadByHostAndUUID
93 loadByUUID: VideoMethods.LoadByUUID 79 loadByUUID: VideoMethods.LoadByUUID
94 loadByUrlAndPopulateAccount: VideoMethods.LoadByUrlAndPopulateAccount 80 loadByUrlAndPopulateAccount: VideoMethods.LoadByUrlAndPopulateAccount
95 loadByUUIDOrURL: VideoMethods.LoadByUUIDOrURL 81 loadByUUIDOrURL: VideoMethods.LoadByUUIDOrURL
96 loadLocalVideoByUUID: VideoMethods.LoadLocalVideoByUUID
97 loadByUUIDAndPopulateAccountAndServerAndTags: VideoMethods.LoadByUUIDAndPopulateAccountAndServerAndTags 82 loadByUUIDAndPopulateAccountAndServerAndTags: VideoMethods.LoadByUUIDAndPopulateAccountAndServerAndTags
98 searchAndPopulateAccountAndServerAndTags: VideoMethods.SearchAndPopulateAccountAndServerAndTags 83 searchAndPopulateAccountAndServerAndTags: VideoMethods.SearchAndPopulateAccountAndServerAndTags
99} 84}