Skip videos count on client if we don't use it
authorChocobozzz <me@florianbigard.com>
Wed, 8 Jan 2020 13:40:08 +0000 (14:40 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 8 Jan 2020 13:40:08 +0000 (14:40 +0100)
20 files changed:
client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts
client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts
client/src/app/search/search.service.ts
client/src/app/shared/rest/component-pagination.model.ts
client/src/app/shared/rest/rest.service.ts
client/src/app/shared/user-subscription/user-subscription.service.ts
client/src/app/shared/users/user-history.service.ts
client/src/app/shared/users/user-notification.service.ts
client/src/app/shared/video-blacklist/video-blacklist.service.ts
client/src/app/shared/video-channel/video-channel.service.ts
client/src/app/shared/video-playlist/video-playlist.service.ts
client/src/app/shared/video/abstract-video-list.ts
client/src/app/shared/video/video.service.ts
client/src/app/videos/+video-watch/comment/video-comment.service.ts
client/src/app/videos/video-list/video-local.component.ts
client/src/app/videos/video-list/video-most-liked.component.ts
client/src/app/videos/video-list/video-recently-added.component.ts
client/src/app/videos/video-list/video-trending.component.ts
client/src/app/videos/video-list/video-user-subscriptions.component.ts

index 29d2991fddbabca192aedd94c081e381ca40adaa..5572064c1c95c9e96cde71311cecd5c569c4b704 100644 (file)
@@ -25,12 +25,14 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy {
 
   channelPagination: ComponentPagination = {
     currentPage: 1,
-    itemsPerPage: 2
+    itemsPerPage: 2,
+    totalItems: null
   }
 
   videosPagination: ComponentPagination = {
     currentPage: 1,
-    itemsPerPage: 12
+    itemsPerPage: 12,
+    totalItems: null
   }
   videosSort: VideoSortField = '-publishedAt'
 
index b30b136bdf61a61551e0ffafb70c9cf815fac0ac..f18c2e6ca3ff8f037555b97bf10989c3eee41523 100644 (file)
@@ -25,7 +25,8 @@ export class PluginListInstalledComponent implements OnInit {
 
   pagination: ComponentPagination = {
     currentPage: 1,
-    itemsPerPage: 10
+    itemsPerPage: 10,
+    totalItems: null
   }
   sort = 'name'
 
index 65566ab7996616da342fb67cd0d6858166cb9860..e08ded3f18c346b00908a39ea3ae76bf339fea13 100644 (file)
@@ -25,7 +25,8 @@ export class PluginSearchComponent implements OnInit {
 
   pagination: ComponentPagination = {
     currentPage: 1,
-    itemsPerPage: 10
+    itemsPerPage: 10,
+    totalItems: null
   }
   sort = '-popularity'
 
index bb55327572eb4241837073697eb579580df892ff..7610fee8cc6ed06ecfe5f088762ee786f16c1f9d 100644 (file)
@@ -2,7 +2,7 @@ import { catchError, map, switchMap } from 'rxjs/operators'
 import { HttpClient, HttpParams } from '@angular/common/http'
 import { Injectable } from '@angular/core'
 import { Observable } from 'rxjs'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
+import { ComponentPaginationLight } from '@app/shared/rest/component-pagination.model'
 import { VideoService } from '@app/shared/video/video.service'
 import { RestExtractor, RestService } from '@app/shared'
 import { environment } from '../../environments/environment'
@@ -25,7 +25,7 @@ export class SearchService {
 
   searchVideos (parameters: {
     search: string,
-    componentPagination: ComponentPagination,
+    componentPagination: ComponentPaginationLight,
     advancedSearch: AdvancedSearch
   }): Observable<ResultList<Video>> {
     const { search, componentPagination, advancedSearch } = parameters
@@ -51,7 +51,7 @@ export class SearchService {
 
   searchVideoChannels (parameters: {
     search: string,
-    componentPagination: ComponentPagination
+    componentPagination: ComponentPaginationLight
   }): Observable<ResultList<VideoChannel>> {
     const { search, componentPagination } = parameters
 
index 85160d44559c83ff9d539d55654c8424d5c160de..bcb73ed0f4a030d3019031e3d36f3ea3e2b9d831 100644 (file)
@@ -1,9 +1,11 @@
 export interface ComponentPagination {
   currentPage: number
   itemsPerPage: number
-  totalItems?: number
+  totalItems: number
 }
 
+export type ComponentPaginationLight = Omit<ComponentPagination, 'totalItems'>
+
 export function hasMoreItems (componentPagination: ComponentPagination) {
   // No results
   if (componentPagination.totalItems === 0) return false
index e6d4e6e5e1cb4ba981ce901c95aecd472eead101..16bb6d82cf12f1fe43d6afc96015a15da68e3d85 100644 (file)
@@ -1,7 +1,7 @@
 import { Injectable } from '@angular/core'
 import { HttpParams } from '@angular/common/http'
 import { SortMeta } from 'primeng/components/common/sortmeta'
-import { ComponentPagination } from './component-pagination.model'
+import { ComponentPagination, ComponentPaginationLight } from './component-pagination.model'
 
 import { RestPagination } from './rest-pagination'
 
@@ -47,7 +47,7 @@ export class RestService {
     return params
   }
 
-  componentPaginationToRestPagination (componentPagination: ComponentPagination): RestPagination {
+  componentPaginationToRestPagination (componentPagination: ComponentPaginationLight): RestPagination {
     const start: number = (componentPagination.currentPage - 1) * componentPagination.itemsPerPage
     const count: number = componentPagination.itemsPerPage
 
index cfd5b100fe7ca500ae34ffcccc3d6c11c0a980ec..83df40a43f51587fa49ec975eff5974dab712395 100644 (file)
@@ -8,7 +8,7 @@ import { Observable, ReplaySubject, Subject } from 'rxjs'
 import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
 import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
 import { VideoChannel as VideoChannelServer } from '../../../../../shared/models/videos'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
+import { ComponentPaginationLight } from '@app/shared/rest/component-pagination.model'
 
 type SubscriptionExistResult = { [ uri: string ]: boolean }
 
@@ -54,7 +54,7 @@ export class UserSubscriptionService {
                )
   }
 
-  listSubscriptions (componentPagination: ComponentPagination): Observable<ResultList<VideoChannel>> {
+  listSubscriptions (componentPagination: ComponentPaginationLight): Observable<ResultList<VideoChannel>> {
     const url = UserSubscriptionService.BASE_USER_SUBSCRIPTIONS_URL
 
     const pagination = this.restService.componentPaginationToRestPagination(componentPagination)
index 9ed25bfc7166be837b484d513b4994c3caf667bc..b358cdf209e315e0c720a0a7385c48c17533e25e 100644 (file)
@@ -5,7 +5,7 @@ import { RestExtractor } from '../rest/rest-extractor.service'
 import { RestService } from '../rest/rest.service'
 import { Video } from '../video/video.model'
 import { catchError, map, switchMap } from 'rxjs/operators'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
+import { ComponentPaginationLight } from '@app/shared/rest/component-pagination.model'
 import { VideoService } from '@app/shared/video/video.service'
 import { ResultList } from '../../../../../shared'
 
@@ -20,7 +20,7 @@ export class UserHistoryService {
     private videoService: VideoService
   ) {}
 
-  getUserVideosHistory (historyPagination: ComponentPagination) {
+  getUserVideosHistory (historyPagination: ComponentPaginationLight) {
     const pagination = this.restService.componentPaginationToRestPagination(historyPagination)
 
     let params = new HttpParams()
index ae0bc9cb100ab3b2a6e20ecff71552c1302a4938..e525a1d587f8e42da7eb5fb82803839a8d34bdab 100644 (file)
@@ -6,7 +6,7 @@ import { environment } from '../../../environments/environment'
 import { ResultList, UserNotification as UserNotificationServer, UserNotificationSetting } from '../../../../../shared'
 import { UserNotification } from './user-notification.model'
 import { AuthService } from '../../core'
-import { ComponentPagination } from '../rest/component-pagination.model'
+import { ComponentPaginationLight } from '../rest/component-pagination.model'
 import { User } from '../users/user.model'
 import { UserNotificationSocket } from '@app/core/notification/user-notification-socket.service'
 
@@ -23,7 +23,7 @@ export class UserNotificationService {
     private userNotificationSocket: UserNotificationSocket
   ) {}
 
-  listMyNotifications (pagination: ComponentPagination, unread?: boolean, ignoreLoadingBar = false) {
+  listMyNotifications (pagination: ComponentPaginationLight, unread?: boolean, ignoreLoadingBar = false) {
     let params = new HttpParams()
     params = this.restService.addRestGetParams(params, this.restService.componentPaginationToRestPagination(pagination))
 
index d65da85fe307c0a95b7cc6a7212bc13209f5bec6..491fa698b722d6f64a61c5ad8beb63d87b555dc2 100644 (file)
@@ -7,7 +7,7 @@ import { VideoBlacklist, VideoBlacklistType, ResultList } from '../../../../../s
 import { Video } from '../video/video.model'
 import { environment } from '../../../environments/environment'
 import { RestExtractor, RestPagination, RestService } from '../rest'
-import { ComponentPagination } from '../rest/component-pagination.model'
+import { ComponentPaginationLight } from '../rest/component-pagination.model'
 
 @Injectable()
 export class VideoBlacklistService {
@@ -34,7 +34,7 @@ export class VideoBlacklistService {
                )
   }
 
-  getAutoBlacklistedAsVideoList (videoPagination: ComponentPagination): Observable<ResultList<Video>> {
+  getAutoBlacklistedAsVideoList (videoPagination: ComponentPaginationLight): Observable<ResultList<Video>> {
     const pagination = this.restService.componentPaginationToRestPagination(videoPagination)
 
     // prioritize first created since waiting longest
index 0168d37d9422b56c993ddd60d851676a96502631..adb4f48192e426c3dfb9c428e4cd1489d13d3dd6 100644 (file)
@@ -10,7 +10,7 @@ import { VideoChannel } from './video-channel.model'
 import { environment } from '../../../environments/environment'
 import { Account } from '@app/shared/account/account.model'
 import { Avatar } from '../../../../../shared/models/avatars/avatar.model'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
+import { ComponentPaginationLight } from '@app/shared/rest/component-pagination.model'
 import { RestService } from '@app/shared/rest'
 
 @Injectable()
@@ -44,7 +44,7 @@ export class VideoChannelService {
                )
   }
 
-  listAccountVideoChannels (account: Account, componentPagination?: ComponentPagination): Observable<ResultList<VideoChannel>> {
+  listAccountVideoChannels (account: Account, componentPagination?: ComponentPaginationLight): Observable<ResultList<VideoChannel>> {
     const pagination = componentPagination
       ? this.restService.componentPaginationToRestPagination(componentPagination)
       : { start: 0, count: 20 }
index 7eddf81e186bfa81366c8c209086c87d9b14bdb7..1ec9315efddb41de0e4bb4fd1a8cfb5870d81080 100644 (file)
@@ -18,7 +18,7 @@ import { Account } from '@app/shared/account/account.model'
 import { RestService } from '@app/shared/rest'
 import { VideoExistInPlaylist, VideosExistInPlaylists } from '@shared/models/videos/playlist/video-exist-in-playlist.model'
 import { VideoPlaylistReorder } from '@shared/models/videos/playlist/video-playlist-reorder.model'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
+import { ComponentPaginationLight } from '@app/shared/rest/component-pagination.model'
 import { VideoPlaylistElement as ServerVideoPlaylistElement } from '@shared/models/videos/playlist/video-playlist-element.model'
 import { VideoPlaylistElement } from '@app/shared/video-playlist/video-playlist-element.model'
 import { uniq } from 'lodash-es'
@@ -63,7 +63,7 @@ export class VideoPlaylistService {
     )
   }
 
-  listChannelPlaylists (videoChannel: VideoChannel, componentPagination: ComponentPagination): Observable<ResultList<VideoPlaylist>> {
+  listChannelPlaylists (videoChannel: VideoChannel, componentPagination: ComponentPaginationLight): Observable<ResultList<VideoPlaylist>> {
     const url = VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannel.nameWithHost + '/video-playlists'
     const pagination = this.restService.componentPaginationToRestPagination(componentPagination)
 
@@ -90,7 +90,7 @@ export class VideoPlaylistService {
 
   listAccountPlaylists (
     account: Account,
-    componentPagination: ComponentPagination,
+    componentPagination: ComponentPaginationLight,
     sort: string,
     search?: string
   ): Observable<ResultList<VideoPlaylist>> {
@@ -236,7 +236,7 @@ export class VideoPlaylistService {
 
   getPlaylistVideos (
     videoPlaylistId: number | string,
-    componentPagination: ComponentPagination
+    componentPagination: ComponentPaginationLight
   ): Observable<ResultList<VideoPlaylistElement>> {
     const path = VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + videoPlaylistId + '/videos'
     const pagination = this.restService.componentPaginationToRestPagination(componentPagination)
index 06d4ed43d5cd705c782d277037e47171edbfaf70..c2fe6f75484352a871ba3608a59e6359871e88b1 100644 (file)
@@ -3,7 +3,7 @@ import { OnDestroy, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
 import { fromEvent, Observable, of, Subject, Subscription } from 'rxjs'
 import { AuthService } from '../../core/auth'
-import { ComponentPagination } from '../rest/component-pagination.model'
+import { ComponentPaginationLight } from '../rest/component-pagination.model'
 import { VideoSortField } from './sort-field.type'
 import { Video } from './video.model'
 import { ScreenService } from '@app/shared/misc/screen.service'
@@ -13,7 +13,7 @@ import { Notifier, ServerService } from '@app/core'
 import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { isLastMonth, isLastWeek, isToday, isYesterday } from '@shared/core-utils/miscs/date'
-import { ResultList, ServerConfig } from '@shared/models'
+import { ServerConfig } from '@shared/models'
 
 enum GroupDate {
   UNKNOWN = 0,
@@ -25,10 +25,9 @@ enum GroupDate {
 }
 
 export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableForReuseHook {
-  pagination: ComponentPagination = {
+  pagination: ComponentPaginationLight = {
     currentPage: 1,
-    itemsPerPage: 25,
-    totalItems: null
+    itemsPerPage: 25
   }
   sort: VideoSortField = '-publishedAt'
 
@@ -47,6 +46,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
   groupByDate = false
 
   videos: Video[] = []
+  hasDoneFirstQuery = false
   disabled = false
 
   displayOptions: MiniatureDisplayOptions = {
@@ -84,7 +84,9 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
   private groupedDateLabels: { [id in GroupDate]: string }
   private groupedDates: { [id: number]: GroupDate } = {}
 
-  abstract getVideosObservable (page: number): Observable<ResultList<Video>>
+  private lastQueryLength: number
+
+  abstract getVideosObservable (page: number): Observable<{ data: Video[] }>
 
   abstract generateSyndicationList (): void
 
@@ -142,8 +144,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
   onNearOfBottom () {
     if (this.disabled) return
 
-    // Last page
-    if (this.pagination.totalItems <= (this.pagination.currentPage * this.pagination.itemsPerPage)) return
+    // No more results
+    if (this.lastQueryLength !== undefined && this.lastQueryLength < this.pagination.itemsPerPage) return
 
     this.pagination.currentPage += 1
 
@@ -154,8 +156,10 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
 
   loadMoreVideos (reset = false) {
     this.getVideosObservable(this.pagination.currentPage).subscribe(
-      ({ data, total }) => {
-        this.pagination.totalItems = total
+      ({ data }) => {
+        this.hasDoneFirstQuery = true
+        this.lastQueryLength = data.length
+
         if (reset) this.videos = []
         this.videos = this.videos.concat(data)
 
index 2dd47d74e588d73a60ede740b5062841730702e5..9962021545a6def2fa95527ed73f23222f3845b5 100644 (file)
@@ -15,7 +15,7 @@ import {
 } from '../../../../../shared/models/videos'
 import { FeedFormat } from '../../../../../shared/models/feeds/feed-format.enum'
 import { environment } from '../../../environments/environment'
-import { ComponentPagination } from '../rest/component-pagination.model'
+import { ComponentPaginationLight } from '../rest/component-pagination.model'
 import { RestExtractor } from '../rest/rest-extractor.service'
 import { RestService } from '../rest/rest.service'
 import { UserService } from '../users/user.service'
@@ -34,7 +34,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
 
 export interface VideosProvider {
   getVideos (parameters: {
-    videoPagination: ComponentPagination,
+    videoPagination: ComponentPaginationLight,
     sort: VideoSortField,
     filter?: VideoFilter,
     categoryOneOf?: number,
@@ -121,7 +121,7 @@ export class VideoService implements VideosProvider {
                .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
-  getMyVideos (videoPagination: ComponentPagination, sort: VideoSortField, search?: string): Observable<ResultList<Video>> {
+  getMyVideos (videoPagination: ComponentPaginationLight, sort: VideoSortField, search?: string): Observable<ResultList<Video>> {
     const pagination = this.restService.componentPaginationToRestPagination(videoPagination)
 
     let params = new HttpParams()
@@ -138,7 +138,7 @@ export class VideoService implements VideosProvider {
 
   getAccountVideos (
     account: Account,
-    videoPagination: ComponentPagination,
+    videoPagination: ComponentPaginationLight,
     sort: VideoSortField
   ): Observable<ResultList<Video>> {
     const pagination = this.restService.componentPaginationToRestPagination(videoPagination)
@@ -156,7 +156,7 @@ export class VideoService implements VideosProvider {
 
   getVideoChannelVideos (
     videoChannel: VideoChannel,
-    videoPagination: ComponentPagination,
+    videoPagination: ComponentPaginationLight,
     sort: VideoSortField
   ): Observable<ResultList<Video>> {
     const pagination = this.restService.componentPaginationToRestPagination(videoPagination)
@@ -173,15 +173,18 @@ export class VideoService implements VideosProvider {
   }
 
   getUserSubscriptionVideos (parameters: {
-    videoPagination: ComponentPagination,
-    sort: VideoSortField
+    videoPagination: ComponentPaginationLight,
+    sort: VideoSortField,
+    skipCount?: boolean
   }): Observable<ResultList<Video>> {
-    const { videoPagination, sort } = parameters
+    const { videoPagination, sort, skipCount } = parameters
     const pagination = this.restService.componentPaginationToRestPagination(videoPagination)
 
     let params = new HttpParams()
     params = this.restService.addRestGetParams(params, pagination, sort)
 
+    if (skipCount) params = params.set('skipCount', skipCount + '')
+
     return this.authHttp
                .get<ResultList<Video>>(UserSubscriptionService.BASE_USER_SUBSCRIPTIONS_URL + '/videos', { params })
                .pipe(
@@ -191,26 +194,23 @@ export class VideoService implements VideosProvider {
   }
 
   getVideos (parameters: {
-    videoPagination: ComponentPagination,
+    videoPagination: ComponentPaginationLight,
     sort: VideoSortField,
     filter?: VideoFilter,
     categoryOneOf?: number,
-    languageOneOf?: string[]
+    languageOneOf?: string[],
+    skipCount?: boolean
   }): Observable<ResultList<Video>> {
-    const { videoPagination, sort, filter, categoryOneOf, languageOneOf } = parameters
+    const { videoPagination, sort, filter, categoryOneOf, languageOneOf, skipCount } = parameters
 
     const pagination = this.restService.componentPaginationToRestPagination(videoPagination)
 
     let params = new HttpParams()
     params = this.restService.addRestGetParams(params, pagination, sort)
 
-    if (filter) {
-      params = params.set('filter', filter)
-    }
-
-    if (categoryOneOf) {
-      params = params.set('categoryOneOf', categoryOneOf + '')
-    }
+    if (filter) params = params.set('filter', filter)
+    if (categoryOneOf) params = params.set('categoryOneOf', categoryOneOf + '')
+    if (skipCount) params = params.set('skipCount', skipCount + '')
 
     if (languageOneOf) {
       for (const l of languageOneOf) {
index 72fbf5d2596042315ccbb13c687801af1b691740..a81e5236a596e096c51fe673c2f28dd16284bbd5 100644 (file)
@@ -3,7 +3,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'
 import { Injectable } from '@angular/core'
 import { objectLineFeedToHtml } from '@app/shared/misc/utils'
 import { Observable } from 'rxjs'
-import { ResultList, FeedFormat } from '../../../../../../shared/models'
+import { FeedFormat, ResultList } from '../../../../../../shared/models'
 import {
   VideoComment as VideoCommentServerModel,
   VideoCommentCreate,
@@ -11,7 +11,7 @@ import {
 } from '../../../../../../shared/models/videos/video-comment.model'
 import { environment } from '../../../../environments/environment'
 import { RestExtractor, RestService } from '../../../shared/rest'
-import { ComponentPagination } from '../../../shared/rest/component-pagination.model'
+import { ComponentPaginationLight } from '../../../shared/rest/component-pagination.model'
 import { CommentSortField } from '../../../shared/video/sort-field.type'
 import { VideoComment } from './video-comment.model'
 
@@ -50,7 +50,7 @@ export class VideoCommentService {
 
   getVideoCommentThreads (parameters: {
     videoId: number | string,
-    componentPagination: ComponentPagination,
+    componentPagination: ComponentPaginationLight,
     sort: CommentSortField
   }): Observable<ResultList<VideoComment>> {
     const { videoId, componentPagination, sort } = parameters
index b96e46e6a9ca899916c7530b12109c118ac7cd3f..59f65f95c57487513d256722e30dd78767163886 100644 (file)
@@ -62,7 +62,8 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On
       sort: this.sort,
       filter: this.filter,
       categoryOneOf: this.categoryOneOf,
-      languageOneOf: this.languageOneOf
+      languageOneOf: this.languageOneOf,
+      skipCount: true
     }
 
     return this.hooks.wrapObsFun(
index f94a7da0425aec714e5cb595efe1d6b9791285d9..6ff7a1e0e0887fd84b7e0107c91f51738dac298d 100644 (file)
@@ -50,7 +50,8 @@ export class VideoMostLikedComponent extends AbstractVideoList implements OnInit
       videoPagination: newPagination,
       sort: this.sort,
       categoryOneOf: this.categoryOneOf,
-      languageOneOf: this.languageOneOf
+      languageOneOf: this.languageOneOf,
+      skipCount: true
     }
 
     return this.hooks.wrapObsFun(
index 5c50fd396eee4b867ff616b3071788aa2bbc5d5a..7568f4536df21d933acd246aefcb9112f8f4159b 100644 (file)
@@ -54,7 +54,8 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On
       videoPagination: newPagination,
       sort: this.sort,
       categoryOneOf: this.categoryOneOf,
-      languageOneOf: this.languageOneOf
+      languageOneOf: this.languageOneOf,
+      skipCount: true
     }
 
     return this.hooks.wrapObsFun(
index bc88679faacccedf050f54c00be75a856e54d1f4..e29830b5b1f08882c09a8e9ccb04db5c909b76a8 100644 (file)
@@ -67,7 +67,8 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit,
       videoPagination: newPagination,
       sort: this.sort,
       categoryOneOf: this.categoryOneOf,
-      languageOneOf: this.languageOneOf
+      languageOneOf: this.languageOneOf,
+      skipCount: true
     }
 
     return this.hooks.wrapObsFun(
index 0cd67db29dd8a690623695142d694a4dce63a3b5..cf0b15054df68a6a18ae58c2448c708085b3578b 100644 (file)
@@ -55,7 +55,8 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement
     const newPagination = immutableAssign(this.pagination, { currentPage: page })
     const params = {
       videoPagination: newPagination,
-      sort: this.sort
+      sort: this.sort,
+      skipCount: true
     }
 
     return this.hooks.wrapObsFun(