aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/standalone/videos/embed.ts5
-rw-r--r--server/lib/job-queue/handlers/video-views.ts2
2 files changed, 3 insertions, 4 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index c113c67da..7daa03f23 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -256,9 +256,8 @@ class PeerTubeEmbed {
256 } 256 }
257 257
258 private async initCore () { 258 private async initCore () {
259 const urlParts = window.location.href.split('/') 259 const urlParts = window.location.pathname.split('/')
260 const lastPart = urlParts[ urlParts.length - 1 ] 260 const videoId = urlParts[ urlParts.length - 1 ]
261 const videoId = lastPart.indexOf('?') === -1 ? lastPart : lastPart.split('?')[ 0 ]
262 261
263 const [ , serverTranslations, videoResponse, captionsResponse ] = await Promise.all([ 262 const [ , serverTranslations, videoResponse, captionsResponse ] = await Promise.all([
264 loadLocaleInVideoJS(window.location.origin, vjs, navigator.language), 263 loadLocaleInVideoJS(window.location.origin, vjs, navigator.language),
diff --git a/server/lib/job-queue/handlers/video-views.ts b/server/lib/job-queue/handlers/video-views.ts
index 2ceec2342..f44c3c727 100644
--- a/server/lib/job-queue/handlers/video-views.ts
+++ b/server/lib/job-queue/handlers/video-views.ts
@@ -39,7 +39,7 @@ async function processVideosViews () {
39 }) 39 })
40 40
41 const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoId) 41 const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoId)
42 await federateVideoIfNeeded(video, false) 42 if (video.isOwned()) await federateVideoIfNeeded(video, false)
43 } catch (err) { 43 } catch (err) {
44 logger.debug('Cannot create video views for video %d in hour %d. Maybe the video does not exist anymore?', videoId, hour) 44 logger.debug('Cannot create video views for video %d in hour %d. Maybe the video does not exist anymore?', videoId, hour)
45 } 45 }