]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/video-list/video-trending.component.ts
Simplify client syndications
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-list / video-trending.component.ts
index 905c75ab03222ad16d302ba011a200866178e183..6358ef91fe578c20d2713d968351e7fe7815fe0c 100644 (file)
@@ -6,8 +6,6 @@ import { AuthService } from '../../core/auth'
 import { AbstractVideoList } from '../../shared/video/abstract-video-list'
 import { SortField } from '../../shared/video/sort-field.type'
 import { VideoService } from '../../shared/video/video.service'
-import { FeedFormat } from '../../../../../shared/models/feeds/feed-format.enum'
-import * as url from 'url'
 
 @Component({
   selector: 'my-videos-trending',
@@ -29,6 +27,7 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit,
 
   ngOnInit () {
     super.ngOnInit()
+
     this.generateSyndicationList()
   }
 
@@ -42,9 +41,6 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit,
   }
 
   generateSyndicationList () {
-    const feeds = this.videoService.getFeed('local')
-    this.syndicationItems['rss 2.0'] = feeds[FeedFormat.RSS]
-    this.syndicationItems['atom 1.0'] = feeds[FeedFormat.ATOM]
-    this.syndicationItems['json 1.0'] = feeds[FeedFormat.JSON]
+    this.syndicationItems = this.videoService.getVideoFeedUrls()
   }
 }