aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html8
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss10
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts3
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts68
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts8
-rw-r--r--client/src/app/core/routing/menu-guard.service.ts5
-rw-r--r--client/src/app/helpers/utils/url.ts15
-rw-r--r--client/src/app/shared/shared-forms/markdown-textarea.component.html5
-rw-r--r--client/src/app/shared/shared-forms/markdown-textarea.component.ts7
-rw-r--r--client/src/app/shared/shared-forms/select/select-checkbox.component.html1
-rw-r--r--client/src/app/shared/shared-forms/select/select-checkbox.component.ts6
-rw-r--r--client/src/app/shared/shared-forms/select/select-custom-value.component.html1
-rw-r--r--client/src/app/shared/shared-forms/select/select-custom-value.component.ts5
-rw-r--r--client/src/app/shared/shared-forms/select/select-options.component.html1
-rw-r--r--client/src/app/shared/shared-forms/select/select-options.component.ts5
-rw-r--r--client/src/app/shared/shared-main/video-channel/video-channel.model.ts2
-rw-r--r--client/src/app/shared/shared-video-playlist/video-playlist.service.ts10
18 files changed, 104 insertions, 58 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
index 3ceea02ca..6ae7b1b79 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
@@ -63,7 +63,7 @@
63 <div class="col-md-7 col-xl-5"></div> 63 <div class="col-md-7 col-xl-5"></div>
64 <div class="col-md-5 col-xl-5"> 64 <div class="col-md-5 col-xl-5">
65 65
66 <div class="form-error submit-error" i18n *ngIf="!form.valid"> 66 <div class="form-error submit-error" i18n *ngIf="!form.valid && serverConfig.allowEdits">
67 There are errors in the form: 67 There are errors in the form:
68 68
69 <ul> 69 <ul>
@@ -77,7 +77,11 @@
77 You cannot allow live replay if you don't enable transcoding. 77 You cannot allow live replay if you don't enable transcoding.
78 </span> 78 </span>
79 79
80 <input (click)="formValidated()" type="submit" i18n-value value="Update configuration" [disabled]="!form.valid || !hasConsistentOptions()"> 80 <span i18n *ngIf="!serverConfig.allowEdits">
81 You cannot change the server configuration because it's managed externally.
82 </span>
83
84 <input (click)="formValidated()" type="submit" i18n-value value="Update configuration" [disabled]="!form.valid || !hasConsistentOptions() || !serverConfig.allowEdits">
81 </div> 85 </div>
82 </div> 86 </div>
83</form> 87</form>
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss
index 5951d0aaa..0458d257f 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss
@@ -33,6 +33,11 @@ input[type=number] {
33 top: 5px; 33 top: 5px;
34 right: 2.5rem; 34 right: 2.5rem;
35 } 35 }
36
37 input[disabled] {
38 background-color: #f9f9f9;
39 pointer-events: none;
40 }
36} 41}
37 42
38input[type=checkbox] { 43input[type=checkbox] {
@@ -93,6 +98,11 @@ textarea {
93 } 98 }
94} 99}
95 100
101input[disabled] {
102 opacity: 0.5;
103}
104
105
96.form-group-right { 106.form-group-right {
97 padding-top: 2px; 107 padding-top: 2px;
98} 108}
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index f13fe4bf9..04b0175a7 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -258,6 +258,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
258 258
259 this.loadConfigAndUpdateForm() 259 this.loadConfigAndUpdateForm()
260 this.loadCategoriesAndLanguages() 260 this.loadCategoriesAndLanguages()
261 if (!this.serverConfig.allowEdits) {
262 this.form.disable()
263 }
261 } 264 }
262 265
263 formValidated () { 266 formValidated () {
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
index d6959a50e..8fba423c3 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
@@ -155,7 +155,7 @@ export class MyVideoPlaylistElementsComponent implements OnInit, OnDestroy {
155 } 155 }
156 156
157 private loadElements () { 157 private loadElements () {
158 this.videoPlaylistService.getPlaylistVideos(this.videoPlaylistId, this.pagination) 158 this.videoPlaylistService.getPlaylistVideos({ videoPlaylistId: this.videoPlaylistId, componentPagination: this.pagination })
159 .subscribe(({ total, data }) => { 159 .subscribe(({ total, data }) => {
160 this.playlistElements = this.playlistElements.concat(data) 160 this.playlistElements = this.playlistElements.concat(data)
161 this.pagination.totalItems = total 161 this.pagination.totalItems = total
diff --git a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
index 78b3af4a7..b2863fed6 100644
--- a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
@@ -1,6 +1,14 @@
1import { Component, EventEmitter, Input, Output } from '@angular/core' 1import { Component, EventEmitter, Input, Output } from '@angular/core'
2import { Router } from '@angular/router' 2import { Router } from '@angular/router'
3import { AuthService, ComponentPagination, LocalStorageService, Notifier, SessionStorageService, UserService } from '@app/core' 3import {
4 AuthService,
5 ComponentPagination,
6 HooksService,
7 LocalStorageService,
8 Notifier,
9 SessionStorageService,
10 UserService
11} from '@app/core'
4import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist' 12import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist'
5import { peertubeLocalStorage, peertubeSessionStorage } from '@root-helpers/peertube-web-storage' 13import { peertubeLocalStorage, peertubeSessionStorage } from '@root-helpers/peertube-web-storage'
6import { VideoPlaylistPrivacy } from '@shared/models' 14import { VideoPlaylistPrivacy } from '@shared/models'
@@ -34,6 +42,7 @@ export class VideoWatchPlaylistComponent {
34 currentPlaylistPosition: number 42 currentPlaylistPosition: number
35 43
36 constructor ( 44 constructor (
45 private hooks: HooksService,
37 private userService: UserService, 46 private userService: UserService,
38 private auth: AuthService, 47 private auth: AuthService,
39 private notifier: Notifier, 48 private notifier: Notifier,
@@ -87,31 +96,38 @@ export class VideoWatchPlaylistComponent {
87 } 96 }
88 97
89 loadPlaylistElements (playlist: VideoPlaylist, redirectToFirst = false, position?: number) { 98 loadPlaylistElements (playlist: VideoPlaylist, redirectToFirst = false, position?: number) {
90 this.videoPlaylist.getPlaylistVideos(playlist.uuid, this.playlistPagination) 99 const obs = this.hooks.wrapObsFun(
91 .subscribe(({ total, data }) => { 100 this.videoPlaylist.getPlaylistVideos.bind(this.videoPlaylist),
92 this.playlistElements = this.playlistElements.concat(data) 101 { videoPlaylistId: playlist.uuid, componentPagination: this.playlistPagination },
93 this.playlistPagination.totalItems = total 102 'video-watch',
94 103 'filter:api.video-watch.video-playlist-elements.get.params',
95 const firstAvailableVideo = this.playlistElements.find(e => !!e.video) 104 'filter:api.video-watch.video-playlist-elements.get.result'
96 if (!firstAvailableVideo) { 105 )
97 this.noPlaylistVideos = true 106
98 return 107 obs.subscribe(({ total, data: playlistElements }) => {
99 } 108 this.playlistElements = this.playlistElements.concat(playlistElements)
100 109 this.playlistPagination.totalItems = total
101 if (position) this.updatePlaylistIndex(position) 110
102 111 const firstAvailableVideo = this.playlistElements.find(e => !!e.video)
103 if (redirectToFirst) { 112 if (!firstAvailableVideo) {
104 const extras = { 113 this.noPlaylistVideos = true
105 queryParams: { 114 return
106 start: firstAvailableVideo.startTimestamp, 115 }
107 stop: firstAvailableVideo.stopTimestamp, 116
108 playlistPosition: firstAvailableVideo.position 117 if (position) this.updatePlaylistIndex(position)
109 }, 118
110 replaceUrl: true 119 if (redirectToFirst) {
111 } 120 const extras = {
112 this.router.navigate([], extras) 121 queryParams: {
113 } 122 start: firstAvailableVideo.startTimestamp,
114 }) 123 stop: firstAvailableVideo.stopTimestamp,
124 playlistPosition: firstAvailableVideo.position
125 },
126 replaceUrl: true
127 }
128 this.router.navigate([], extras)
129 }
130 })
115 } 131 }
116 132
117 updatePlaylistIndex (position: number) { 133 updatePlaylistIndex (position: number) {
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts
index acfd46a41..f0d159be3 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -455,7 +455,13 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
455 this.zone.run(() => this.theaterEnabled = enabled) 455 this.zone.run(() => this.theaterEnabled = enabled)
456 }) 456 })
457 457
458 this.hooks.runAction('action:video-watch.player.loaded', 'video-watch', { player: this.player, videojs, video: this.video }) 458 this.hooks.runAction('action:video-watch.player.loaded', 'video-watch', {
459 player: this.player,
460 playlist: this.playlist,
461 playlistPosition: this.playlistPosition,
462 videojs,
463 video: this.video
464 })
459 }) 465 })
460 } 466 }
461 467
diff --git a/client/src/app/core/routing/menu-guard.service.ts b/client/src/app/core/routing/menu-guard.service.ts
index 8c5bbfde9..58ad31cf4 100644
--- a/client/src/app/core/routing/menu-guard.service.ts
+++ b/client/src/app/core/routing/menu-guard.service.ts
@@ -4,11 +4,10 @@ import { MenuService } from '../menu'
4import { ScreenService } from '../wrappers' 4import { ScreenService } from '../wrappers'
5 5
6abstract class MenuGuard implements CanActivate, CanDeactivate<any> { 6abstract class MenuGuard implements CanActivate, CanDeactivate<any> {
7 display = true
8 canDeactivate = this.canActivate 7 canDeactivate = this.canActivate
9 8
10 constructor (protected menu: MenuService, protected screen: ScreenService, display: boolean) { 9 constructor (protected menu: MenuService, protected screen: ScreenService, protected display: boolean) {
11 this.display = display 10
12 } 11 }
13 12
14 canActivate (): boolean { 13 canActivate (): boolean {
diff --git a/client/src/app/helpers/utils/url.ts b/client/src/app/helpers/utils/url.ts
index 82d9cc11b..b3cded8f4 100644
--- a/client/src/app/helpers/utils/url.ts
+++ b/client/src/app/helpers/utils/url.ts
@@ -1,19 +1,5 @@
1import { environment } from '../../../environments/environment' 1import { environment } from '../../../environments/environment'
2 2
3// Thanks: https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
4function getParameterByName (name: string, url: string) {
5 if (!url) url = window.location.href
6 name = name.replace(/[[\]]/g, '\\$&')
7
8 const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)')
9 const results = regex.exec(url)
10
11 if (!results) return null
12 if (!results[2]) return ''
13
14 return decodeURIComponent(results[2].replace(/\+/g, ' '))
15}
16
17function getAbsoluteAPIUrl () { 3function getAbsoluteAPIUrl () {
18 let absoluteAPIUrl = environment.hmr === true 4 let absoluteAPIUrl = environment.hmr === true
19 ? 'http://localhost:9000' 5 ? 'http://localhost:9000'
@@ -64,7 +50,6 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) {
64} 50}
65 51
66export { 52export {
67 getParameterByName,
68 objectToFormData, 53 objectToFormData,
69 getAbsoluteAPIUrl, 54 getAbsoluteAPIUrl,
70 getAbsoluteEmbedUrl 55 getAbsoluteEmbedUrl
diff --git a/client/src/app/shared/shared-forms/markdown-textarea.component.html b/client/src/app/shared/shared-forms/markdown-textarea.component.html
index 6e70e2f37..a460cb9b7 100644
--- a/client/src/app/shared/shared-forms/markdown-textarea.component.html
+++ b/client/src/app/shared/shared-forms/markdown-textarea.component.html
@@ -2,6 +2,7 @@
2 <textarea #textarea 2 <textarea #textarea
3 [(ngModel)]="content" (ngModelChange)="onModelChange()" 3 [(ngModel)]="content" (ngModelChange)="onModelChange()"
4 class="form-control" [ngClass]="classes" 4 class="form-control" [ngClass]="classes"
5 [attr.disabled]="disabled"
5 [ngStyle]="{ height: textareaHeight }" 6 [ngStyle]="{ height: textareaHeight }"
6 [id]="name" [name]="name"> 7 [id]="name" [name]="name">
7 </textarea> 8 </textarea>
@@ -25,11 +26,11 @@
25 </ng-container> 26 </ng-container>
26 27
27 <my-button 28 <my-button
28 *ngIf="!isMaximized" [title]="maximizeInText" className="maximize-button" icon="fullscreen" (click)="onMaximizeClick()" 29 *ngIf="!isMaximized" [title]="maximizeInText" className="maximize-button" icon="fullscreen" (click)="onMaximizeClick()" [disabled]="disabled"
29 ></my-button> 30 ></my-button>
30 31
31 <my-button 32 <my-button
32 *ngIf="isMaximized" [title]="maximizeOutText" className="maximize-button" icon="exit-fullscreen" (click)="onMaximizeClick()" 33 *ngIf="isMaximized" [title]="maximizeOutText" className="maximize-button" icon="exit-fullscreen" (click)="onMaximizeClick()" [disabled]="disabled"
33 ></my-button> 34 ></my-button>
34 </div> 35 </div>
35 36
diff --git a/client/src/app/shared/shared-forms/markdown-textarea.component.ts b/client/src/app/shared/shared-forms/markdown-textarea.component.ts
index 8f51d47df..dcb5d20da 100644
--- a/client/src/app/shared/shared-forms/markdown-textarea.component.ts
+++ b/client/src/app/shared/shared-forms/markdown-textarea.component.ts
@@ -45,6 +45,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
45 previewHTML: SafeHtml | string = '' 45 previewHTML: SafeHtml | string = ''
46 46
47 isMaximized = false 47 isMaximized = false
48 disabled = false
48 49
49 maximizeInText = $localize`Maximize editor` 50 maximizeInText = $localize`Maximize editor`
50 maximizeOutText = $localize`Exit maximized editor` 51 maximizeOutText = $localize`Exit maximized editor`
@@ -108,6 +109,10 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
108 } 109 }
109 } 110 }
110 111
112 setDisabledState (isDisabled: boolean) {
113 this.disabled = isDisabled
114 }
115
111 private lockBodyScroll () { 116 private lockBodyScroll () {
112 this.scrollPosition = this.viewportScroller.getScrollPosition() 117 this.scrollPosition = this.viewportScroller.getScrollPosition()
113 document.getElementById('content').classList.add('lock-scroll') 118 document.getElementById('content').classList.add('lock-scroll')
@@ -132,8 +137,6 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
132 const result = await this.customMarkdownRenderer(text) 137 const result = await this.customMarkdownRenderer(text)
133 138
134 if (result instanceof HTMLElement) { 139 if (result instanceof HTMLElement) {
135 html = ''
136
137 const wrapperElement = this.previewElement.nativeElement as HTMLElement 140 const wrapperElement = this.previewElement.nativeElement as HTMLElement
138 wrapperElement.innerHTML = '' 141 wrapperElement.innerHTML = ''
139 wrapperElement.appendChild(result) 142 wrapperElement.appendChild(result)
diff --git a/client/src/app/shared/shared-forms/select/select-checkbox.component.html b/client/src/app/shared/shared-forms/select/select-checkbox.component.html
index 7b49a0c01..03db2875b 100644
--- a/client/src/app/shared/shared-forms/select/select-checkbox.component.html
+++ b/client/src/app/shared/shared-forms/select/select-checkbox.component.html
@@ -7,6 +7,7 @@
7 [multiple]="true" 7 [multiple]="true"
8 [searchable]="true" 8 [searchable]="true"
9 [closeOnSelect]="false" 9 [closeOnSelect]="false"
10 [disabled]="disabled"
10 11
11 bindValue="id" 12 bindValue="id"
12 bindLabel="label" 13 bindLabel="label"
diff --git a/client/src/app/shared/shared-forms/select/select-checkbox.component.ts b/client/src/app/shared/shared-forms/select/select-checkbox.component.ts
index 12f697628..c9a500324 100644
--- a/client/src/app/shared/shared-forms/select/select-checkbox.component.ts
+++ b/client/src/app/shared/shared-forms/select/select-checkbox.component.ts
@@ -23,6 +23,8 @@ export class SelectCheckboxComponent implements OnInit, ControlValueAccessor {
23 @Input() selectableGroupAsModel: boolean 23 @Input() selectableGroupAsModel: boolean
24 @Input() placeholder: string 24 @Input() placeholder: string
25 25
26 disabled = false
27
26 ngOnInit () { 28 ngOnInit () {
27 if (!this.placeholder) this.placeholder = $localize`Add a new option` 29 if (!this.placeholder) this.placeholder = $localize`Add a new option`
28 } 30 }
@@ -59,6 +61,10 @@ export class SelectCheckboxComponent implements OnInit, ControlValueAccessor {
59 this.propagateChange(this.selectedItems) 61 this.propagateChange(this.selectedItems)
60 } 62 }
61 63
64 setDisabledState (isDisabled: boolean) {
65 this.disabled = isDisabled
66 }
67
62 compareFn (item: SelectOptionsItem, selected: ItemSelectCheckboxValue) { 68 compareFn (item: SelectOptionsItem, selected: ItemSelectCheckboxValue) {
63 if (typeof selected === 'string' || typeof selected === 'number') { 69 if (typeof selected === 'string' || typeof selected === 'number') {
64 return item.id === selected 70 return item.id === selected
diff --git a/client/src/app/shared/shared-forms/select/select-custom-value.component.html b/client/src/app/shared/shared-forms/select/select-custom-value.component.html
index 9dc8c2ec2..69fdedc10 100644
--- a/client/src/app/shared/shared-forms/select/select-custom-value.component.html
+++ b/client/src/app/shared/shared-forms/select/select-custom-value.component.html
@@ -5,6 +5,7 @@
5 [searchable]="searchable" 5 [searchable]="searchable"
6 [groupBy]="groupBy" 6 [groupBy]="groupBy"
7 [labelForId]="labelForId" 7 [labelForId]="labelForId"
8 [disabled]="disabled"
8 9
9 [(ngModel)]="selectedId" 10 [(ngModel)]="selectedId"
10 (ngModelChange)="onModelChange()" 11 (ngModelChange)="onModelChange()"
diff --git a/client/src/app/shared/shared-forms/select/select-custom-value.component.ts b/client/src/app/shared/shared-forms/select/select-custom-value.component.ts
index bc6b863c7..636bd6101 100644
--- a/client/src/app/shared/shared-forms/select/select-custom-value.component.ts
+++ b/client/src/app/shared/shared-forms/select/select-custom-value.component.ts
@@ -25,6 +25,7 @@ export class SelectCustomValueComponent implements ControlValueAccessor, OnChang
25 25
26 customValue: number | string = '' 26 customValue: number | string = ''
27 selectedId: number | string 27 selectedId: number | string
28 disabled = false
28 29
29 itemsWithCustom: SelectOptionsItem[] = [] 30 itemsWithCustom: SelectOptionsItem[] = []
30 31
@@ -75,4 +76,8 @@ export class SelectCustomValueComponent implements ControlValueAccessor, OnChang
75 isCustomValue () { 76 isCustomValue () {
76 return this.selectedId === 'other' 77 return this.selectedId === 'other'
77 } 78 }
79
80 setDisabledState (isDisabled: boolean) {
81 this.disabled = isDisabled
82 }
78} 83}
diff --git a/client/src/app/shared/shared-forms/select/select-options.component.html b/client/src/app/shared/shared-forms/select/select-options.component.html
index 3b1761255..83c7de9f5 100644
--- a/client/src/app/shared/shared-forms/select/select-options.component.html
+++ b/client/src/app/shared/shared-forms/select/select-options.component.html
@@ -7,6 +7,7 @@
7 [labelForId]="labelForId" 7 [labelForId]="labelForId"
8 [searchable]="searchable" 8 [searchable]="searchable"
9 [searchFn]="searchFn" 9 [searchFn]="searchFn"
10 [disabled]="disabled"
10 11
11 bindLabel="label" 12 bindLabel="label"
12 bindValue="id" 13 bindValue="id"
diff --git a/client/src/app/shared/shared-forms/select/select-options.component.ts b/client/src/app/shared/shared-forms/select/select-options.component.ts
index 8482b9dea..820a82c24 100644
--- a/client/src/app/shared/shared-forms/select/select-options.component.ts
+++ b/client/src/app/shared/shared-forms/select/select-options.component.ts
@@ -23,6 +23,7 @@ export class SelectOptionsComponent implements ControlValueAccessor {
23 @Input() searchFn: any 23 @Input() searchFn: any
24 24
25 selectedId: number | string 25 selectedId: number | string
26 disabled = false
26 27
27 propagateChange = (_: any) => { /* empty */ } 28 propagateChange = (_: any) => { /* empty */ }
28 29
@@ -48,4 +49,8 @@ export class SelectOptionsComponent implements ControlValueAccessor {
48 onModelChange () { 49 onModelChange () {
49 this.propagateChange(this.selectedId) 50 this.propagateChange(this.selectedId)
50 } 51 }
52
53 setDisabledState (isDisabled: boolean) {
54 this.disabled = isDisabled
55 }
51} 56}
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts
index 66d4cac68..ac2679b42 100644
--- a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts
+++ b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts
@@ -41,7 +41,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel {
41 } 41 }
42 42
43 static GET_DEFAULT_AVATAR_URL () { 43 static GET_DEFAULT_AVATAR_URL () {
44 return `${window.location.origin}/client/assets/images/default-avatar-videochannel.png` 44 return `${window.location.origin}/client/assets/images/default-avatar-video-channel.png`
45 } 45 }
46 46
47 constructor (hash: Partial<ServerVideoChannel>) { 47 constructor (hash: Partial<ServerVideoChannel>) {
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
index 0a01af593..76835b9fc 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
@@ -256,12 +256,12 @@ export class VideoPlaylistService {
256 ) 256 )
257 } 257 }
258 258
259 getPlaylistVideos ( 259 getPlaylistVideos (options: {
260 videoPlaylistId: number | string, 260 videoPlaylistId: number | string
261 componentPagination: ComponentPaginationLight 261 componentPagination: ComponentPaginationLight
262 ): Observable<ResultList<VideoPlaylistElement>> { 262 }): Observable<ResultList<VideoPlaylistElement>> {
263 const path = VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + videoPlaylistId + '/videos' 263 const path = VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + options.videoPlaylistId + '/videos'
264 const pagination = this.restService.componentPaginationToRestPagination(componentPagination) 264 const pagination = this.restService.componentPaginationToRestPagination(options.componentPagination)
265 265
266 let params = new HttpParams() 266 let params = new HttpParams()
267 params = this.restService.addRestGetParams(params, pagination) 267 params = this.restService.addRestGetParams(params, pagination)