From 9c6ca37fc1512a99d420ea90707cebcd06cdc970 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 5 Mar 2019 12:00:31 +0100 Subject: Rename streaming playlists routes/directories --- server/lib/activitypub/url.ts | 2 +- server/lib/hls.ts | 6 +++--- server/lib/video-transcoding.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'server/lib') diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts index c80b09436..7c2ee5bc6 100644 --- a/server/lib/activitypub/url.ts +++ b/server/lib/activitypub/url.ts @@ -27,7 +27,7 @@ function getVideoCacheFileActivityPubUrl (videoFile: VideoFileModel) { } function getVideoCacheStreamingPlaylistActivityPubUrl (video: VideoModel, playlist: VideoStreamingPlaylistModel) { - return `${CONFIG.WEBSERVER.URL}/redundancy/video-playlists/${playlist.getStringType()}/${video.uuid}` + return `${CONFIG.WEBSERVER.URL}/redundancy/streaming-playlists/${playlist.getStringType()}/${video.uuid}` } function getVideoCommentActivityPubUrl (video: VideoModel, videoComment: VideoCommentModel) { diff --git a/server/lib/hls.ts b/server/lib/hls.ts index 16a805ac2..74ed25183 100644 --- a/server/lib/hls.ts +++ b/server/lib/hls.ts @@ -1,6 +1,6 @@ import { VideoModel } from '../models/video/video' import { basename, join, dirname } from 'path' -import { CONFIG, HLS_PLAYLIST_DIRECTORY } from '../initializers' +import { CONFIG, HLS_STREAMING_PLAYLIST_DIRECTORY } from '../initializers' import { close, ensureDir, move, open, outputJSON, pathExists, read, readFile, remove, writeFile } from 'fs-extra' import { getVideoFileSize } from '../helpers/ffmpeg-utils' import { sha256 } from '../helpers/core-utils' @@ -11,7 +11,7 @@ import { generateRandomString } from '../helpers/utils' import { flatten, uniq } from 'lodash' async function updateMasterHLSPlaylist (video: VideoModel) { - const directory = join(HLS_PLAYLIST_DIRECTORY, video.uuid) + const directory = join(HLS_STREAMING_PLAYLIST_DIRECTORY, video.uuid) const masterPlaylists: string[] = [ '#EXTM3U', '#EXT-X-VERSION:3' ] const masterPlaylistPath = join(directory, VideoStreamingPlaylistModel.getMasterHlsPlaylistFilename()) @@ -40,7 +40,7 @@ async function updateMasterHLSPlaylist (video: VideoModel) { async function updateSha256Segments (video: VideoModel) { const json: { [filename: string]: { [range: string]: string } } = {} - const playlistDirectory = join(HLS_PLAYLIST_DIRECTORY, video.uuid) + const playlistDirectory = join(HLS_STREAMING_PLAYLIST_DIRECTORY, video.uuid) // For all the resolutions available for this video for (const file of video.VideoFiles) { diff --git a/server/lib/video-transcoding.ts b/server/lib/video-transcoding.ts index 086b860a2..e932c0e55 100644 --- a/server/lib/video-transcoding.ts +++ b/server/lib/video-transcoding.ts @@ -1,4 +1,4 @@ -import { CONFIG, HLS_PLAYLIST_DIRECTORY } from '../initializers' +import { CONFIG, HLS_STREAMING_PLAYLIST_DIRECTORY } from '../initializers' import { extname, join } from 'path' import { getVideoFileFPS, getVideoFileResolution, transcode } from '../helpers/ffmpeg-utils' import { copy, ensureDir, move, remove, stat } from 'fs-extra' @@ -89,8 +89,8 @@ async function transcodeOriginalVideofile (video: VideoModel, resolution: VideoR } async function generateHlsPlaylist (video: VideoModel, resolution: VideoResolution, isPortraitMode: boolean) { - const baseHlsDirectory = join(HLS_PLAYLIST_DIRECTORY, video.uuid) - await ensureDir(join(HLS_PLAYLIST_DIRECTORY, video.uuid)) + const baseHlsDirectory = join(HLS_STREAMING_PLAYLIST_DIRECTORY, video.uuid) + await ensureDir(join(HLS_STREAMING_PLAYLIST_DIRECTORY, video.uuid)) const videoInputPath = join(CONFIG.STORAGE.VIDEOS_DIR, video.getVideoFilename(video.getOriginalFile())) const outputPath = join(baseHlsDirectory, VideoStreamingPlaylistModel.getHlsPlaylistFilename(resolution)) -- cgit v1.2.3