diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/core-utils/common/url.ts | 13 | ||||
-rw-r--r-- | shared/models/plugins/client/client-hook.model.ts | 4 | ||||
-rw-r--r-- | shared/models/server/server-config.model.ts | 1 |
3 files changed, 7 insertions, 11 deletions
diff --git a/shared/core-utils/common/url.ts b/shared/core-utils/common/url.ts index 52ed247c4..9c111cbcc 100644 --- a/shared/core-utils/common/url.ts +++ b/shared/core-utils/common/url.ts | |||
@@ -53,7 +53,7 @@ function decorateVideoLink (options: { | |||
53 | }) { | 53 | }) { |
54 | const { url } = options | 54 | const { url } = options |
55 | 55 | ||
56 | const params = generateParams(window.location.search) | 56 | const params = new URLSearchParams() |
57 | 57 | ||
58 | if (options.startTime !== undefined && options.startTime !== null) { | 58 | if (options.startTime !== undefined && options.startTime !== null) { |
59 | const startTimeInt = Math.floor(options.startTime) | 59 | const startTimeInt = Math.floor(options.startTime) |
@@ -85,7 +85,7 @@ function decoratePlaylistLink (options: { | |||
85 | }) { | 85 | }) { |
86 | const { url } = options | 86 | const { url } = options |
87 | 87 | ||
88 | const params = generateParams(window.location.search) | 88 | const params = new URLSearchParams() |
89 | 89 | ||
90 | if (options.playlistPosition) params.set('playlistPosition', '' + options.playlistPosition) | 90 | if (options.playlistPosition) params.set('playlistPosition', '' + options.playlistPosition) |
91 | 91 | ||
@@ -119,12 +119,3 @@ function buildUrl (url: string, params: URLSearchParams) { | |||
119 | 119 | ||
120 | return url | 120 | return url |
121 | } | 121 | } |
122 | |||
123 | function generateParams (url: string) { | ||
124 | const params = new URLSearchParams(window.location.search) | ||
125 | // Unused parameters in embed | ||
126 | params.delete('videoId') | ||
127 | params.delete('resume') | ||
128 | |||
129 | return params | ||
130 | } | ||
diff --git a/shared/models/plugins/client/client-hook.model.ts b/shared/models/plugins/client/client-hook.model.ts index d811e2c67..7dd8bc507 100644 --- a/shared/models/plugins/client/client-hook.model.ts +++ b/shared/models/plugins/client/client-hook.model.ts | |||
@@ -26,6 +26,10 @@ export const clientFilterHookObject = { | |||
26 | 'filter:api.video-watch.video.get.params': true, | 26 | 'filter:api.video-watch.video.get.params': true, |
27 | 'filter:api.video-watch.video.get.result': true, | 27 | 'filter:api.video-watch.video.get.result': true, |
28 | 28 | ||
29 | // Filter params/result of the function that fetch video playlist elements of the video-watch page | ||
30 | 'filter:api.video-watch.video-playlist-elements.get.params': true, | ||
31 | 'filter:api.video-watch.video-playlist-elements.get.result': true, | ||
32 | |||
29 | // Filter params/result of the function that fetch the threads of the video-watch page | 33 | // Filter params/result of the function that fetch the threads of the video-watch page |
30 | 'filter:api.video-watch.video-threads.list.params': true, | 34 | 'filter:api.video-watch.video-threads.list.params': true, |
31 | 'filter:api.video-watch.video-threads.list.result': true, | 35 | 'filter:api.video-watch.video-threads.list.result': true, |
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts index 585e99aca..3b026e3a5 100644 --- a/shared/models/server/server-config.model.ts +++ b/shared/models/server/server-config.model.ts | |||
@@ -30,6 +30,7 @@ export interface RegisteredIdAndPassAuthConfig { | |||
30 | } | 30 | } |
31 | 31 | ||
32 | export interface ServerConfig { | 32 | export interface ServerConfig { |
33 | allowEdits: boolean | ||
33 | serverVersion: string | 34 | serverVersion: string |
34 | serverCommit?: string | 35 | serverCommit?: string |
35 | 36 | ||