]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+accounts/account-videos/account-videos.component.ts
Add number of videos published by an account/video channel
[github/Chocobozzz/PeerTube.git] / client / src / app / +accounts / account-videos / account-videos.component.ts
index 1b0590f73bf67c917423a9977192a0d7c3be9e2f..eca9fb6b74ae75797571bef7a7f9dff60f9de9c7 100644 (file)
@@ -9,6 +9,7 @@ import { AbstractVideoList } from '../../shared/video/abstract-video-list'
 import { VideoService } from '../../shared/video/video.service'
 import { Account } from '@app/shared/account/account.model'
 import { AccountService } from '@app/shared/account/account.service'
+import { tap } from 'rxjs/operators'
 
 @Component({
   selector: 'my-account-videos',
@@ -60,7 +61,9 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit,
   getVideosObservable (page: number) {
     const newPagination = immutableAssign(this.pagination, { currentPage: page })
 
-    return this.videoService.getAccountVideos(this.account, newPagination, this.sort)
+    return this.videoService
+               .getAccountVideos(this.account, newPagination, this.sort)
+               .pipe(tap(({ totalVideos }) => this.titlePage = `Published ${totalVideos} videos`))
   }
 
   generateSyndicationList () {