aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-02 10:07:26 +0100
committerChocobozzz <me@florianbigard.com>2020-12-02 10:18:15 +0100
commit2650d6d489f775a38c5c3fdb65daabc7d55c15b5 (patch)
tree3065083bd5e8889601423521710caf3c0e989811 /server/models/video
parent543e18726214aa789acecba5615fff1bec83d4cc (diff)
downloadPeerTube-2650d6d489f775a38c5c3fdb65daabc7d55c15b5.tar.gz
PeerTube-2650d6d489f775a38c5c3fdb65daabc7d55c15b5.tar.zst
PeerTube-2650d6d489f775a38c5c3fdb65daabc7d55c15b5.zip
Fix live replay duration glitch
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video-playlist.ts32
1 files changed, 16 insertions, 16 deletions
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts
index b020bfa45..9f9e0b069 100644
--- a/server/models/video/video-playlist.ts
+++ b/server/models/video/video-playlist.ts
@@ -1,3 +1,6 @@
1import * as Bluebird from 'bluebird'
2import { join } from 'path'
3import { FindOptions, literal, Op, ScopeOptions, Transaction, WhereOptions } from 'sequelize'
1import { 4import {
2 AllowNull, 5 AllowNull,
3 BelongsTo, 6 BelongsTo,
@@ -15,14 +18,19 @@ import {
15 Table, 18 Table,
16 UpdatedAt 19 UpdatedAt
17} from 'sequelize-typescript' 20} from 'sequelize-typescript'
21import { MAccountId, MChannelId } from '@server/types/models'
22import { ActivityIconObject } from '../../../shared/models/activitypub/objects'
23import { PlaylistObject } from '../../../shared/models/activitypub/objects/playlist-object'
18import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' 24import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model'
19import { buildServerIdsFollowedBy, buildWhereIdOrUUID, getPlaylistSort, getPlaylistSort, isOutdated, throwIfNotValid } from '../utils' 25import { VideoPlaylistType } from '../../../shared/models/videos/playlist/video-playlist-type.model'
26import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model'
27import { activityPubCollectionPagination } from '../../helpers/activitypub'
28import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
20import { 29import {
21 isVideoPlaylistDescriptionValid, 30 isVideoPlaylistDescriptionValid,
22 isVideoPlaylistNameValid, 31 isVideoPlaylistNameValid,
23 isVideoPlaylistPrivacyValid 32 isVideoPlaylistPrivacyValid
24} from '../../helpers/custom-validators/video-playlists' 33} from '../../helpers/custom-validators/video-playlists'
25import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
26import { 34import {
27 ACTIVITY_PUB, 35 ACTIVITY_PUB,
28 CONSTRAINTS_FIELDS, 36 CONSTRAINTS_FIELDS,
@@ -32,18 +40,7 @@ import {
32 VIDEO_PLAYLIST_TYPES, 40 VIDEO_PLAYLIST_TYPES,
33 WEBSERVER 41 WEBSERVER
34} from '../../initializers/constants' 42} from '../../initializers/constants'
35import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model' 43import { MThumbnail } from '../../types/models/video/thumbnail'
36import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions } from '../account/account'
37import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel'
38import { join } from 'path'
39import { VideoPlaylistElementModel } from './video-playlist-element'
40import { PlaylistObject } from '../../../shared/models/activitypub/objects/playlist-object'
41import { activityPubCollectionPagination } from '../../helpers/activitypub'
42import { VideoPlaylistType } from '../../../shared/models/videos/playlist/video-playlist-type.model'
43import { ThumbnailModel } from './thumbnail'
44import { ActivityIconObject } from '../../../shared/models/activitypub/objects'
45import { FindOptions, literal, Op, ScopeOptions, Transaction, WhereOptions } from 'sequelize'
46import * as Bluebird from 'bluebird'
47import { 44import {
48 MVideoPlaylistAccountThumbnail, 45 MVideoPlaylistAccountThumbnail,
49 MVideoPlaylistAP, 46 MVideoPlaylistAP,
@@ -52,8 +49,11 @@ import {
52 MVideoPlaylistFullSummary, 49 MVideoPlaylistFullSummary,
53 MVideoPlaylistIdWithElements 50 MVideoPlaylistIdWithElements
54} from '../../types/models/video/video-playlist' 51} from '../../types/models/video/video-playlist'
55import { MThumbnail } from '../../types/models/video/thumbnail' 52import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions } from '../account/account'
56import { MAccountId, MChannelId } from '@server/types/models' 53import { buildServerIdsFollowedBy, buildWhereIdOrUUID, getPlaylistSort, isOutdated, throwIfNotValid } from '../utils'
54import { ThumbnailModel } from './thumbnail'
55import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel'
56import { VideoPlaylistElementModel } from './video-playlist-element'
57 57
58enum ScopeNames { 58enum ScopeNames {
59 AVAILABLE_FOR_LIST = 'AVAILABLE_FOR_LIST', 59 AVAILABLE_FOR_LIST = 'AVAILABLE_FOR_LIST',