diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-23 17:36:15 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:53 +0100 |
commit | 39445ead45aaaea801ec09991b8dd2464f722e47 (patch) | |
tree | 9306c6b89115dabdd4a7c31a59784134a0e1c804 /server/models/video/video-interface.ts | |
parent | 16b90975941b78d01d7202d441bf731a10048c16 (diff) | |
download | PeerTube-39445ead45aaaea801ec09991b8dd2464f722e47.tar.gz PeerTube-39445ead45aaaea801ec09991b8dd2464f722e47.tar.zst PeerTube-39445ead45aaaea801ec09991b8dd2464f722e47.zip |
Cleanup models
Diffstat (limited to 'server/models/video/video-interface.ts')
-rw-r--r-- | server/models/video/video-interface.ts | 17 |
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' | |||
3 | import { VideoTorrentObject } from '../../../shared/models/activitypub/objects/video-torrent-object' | 3 | import { VideoTorrentObject } from '../../../shared/models/activitypub/objects/video-torrent-object' |
4 | import { ResultList } from '../../../shared/models/result-list.model' | 4 | import { ResultList } from '../../../shared/models/result-list.model' |
5 | import { Video as FormattedVideo, VideoDetails as FormattedDetailsVideo } from '../../../shared/models/videos/video.model' | 5 | import { Video as FormattedVideo, VideoDetails as FormattedDetailsVideo } from '../../../shared/models/videos/video.model' |
6 | import { AccountVideoRateInstance } from '../account/account-video-rate-interface' | ||
6 | 7 | ||
7 | import { TagAttributes, TagInstance } from './tag-interface' | 8 | import { TagAttributes, TagInstance } from './tag-interface' |
8 | import { VideoChannelInstance } from './video-channel-interface' | 9 | import { VideoChannelInstance } from './video-channel-interface' |
9 | import { VideoFileAttributes, VideoFileInstance } from './video-file-interface' | 10 | import { VideoFileAttributes, VideoFileInstance } from './video-file-interface' |
10 | import { VideoShareInstance } from './video-share-interface' | 11 | import { VideoShareInstance } from './video-share-interface' |
11 | import { UserVideoRate } from '../../../shared/models/videos/user-video-rate.model' | ||
12 | import { AccountVideoRateInstance } from '../account/account-video-rate-interface' | ||
13 | 12 | ||
14 | export namespace VideoMethods { | 13 | export 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 | ||
81 | export interface VideoClass { | 72 | export 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 | } |