diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-08 15:34:07 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-08 15:40:23 +0200 |
commit | efa3fef23ecf4e1c5289f8715de184c272ea49f7 (patch) | |
tree | 51c18b48c90d3a5d857b7e430af66a7ff2b39581 /server/models/video | |
parent | f82416cc58f6c1d0496935e815f3fcb2fdda88ea (diff) | |
download | PeerTube-efa3fef23ecf4e1c5289f8715de184c272ea49f7.tar.gz PeerTube-efa3fef23ecf4e1c5289f8715de184c272ea49f7.tar.zst PeerTube-efa3fef23ecf4e1c5289f8715de184c272ea49f7.zip |
Fix notification on create transcoding job
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index e0c4dd2db..d2daf18ee 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -1766,12 +1766,12 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> { | |||
1766 | this.privacy === VideoPrivacy.INTERNAL | 1766 | this.privacy === VideoPrivacy.INTERNAL |
1767 | } | 1767 | } |
1768 | 1768 | ||
1769 | async setNewState (newState: VideoState, transaction: Transaction) { | 1769 | async setNewState (newState: VideoState, isNewVideo: boolean, transaction: Transaction) { |
1770 | if (this.state === newState) throw new Error('Cannot use same state ' + newState) | 1770 | if (this.state === newState) throw new Error('Cannot use same state ' + newState) |
1771 | 1771 | ||
1772 | this.state = newState | 1772 | this.state = newState |
1773 | 1773 | ||
1774 | if (this.state === VideoState.PUBLISHED) { | 1774 | if (this.state === VideoState.PUBLISHED && isNewVideo) { |
1775 | this.publishedAt = new Date() | 1775 | this.publishedAt = new Date() |
1776 | } | 1776 | } |
1777 | 1777 | ||