import { ResultList } from '../../../shared/models/result-list.model'
export type FormatedAddRemoteVideo = {
+ uuid: string
name: string
category: number
licence: number
nsfw: boolean
description: string
infoHash: string
- remoteId: string
author: string
duration: number
thumbnailData: string
}
export type FormatedUpdateRemoteVideo = {
+ uuid: string
name: string
category: number
licence: number
nsfw: boolean
description: string
infoHash: string
- remoteId: string
author: string
duration: number
tags: string[]
sort: string
) => Promise< ResultList<VideoInstance> >
- export type Load = (id: string) => Promise<VideoInstance>
- export type LoadByHostAndRemoteId = (fromHost: string, remoteId: string) => Promise<VideoInstance>
- export type LoadAndPopulateAuthor = (id: string) => Promise<VideoInstance>
- export type LoadAndPopulateAuthorAndPodAndTags = (id: string) => Promise<VideoInstance>
+ export type Load = (id: number) => Promise<VideoInstance>
+ export type LoadByUUID = (uuid: string) => Promise<VideoInstance>
+ export type LoadByHostAndUUID = (fromHost: string, uuid: string) => Promise<VideoInstance>
+ export type LoadAndPopulateAuthor = (id: number) => Promise<VideoInstance>
+ export type LoadAndPopulateAuthorAndPodAndTags = (id: number) => Promise<VideoInstance>
+ export type LoadByUUIDAndPopulateAuthorAndPodAndTags = (uuid: string) => Promise<VideoInstance>
}
export interface VideoClass {
getDurationFromFile: VideoMethods.GetDurationFromFile
list: VideoMethods.List
listForApi: VideoMethods.ListForApi
- loadByHostAndRemoteId: VideoMethods.LoadByHostAndRemoteId
+ loadByHostAndUUID: VideoMethods.LoadByHostAndUUID
listOwnedAndPopulateAuthorAndTags: VideoMethods.ListOwnedAndPopulateAuthorAndTags
listOwnedByAuthor: VideoMethods.ListOwnedByAuthor
load: VideoMethods.Load
+ loadByUUID: VideoMethods.LoadByUUID
loadAndPopulateAuthor: VideoMethods.LoadAndPopulateAuthor
loadAndPopulateAuthorAndPodAndTags: VideoMethods.LoadAndPopulateAuthorAndPodAndTags
+ loadByUUIDAndPopulateAuthorAndPodAndTags: VideoMethods.LoadByUUIDAndPopulateAuthorAndPodAndTags
searchAndPopulateAuthorAndPodAndTags: VideoMethods.SearchAndPopulateAuthorAndPodAndTags
}
export interface VideoAttributes {
+ uuid?: string
name: string
extname: string
- remoteId: string
category: number
licence: number
language: number
views?: number
likes?: number
dislikes?: number
+ remote: boolean
Author?: AuthorInstance
Tags?: TagInstance[]
}
export interface VideoInstance extends VideoClass, VideoAttributes, Sequelize.Instance<VideoAttributes> {
- id: string
+ id: number
createdAt: Date
updatedAt: Date