- ({ videos, totalVideos }) => {
- this.videos = this.videos.concat(videos)
- this.pagination.totalItems = totalVideos
+ ([ videosResult, videoChannelsResult ]) => {
+ this.results = this.results
+ .concat(videoChannelsResult.data)
+ .concat(videosResult.videos)
+ this.pagination.totalItems = videosResult.totalVideos + videoChannelsResult.total
+
+ // Focus on channels if there are no enough videos
+ if (this.firstSearch === true && videosResult.videos.length < this.pagination.itemsPerPage) {
+ this.resetPagination()
+ this.firstSearch = false
+
+ this.channelsPerPage = 10
+ this.search()
+ }
+
+ this.firstSearch = false