mirror of https://github.com/Chocobozzz/PeerTube
Better file name for torrent
parent
2243730c8e
commit
81e504b34e
|
@ -168,7 +168,7 @@ const CONFIG = {
|
|||
get DESCRIPTION () { return config.get<string>('instance.description') },
|
||||
get TERMS () { return config.get<string>('instance.terms') },
|
||||
get DEFAULT_CLIENT_ROUTE () { return config.get<string>('instance.default_client_route') },
|
||||
get NSFW_POLICY () { return config.get<NSFWPolicyType>('instance.default_nsfw_policy') },
|
||||
get DEFAULT_NSFW_POLICY () { return config.get<NSFWPolicyType>('instance.default_nsfw_policy') },
|
||||
CUSTOMIZATIONS: {
|
||||
get JAVASCRIPT () { return config.get<string>('instance.customizations.javascript') },
|
||||
get CSS () { return config.get<string>('instance.customizations.css') }
|
||||
|
|
|
@ -944,8 +944,10 @@ export class VideoModel extends Model<VideoModel> {
|
|||
return join(CONFIG.STORAGE.VIDEOS_DIR, this.getVideoFilename(videoFile))
|
||||
}
|
||||
|
||||
createTorrentAndSetInfoHash = async function (videoFile: VideoFileModel) {
|
||||
async createTorrentAndSetInfoHash (videoFile: VideoFileModel) {
|
||||
const options = {
|
||||
name: this.name + videoFile.extname,
|
||||
createdBy: 'PeerTube',
|
||||
announceList: [
|
||||
[ CONFIG.WEBSERVER.WS + '://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT + '/tracker/socket' ],
|
||||
[ CONFIG.WEBSERVER.URL + '/tracker/announce' ]
|
||||
|
@ -1240,7 +1242,7 @@ export class VideoModel extends Model<VideoModel> {
|
|||
return peertubeTruncate(this.description, maxLength)
|
||||
}
|
||||
|
||||
optimizeOriginalVideofile = async function () {
|
||||
async optimizeOriginalVideofile () {
|
||||
const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR
|
||||
const newExtname = '.mp4'
|
||||
const inputVideoFile = this.getOriginalFile()
|
||||
|
@ -1277,7 +1279,7 @@ export class VideoModel extends Model<VideoModel> {
|
|||
}
|
||||
}
|
||||
|
||||
transcodeOriginalVideofile = async function (resolution: VideoResolution, isPortraitMode: boolean) {
|
||||
async transcodeOriginalVideofile (resolution: VideoResolution, isPortraitMode: boolean) {
|
||||
const videosDirectory = CONFIG.STORAGE.VIDEOS_DIR
|
||||
const extname = '.mp4'
|
||||
|
||||
|
|
Loading…
Reference in New Issue