diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-11 09:21:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-11 09:21:13 +0200 |
commit | 784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428 (patch) | |
tree | 29c46cfd6344065eb805680ed080cb05592ee1d4 /server/lib/activitypub | |
parent | c3030e944ad03c7fd7b5d668a2d88ff03e4cdf19 (diff) | |
download | PeerTube-784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428.tar.gz PeerTube-784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428.tar.zst PeerTube-784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428.zip |
Prefer web videos in favour of webtorrent
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/videos/shared/abstract-builder.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/videos/shared/creator.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/videos/updater.ts | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/videos/shared/abstract-builder.ts b/server/lib/activitypub/videos/shared/abstract-builder.ts index 8b6a7fd75..98c2f58eb 100644 --- a/server/lib/activitypub/videos/shared/abstract-builder.ts +++ b/server/lib/activitypub/videos/shared/abstract-builder.ts | |||
@@ -126,7 +126,7 @@ export abstract class APVideoAbstractBuilder { | |||
126 | video.VideoLive = videoLive | 126 | video.VideoLive = videoLive |
127 | } | 127 | } |
128 | 128 | ||
129 | protected async setWebTorrentFiles (video: MVideoFullLight, t: Transaction) { | 129 | protected async setWebVideoFiles (video: MVideoFullLight, t: Transaction) { |
130 | const videoFileAttributes = getFileAttributesFromUrl(video, this.videoObject.url) | 130 | const videoFileAttributes = getFileAttributesFromUrl(video, this.videoObject.url) |
131 | const newVideoFiles = videoFileAttributes.map(a => new VideoFileModel(a)) | 131 | const newVideoFiles = videoFileAttributes.map(a => new VideoFileModel(a)) |
132 | 132 | ||
diff --git a/server/lib/activitypub/videos/shared/creator.ts b/server/lib/activitypub/videos/shared/creator.ts index 3d646ef66..bc139e4fa 100644 --- a/server/lib/activitypub/videos/shared/creator.ts +++ b/server/lib/activitypub/videos/shared/creator.ts | |||
@@ -33,7 +33,7 @@ export class APVideoCreator extends APVideoAbstractBuilder { | |||
33 | 33 | ||
34 | await this.setThumbnail(videoCreated, t) | 34 | await this.setThumbnail(videoCreated, t) |
35 | await this.setPreview(videoCreated, t) | 35 | await this.setPreview(videoCreated, t) |
36 | await this.setWebTorrentFiles(videoCreated, t) | 36 | await this.setWebVideoFiles(videoCreated, t) |
37 | await this.setStreamingPlaylists(videoCreated, t) | 37 | await this.setStreamingPlaylists(videoCreated, t) |
38 | await this.setTags(videoCreated, t) | 38 | await this.setTags(videoCreated, t) |
39 | await this.setTrackers(videoCreated, t) | 39 | await this.setTrackers(videoCreated, t) |
diff --git a/server/lib/activitypub/videos/updater.ts b/server/lib/activitypub/videos/updater.ts index c98bce662..522d7b043 100644 --- a/server/lib/activitypub/videos/updater.ts +++ b/server/lib/activitypub/videos/updater.ts | |||
@@ -50,7 +50,7 @@ export class APVideoUpdater extends APVideoAbstractBuilder { | |||
50 | if (thumbnailModel) await videoUpdated.addAndSaveThumbnail(thumbnailModel) | 50 | if (thumbnailModel) await videoUpdated.addAndSaveThumbnail(thumbnailModel) |
51 | 51 | ||
52 | await runInReadCommittedTransaction(async t => { | 52 | await runInReadCommittedTransaction(async t => { |
53 | await this.setWebTorrentFiles(videoUpdated, t) | 53 | await this.setWebVideoFiles(videoUpdated, t) |
54 | await this.setStreamingPlaylists(videoUpdated, t) | 54 | await this.setStreamingPlaylists(videoUpdated, t) |
55 | }) | 55 | }) |
56 | 56 | ||