aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-playlist.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/video-playlist.ts')
-rw-r--r--server/lib/video-playlist.ts30
1 files changed, 0 insertions, 30 deletions
diff --git a/server/lib/video-playlist.ts b/server/lib/video-playlist.ts
deleted file mode 100644
index a1af2e1af..000000000
--- a/server/lib/video-playlist.ts
+++ /dev/null
@@ -1,30 +0,0 @@
1import * as Sequelize from 'sequelize'
2import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model'
3import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model'
4import { VideoPlaylistModel } from '../models/video/video-playlist'
5import { MAccount } from '../types/models'
6import { MVideoPlaylistOwner } from '../types/models/video/video-playlist'
7import { getLocalVideoPlaylistActivityPubUrl } from './activitypub/url'
8
9async function createWatchLaterPlaylist (account: MAccount, t: Sequelize.Transaction) {
10 const videoPlaylist: MVideoPlaylistOwner = new VideoPlaylistModel({
11 name: 'Watch later',
12 privacy: VideoPlaylistPrivacy.PRIVATE,
13 type: VideoPlaylistType.WATCH_LATER,
14 ownerAccountId: account.id
15 })
16
17 videoPlaylist.url = getLocalVideoPlaylistActivityPubUrl(videoPlaylist) // We use the UUID, so set the URL after building the object
18
19 await videoPlaylist.save({ transaction: t })
20
21 videoPlaylist.OwnerAccount = account
22
23 return videoPlaylist
24}
25
26// ---------------------------------------------------------------------------
27
28export {
29 createWatchLaterPlaylist
30}