]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/overview/overview.service.ts
Better spacing beetween comments
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / overview / overview.service.ts
index 097079e6d73a88e21cd3d6874b3c39e086c964ec..79cb781f7c30d2f07b50134d9e3346d96d19b8f9 100644 (file)
@@ -5,7 +5,6 @@ import { forkJoin, Observable, of } from 'rxjs'
 import { VideosOverview as VideosOverviewServer, peertubeTranslate } from '../../../../../shared/models'
 import { environment } from '../../../environments/environment'
 import { RestExtractor } from '../rest/rest-extractor.service'
-import { RestService } from '../rest/rest.service'
 import { VideosOverview } from '@app/shared/overview/videos-overview.model'
 import { VideoService } from '@app/shared/video/video.service'
 import { ServerService } from '@app/core'
@@ -18,7 +17,6 @@ export class OverviewService {
   constructor (
     private authHttp: HttpClient,
     private restExtractor: RestExtractor,
-    private restService: RestService,
     private videosService: VideoService,
     private serverService: ServerService
   ) {}
@@ -47,7 +45,7 @@ export class OverviewService {
           of(object.videos)
             .pipe(
               switchMap(videos => this.videosService.extractVideos({ total: 0, data: videos })),
-              map(result => result.videos),
+              map(result => result.data),
               tap(videos => {
                 videosOverviewResult[key].push(immutableAssign(object, { videos }))
               })
@@ -62,7 +60,7 @@ export class OverviewService {
       .pipe(
         // Translate categories
         switchMap(() => {
-          return this.serverService.localeObservable
+          return this.serverService.getServerLocale()
               .pipe(
                 tap(translations => {
                   for (const c of videosOverviewResult.categories) {