From ad3fa0c56715f98886b1b6400fc54ce7d568d899 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Jan 2019 17:45:02 +0100 Subject: Add missing translations in embed template --- scripts/i18n/create-custom-files.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/i18n/create-custom-files.ts b/scripts/i18n/create-custom-files.ts index eed3182a6..ab28f94c8 100755 --- a/scripts/i18n/create-custom-files.ts +++ b/scripts/i18n/create-custom-files.ts @@ -42,6 +42,12 @@ values(VIDEO_CATEGORIES) .concat(values(VIDEO_PRIVACIES)) .concat(values(VIDEO_STATES)) .concat(values(VIDEO_IMPORT_STATES)) + .concat([ + 'This video does not exist.', + 'We cannot fetch the video. Please try again later.', + 'Sorry', + 'This video is not available because the remote instance is not responding.' + ]) .forEach(v => serverKeys[v] = v) // More keys @@ -103,4 +109,4 @@ function saveToXliffFile (jsonTranslations: TranslationType, cb: Function) { function handleError (err: any) { console.error(err) process.exit(-1) -} \ No newline at end of file +} -- cgit v1.2.3 From 2adfc7ea9a1f858db874df9fe322e7ae833db77c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 23 Jan 2019 15:36:45 +0100 Subject: Refractor videojs player Add fake p2p-media-loader plugin --- scripts/dev/server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/dev/server.sh b/scripts/dev/server.sh index 9b8fddac6..b4675c57f 100755 --- a/scripts/dev/server.sh +++ b/scripts/dev/server.sh @@ -4,7 +4,7 @@ set -eu if [ ! -f "./client/dist/en_US/index.html" ]; then echo "client/dist/en_US/index.html does not exist, compile client files..." - npm run build:client + npm run build:client -- --light fi npm run watch:server -- cgit v1.2.3 From 092092969633bbcf6d4891a083ea497a7d5c3154 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 29 Jan 2019 08:37:25 +0100 Subject: Add hls support on server --- scripts/i18n/create-custom-files.ts | 5 ++++- scripts/update-host.ts | 14 ++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/i18n/create-custom-files.ts b/scripts/i18n/create-custom-files.ts index ab28f94c8..664207e1c 100755 --- a/scripts/i18n/create-custom-files.ts +++ b/scripts/i18n/create-custom-files.ts @@ -23,12 +23,15 @@ const playerKeys = { 'Speed': 'Speed', 'Subtitles/CC': 'Subtitles/CC', 'peers': 'peers', + 'peer': 'peer', 'Go to the video page': 'Go to the video page', 'Settings': 'Settings', 'Uses P2P, others may know you are watching this video.': 'Uses P2P, others may know you are watching this video.', 'Copy the video URL': 'Copy the video URL', 'Copy the video URL at the current time': 'Copy the video URL at the current time', - 'Copy embed code': 'Copy embed code' + 'Copy embed code': 'Copy embed code', + 'Total downloaded: ': 'Total downloaded: ', + 'Total uploaded: ': 'Total uploaded: ' } const playerTranslations = { target: join(__dirname, '../../../client/src/locale/source/player_en_US.xml'), diff --git a/scripts/update-host.ts b/scripts/update-host.ts index 422a3c9a7..64eba867a 100755 --- a/scripts/update-host.ts +++ b/scripts/update-host.ts @@ -13,6 +13,7 @@ import { VideoCommentModel } from '../server/models/video/video-comment' import { getServerActor } from '../server/helpers/utils' import { AccountModel } from '../server/models/account/account' import { VideoChannelModel } from '../server/models/video/video-channel' +import { VideoStreamingPlaylistModel } from '../server/models/video/video-streaming-playlist' run() .then(() => process.exit(0)) @@ -109,11 +110,9 @@ async function run () { console.log('Updating video and torrent files.') - const videos = await VideoModel.list() + const videos = await VideoModel.listLocal() for (const video of videos) { - if (video.isOwned() === false) continue - - console.log('Updated video ' + video.uuid) + console.log('Updating video ' + video.uuid) video.url = getVideoActivityPubUrl(video) await video.save() @@ -122,5 +121,12 @@ async function run () { console.log('Updating torrent file %s of video %s.', file.resolution, video.uuid) await video.createTorrentAndSetInfoHash(file) } + + for (const playlist of video.VideoStreamingPlaylists) { + playlist.playlistUrl = CONFIG.WEBSERVER.URL + VideoStreamingPlaylistModel.getHlsMasterPlaylistStaticPath(video.uuid) + playlist.segmentsSha256Url = CONFIG.WEBSERVER.URL + VideoStreamingPlaylistModel.getHlsSha256SegmentsStaticPath(video.uuid) + + await playlist.save() + } } } -- cgit v1.2.3 From 4c280004ce62bf11ddb091854c28f1e1d54a54d6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Feb 2019 15:08:19 +0100 Subject: Use a single file instead of segments for HLS --- scripts/generate-code-contributors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/generate-code-contributors.ts b/scripts/generate-code-contributors.ts index 9824bc2f5..96110307a 100755 --- a/scripts/generate-code-contributors.ts +++ b/scripts/generate-code-contributors.ts @@ -41,7 +41,7 @@ async function run () { } function get (url: string, headers: any = {}) { - return doRequest({ + return doRequest({ uri: url, json: true, headers: Object.assign(headers, { -- cgit v1.2.3