diff options
-rw-r--r-- | server/initializers/constants.ts | 2 | ||||
-rw-r--r-- | server/models/video/video.ts | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index fb436366c..d1915586a 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -168,7 +168,7 @@ const CONFIG = { | |||
168 | get DESCRIPTION () { return config.get<string>('instance.description') }, | 168 | get DESCRIPTION () { return config.get<string>('instance.description') }, |
169 | get TERMS () { return config.get<string>('instance.terms') }, | 169 | get TERMS () { return config.get<string>('instance.terms') }, |
170 | get DEFAULT_CLIENT_ROUTE () { return config.get<string>('instance.default_client_route') }, | 170 | get DEFAULT_CLIENT_ROUTE () { return config.get<string>('instance.default_client_route') }, |
171 | get NSFW_POLICY () { return config.get<NSFWPolicyType>('instance.default_nsfw_policy') }, | 171 | get DEFAULT_NSFW_POLICY () { return config.get<NSFWPolicyType>('instance.default_nsfw_policy') }, |
172 | CUSTOMIZATIONS: { | 172 | CUSTOMIZATIONS: { |
173 | get JAVASCRIPT () { return config.get<string>('instance.customizations.javascript') }, | 173 | get JAVASCRIPT () { return config.get<string>('instance.customizations.javascript') }, |
174 | get CSS () { return config.get<string>('instance.customizations.css') } | 174 | get CSS () { return config.get<string>('instance.customizations.css') } |
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index c08d18b71..70d3948ee 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -944,8 +944,10 @@ export class VideoModel extends Model<VideoModel> { | |||
944 | return join(CONFIG.STORAGE.VIDEOS_DIR, this.getVideoFilename(videoFile)) | 944 | return join(CONFIG.STORAGE.VIDEOS_DIR, this.getVideoFilename(videoFile)) |
945 | } | 945 | } |
946 | 946 | ||
947 | createTorrentAndSetInfoHash = async function (videoFile: VideoFileModel) { | 947 | async createTorrentAndSetInfoHash (videoFile: VideoFileModel) { |
948 | const options = { | 948 | const options = { |
949 | name: this.name + videoFile.extname, | ||
950 | createdBy: 'PeerTube', | ||
949 | announceList: [ | 951 | announceList: [ |
950 | [ CONFIG.WEBSERVER.WS + '://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT + '/tracker/socket' ], | 952 | [ CONFIG.WEBSERVER.WS + '://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT + '/tracker/socket' ], |
951 | [ CONFIG.WEBSERVER.URL + '/tracker/announce' ] | 953 | [ CONFIG.WEBSERVER.URL + '/tracker/announce' ] |
@@ -1240,7 +1242,7 @@ export class VideoModel extends Model<VideoModel> { | |||
1240 | return peertubeTruncate(this.description, maxLength) | 1242 | return peertubeTruncate(this.description, maxLength) |
1241 | } | 1243 | } |
1242 | 1244 | ||
1243 | optimizeOriginalVideofile = async function () { | 1245 | async optimizeOriginalVideofile () { |
1244 | const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR | 1246 | const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR |
1245 | const newExtname = '.mp4' | 1247 | const newExtname = '.mp4' |
1246 | const inputVideoFile = this.getOriginalFile() | 1248 | const inputVideoFile = this.getOriginalFile() |
@@ -1277,7 +1279,7 @@ export class VideoModel extends Model<VideoModel> { | |||
1277 | } | 1279 | } |
1278 | } | 1280 | } |
1279 | 1281 | ||
1280 | transcodeOriginalVideofile = async function (resolution: VideoResolution, isPortraitMode: boolean) { | 1282 | async transcodeOriginalVideofile (resolution: VideoResolution, isPortraitMode: boolean) { |
1281 | const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR | 1283 | const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR |
1282 | const extname = '.mp4' | 1284 | const extname = '.mp4' |
1283 | 1285 | ||