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/plugins | |
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/plugins')
-rw-r--r-- | server/lib/plugins/plugin-helpers-builder.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/server/lib/plugins/plugin-helpers-builder.ts b/server/lib/plugins/plugin-helpers-builder.ts index d235f52c0..b4e3eece4 100644 --- a/server/lib/plugins/plugin-helpers-builder.ts +++ b/server/lib/plugins/plugin-helpers-builder.ts | |||
@@ -104,7 +104,7 @@ function buildVideosHelpers () { | |||
104 | const video = await VideoModel.loadFull(id) | 104 | const video = await VideoModel.loadFull(id) |
105 | if (!video) return undefined | 105 | if (!video) return undefined |
106 | 106 | ||
107 | const webtorrentVideoFiles = (video.VideoFiles || []).map(f => ({ | 107 | const webVideoFiles = (video.VideoFiles || []).map(f => ({ |
108 | path: f.storage === VideoStorage.FILE_SYSTEM | 108 | path: f.storage === VideoStorage.FILE_SYSTEM |
109 | ? VideoPathManager.Instance.getFSVideoFileOutputPath(video, f) | 109 | ? VideoPathManager.Instance.getFSVideoFileOutputPath(video, f) |
110 | : null, | 110 | : null, |
@@ -138,8 +138,12 @@ function buildVideosHelpers () { | |||
138 | })) | 138 | })) |
139 | 139 | ||
140 | return { | 140 | return { |
141 | webtorrent: { | 141 | webtorrent: { // TODO: remove in v7 |
142 | videoFiles: webtorrentVideoFiles | 142 | videoFiles: webVideoFiles |
143 | }, | ||
144 | |||
145 | webVideo: { | ||
146 | videoFiles: webVideoFiles | ||
143 | }, | 147 | }, |
144 | 148 | ||
145 | hls: { | 149 | hls: { |