diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-19 15:13:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-19 15:13:41 +0200 |
commit | 81e504b34e71e91633442c8021e05f9cd52a49c6 (patch) | |
tree | 69d2a63af1baa99216ec6a1eca1b9b2228171a5a /server/models | |
parent | 2243730c8edf210c0a3ffc161bac89785f6a52f0 (diff) | |
download | PeerTube-81e504b34e71e91633442c8021e05f9cd52a49c6.tar.gz PeerTube-81e504b34e71e91633442c8021e05f9cd52a49c6.tar.zst PeerTube-81e504b34e71e91633442c8021e05f9cd52a49c6.zip |
Better file name for torrent
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video.ts | 8 |
1 files changed, 5 insertions, 3 deletions
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 | ||