aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/user-subscription/subscribe-button.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/user-subscription/subscribe-button.component.ts')
-rw-r--r--client/src/app/shared/user-subscription/subscribe-button.component.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.ts b/client/src/app/shared/user-subscription/subscribe-button.component.ts
index e3c758942..95c2bb8f8 100644
--- a/client/src/app/shared/user-subscription/subscribe-button.component.ts
+++ b/client/src/app/shared/user-subscription/subscribe-button.component.ts
@@ -5,6 +5,8 @@ import { UserSubscriptionService } from '@app/shared/user-subscription/user-subs
5import { VideoChannel } from '@app/shared/video-channel/video-channel.model' 5import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
6import { NotificationsService } from 'angular2-notifications' 6import { NotificationsService } from 'angular2-notifications'
7import { I18n } from '@ngx-translate/i18n-polyfill' 7import { I18n } from '@ngx-translate/i18n-polyfill'
8import { VideoService } from '@app/shared/video/video.service'
9import { FeedFormat } from '../../../../../shared/models/feeds'
8 10
9@Component({ 11@Component({
10 selector: 'my-subscribe-button', 12 selector: 'my-subscribe-button',
@@ -23,7 +25,8 @@ export class SubscribeButtonComponent implements OnInit {
23 private router: Router, 25 private router: Router,
24 private notificationsService: NotificationsService, 26 private notificationsService: NotificationsService,
25 private userSubscriptionService: UserSubscriptionService, 27 private userSubscriptionService: UserSubscriptionService,
26 private i18n: I18n 28 private i18n: I18n,
29 private videoService: VideoService
27 ) { } 30 ) { }
28 31
29 get uri () { 32 get uri () {
@@ -100,6 +103,10 @@ export class SubscribeButtonComponent implements OnInit {
100 } 103 }
101 104
102 rssOpen () { 105 rssOpen () {
103 window.open('') 106 const rssFeed = this.videoService
107 .getVideoChannelFeedUrls(this.videoChannel.id)
108 .find(i => i.format === FeedFormat.RSS)
109
110 window.open(rssFeed.url)
104 } 111 }
105} 112}