import { ScreenService } from '@app/shared/misc/screen.service'
import { UserRight } from '../../../../../shared/models/users'
import { Notifier, ServerService } from '@app/core'
+import { HooksService } from '@app/core/plugins/hooks.service'
+import { UserService } from '@app/shared'
+import { LocalStorageService } from '@app/shared/misc/storage.service'
@Component({
selector: 'my-videos-local',
sort = '-publishedAt' as VideoSortField
filter: VideoFilter = 'local'
- useUserVideoLanguagePreferences = true
+ useUserVideoPreferences = true
constructor (
protected i18n: I18n,
protected route: ActivatedRoute,
protected notifier: Notifier,
protected authService: AuthService,
+ protected userService: UserService,
protected screenService: ScreenService,
- private videoService: VideoService
+ protected storageService: LocalStorageService,
+ private videoService: VideoService,
+ private hooks: HooksService
) {
super()
getVideosObservable (page: number) {
const newPagination = immutableAssign(this.pagination, { currentPage: page })
-
- return this.videoService.getVideos({
+ const params = {
videoPagination: newPagination,
sort: this.sort,
filter: this.filter,
categoryOneOf: this.categoryOneOf,
- languageOneOf: this.languageOneOf
- })
+ languageOneOf: this.languageOneOf,
+ nsfwPolicy: this.nsfwPolicy,
+ skipCount: true
+ }
+
+ return this.hooks.wrapObsFun(
+ this.videoService.getVideos.bind(this.videoService),
+ params,
+ 'common',
+ 'filter:api.local-videos.videos.list.params',
+ 'filter:api.local-videos.videos.list.result'
+ )
}
generateSyndicationList () {