aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-miniature/videos-list.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-video-miniature/videos-list.component.ts')
-rw-r--r--client/src/app/shared/shared-video-miniature/videos-list.component.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-video-miniature/videos-list.component.ts b/client/src/app/shared/shared-video-miniature/videos-list.component.ts
index 38a80b973..508a189fd 100644
--- a/client/src/app/shared/shared-video-miniature/videos-list.component.ts
+++ b/client/src/app/shared/shared-video-miniature/videos-list.component.ts
@@ -14,13 +14,14 @@ import {
14 UserService 14 UserService
15} from '@app/core' 15} from '@app/core'
16import { GlobalIconName } from '@app/shared/shared-icons' 16import { GlobalIconName } from '@app/shared/shared-icons'
17import { logger } from '@root-helpers/logger'
17import { isLastMonth, isLastWeek, isThisMonth, isToday, isYesterday } from '@shared/core-utils' 18import { isLastMonth, isLastWeek, isThisMonth, isToday, isYesterday } from '@shared/core-utils'
18import { ResultList, UserRight, VideoSortField } from '@shared/models' 19import { ResultList, UserRight, VideoSortField } from '@shared/models'
19import { Syndication, Video } from '../shared-main' 20import { Syndication, Video } from '../shared-main'
20import { VideoFilters, VideoFilterScope } from './video-filters.model' 21import { VideoFilters, VideoFilterScope } from './video-filters.model'
21import { MiniatureDisplayOptions } from './video-miniature.component' 22import { MiniatureDisplayOptions } from './video-miniature.component'
22 23
23const logger = debug('peertube:videos:VideosListComponent') 24const debugLogger = debug('peertube:videos:VideosListComponent')
24 25
25export type HeaderAction = { 26export type HeaderAction = {
26 iconName: GlobalIconName 27 iconName: GlobalIconName
@@ -245,7 +246,7 @@ export class VideosListComponent implements OnInit, OnChanges, OnDestroy {
245 error: err => { 246 error: err => {
246 const message = $localize`Cannot load more videos. Try again later.` 247 const message = $localize`Cannot load more videos. Try again later.`
247 248
248 console.error(message, { err }) 249 logger.error(message, err)
249 this.notifier.error(message) 250 this.notifier.error(message)
250 } 251 }
251 }) 252 })
@@ -323,7 +324,7 @@ export class VideosListComponent implements OnInit, OnChanges, OnDestroy {
323 } 324 }
324 325
325 onFiltersChanged (customizedByUser: boolean) { 326 onFiltersChanged (customizedByUser: boolean) {
326 logger('Running on filters changed') 327 debugLogger('Running on filters changed')
327 328
328 this.updateUrl(customizedByUser) 329 this.updateUrl(customizedByUser)
329 330
@@ -364,7 +365,7 @@ export class VideosListComponent implements OnInit, OnChanges, OnDestroy {
364 if (!items || items.length === 0) this.syndicationItems = undefined 365 if (!items || items.length === 0) this.syndicationItems = undefined
365 else this.syndicationItems = items 366 else this.syndicationItems = items
366 }) 367 })
367 .catch(err => console.error('Cannot get syndication items.', err)) 368 .catch(err => logger.error('Cannot get syndication items.', err))
368 } 369 }
369 370
370 private updateUrl (customizedByUser: boolean) { 371 private updateUrl (customizedByUser: boolean) {
@@ -375,7 +376,7 @@ export class VideosListComponent implements OnInit, OnChanges, OnDestroy {
375 ? { ...baseQuery, c: customizedByUser } 376 ? { ...baseQuery, c: customizedByUser }
376 : baseQuery 377 : baseQuery
377 378
378 logger('Will inject %O in URL query', queryParams) 379 debugLogger('Will inject %O in URL query', queryParams)
379 380
380 const baseRoute = this.baseRouteBuilderFunction 381 const baseRoute = this.baseRouteBuilderFunction
381 ? this.baseRouteBuilderFunction(this.filters) 382 ? this.baseRouteBuilderFunction(this.filters)