diff options
Diffstat (limited to 'client/src/app/videos')
4 files changed, 9 insertions, 25 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index b3ebe3e4b..182703cdf 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild, OnChanges } from '@angular/core' | 1 | import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { RedirectService } from '@app/core/routing/redirect.service' | 3 | import { RedirectService } from '@app/core/routing/redirect.service' |
4 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' | 4 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' |
@@ -9,20 +9,18 @@ import { Subscription } from 'rxjs/Subscription' | |||
9 | import * as videojs from 'video.js' | 9 | import * as videojs from 'video.js' |
10 | import 'videojs-hotkeys' | 10 | import 'videojs-hotkeys' |
11 | import * as WebTorrent from 'webtorrent' | 11 | import * as WebTorrent from 'webtorrent' |
12 | import { UserVideoRateType, VideoRateType, FeedFormat } from '../../../../../shared' | 12 | import { UserVideoRateType, VideoRateType } from '../../../../../shared' |
13 | import '../../../assets/player/peertube-videojs-plugin' | 13 | import '../../../assets/player/peertube-videojs-plugin' |
14 | import { AuthService, ConfirmService } from '../../core' | 14 | import { AuthService, ConfirmService } from '../../core' |
15 | import { VideoBlacklistService } from '../../shared' | 15 | import { VideoBlacklistService } from '../../shared' |
16 | import { Account } from '../../shared/account/account.model' | 16 | import { Account } from '../../shared/account/account.model' |
17 | import { VideoDetails } from '../../shared/video/video-details.model' | 17 | import { VideoDetails } from '../../shared/video/video-details.model' |
18 | import { VideoFeedComponent } from '../../shared/video/video-feed.component' | ||
19 | import { Video } from '../../shared/video/video.model' | 18 | import { Video } from '../../shared/video/video.model' |
20 | import { VideoService } from '../../shared/video/video.service' | 19 | import { VideoService } from '../../shared/video/video.service' |
21 | import { MarkdownService } from '../shared' | 20 | import { MarkdownService } from '../shared' |
22 | import { VideoDownloadComponent } from './modal/video-download.component' | 21 | import { VideoDownloadComponent } from './modal/video-download.component' |
23 | import { VideoReportComponent } from './modal/video-report.component' | 22 | import { VideoReportComponent } from './modal/video-report.component' |
24 | import { VideoShareComponent } from './modal/video-share.component' | 23 | import { VideoShareComponent } from './modal/video-share.component' |
25 | import { environment } from '../../../environments/environment' | ||
26 | import { getVideojsOptions } from '../../../assets/player/peertube-player' | 24 | import { getVideojsOptions } from '../../../assets/player/peertube-player' |
27 | 25 | ||
28 | @Component({ | 26 | @Component({ |
@@ -248,13 +246,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
248 | } | 246 | } |
249 | 247 | ||
250 | generateSyndicationList () { | 248 | generateSyndicationList () { |
251 | const feeds = this.videoService.getAccountFeed( | 249 | this.syndicationItems = this.videoService.getAccountFeedUrls(this.video.account.id) |
252 | this.video.account.id, | ||
253 | (this.video.isLocal) ? environment.apiUrl : this.video.account.host | ||
254 | ) | ||
255 | this.syndicationItems['rss 2.0'] = feeds[FeedFormat.RSS] | ||
256 | this.syndicationItems['atom 1.0'] = feeds[FeedFormat.ATOM] | ||
257 | this.syndicationItems['json 1.0'] = feeds[FeedFormat.JSON] | ||
258 | } | 250 | } |
259 | 251 | ||
260 | isVideoRemovable () { | 252 | isVideoRemovable () { |
diff --git a/client/src/app/videos/video-list/video-local.component.ts b/client/src/app/videos/video-list/video-local.component.ts index 9d626abd1..90eb96afe 100644 --- a/client/src/app/videos/video-list/video-local.component.ts +++ b/client/src/app/videos/video-list/video-local.component.ts | |||
@@ -30,6 +30,7 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On | |||
30 | 30 | ||
31 | ngOnInit () { | 31 | ngOnInit () { |
32 | super.ngOnInit() | 32 | super.ngOnInit() |
33 | |||
33 | this.generateSyndicationList() | 34 | this.generateSyndicationList() |
34 | } | 35 | } |
35 | 36 | ||
@@ -44,9 +45,6 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On | |||
44 | } | 45 | } |
45 | 46 | ||
46 | generateSyndicationList () { | 47 | generateSyndicationList () { |
47 | const feeds = this.videoService.getFeed('local') | 48 | this.syndicationItems = this.videoService.getVideoFeedUrls('local') |
48 | this.syndicationItems['rss 2.0'] = feeds[FeedFormat.RSS] | ||
49 | this.syndicationItems['atom 1.0'] = feeds[FeedFormat.ATOM] | ||
50 | this.syndicationItems['json 1.0'] = feeds[FeedFormat.JSON] | ||
51 | } | 49 | } |
52 | } | 50 | } |
diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts index 2bdc20d92..3b8108b00 100644 --- a/client/src/app/videos/video-list/video-recently-added.component.ts +++ b/client/src/app/videos/video-list/video-recently-added.component.ts | |||
@@ -29,6 +29,7 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On | |||
29 | 29 | ||
30 | ngOnInit () { | 30 | ngOnInit () { |
31 | super.ngOnInit() | 31 | super.ngOnInit() |
32 | |||
32 | this.generateSyndicationList() | 33 | this.generateSyndicationList() |
33 | } | 34 | } |
34 | 35 | ||
@@ -43,9 +44,6 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On | |||
43 | } | 44 | } |
44 | 45 | ||
45 | generateSyndicationList () { | 46 | generateSyndicationList () { |
46 | const feeds = this.videoService.getFeed('local') | 47 | this.syndicationItems = this.videoService.getVideoFeedUrls() |
47 | this.syndicationItems['rss 2.0'] = feeds[FeedFormat.RSS] | ||
48 | this.syndicationItems['atom 1.0'] = feeds[FeedFormat.ATOM] | ||
49 | this.syndicationItems['json 1.0'] = feeds[FeedFormat.JSON] | ||
50 | } | 48 | } |
51 | } | 49 | } |
diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts index 905c75ab0..6358ef91f 100644 --- a/client/src/app/videos/video-list/video-trending.component.ts +++ b/client/src/app/videos/video-list/video-trending.component.ts | |||
@@ -6,8 +6,6 @@ import { AuthService } from '../../core/auth' | |||
6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
7 | import { SortField } from '../../shared/video/sort-field.type' | 7 | import { SortField } from '../../shared/video/sort-field.type' |
8 | import { VideoService } from '../../shared/video/video.service' | 8 | import { VideoService } from '../../shared/video/video.service' |
9 | import { FeedFormat } from '../../../../../shared/models/feeds/feed-format.enum' | ||
10 | import * as url from 'url' | ||
11 | 9 | ||
12 | @Component({ | 10 | @Component({ |
13 | selector: 'my-videos-trending', | 11 | selector: 'my-videos-trending', |
@@ -29,6 +27,7 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit, | |||
29 | 27 | ||
30 | ngOnInit () { | 28 | ngOnInit () { |
31 | super.ngOnInit() | 29 | super.ngOnInit() |
30 | |||
32 | this.generateSyndicationList() | 31 | this.generateSyndicationList() |
33 | } | 32 | } |
34 | 33 | ||
@@ -42,9 +41,6 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit, | |||
42 | } | 41 | } |
43 | 42 | ||
44 | generateSyndicationList () { | 43 | generateSyndicationList () { |
45 | const feeds = this.videoService.getFeed('local') | 44 | this.syndicationItems = this.videoService.getVideoFeedUrls() |
46 | this.syndicationItems['rss 2.0'] = feeds[FeedFormat.RSS] | ||
47 | this.syndicationItems['atom 1.0'] = feeds[FeedFormat.ATOM] | ||
48 | this.syndicationItems['json 1.0'] = feeds[FeedFormat.JSON] | ||
49 | } | 45 | } |
50 | } | 46 | } |