aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-list
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/video-list')
-rw-r--r--client/src/app/videos/video-list/video-local.component.ts11
-rw-r--r--client/src/app/videos/video-list/video-recently-added.component.ts10
-rw-r--r--client/src/app/videos/video-list/video-search.component.ts5
-rw-r--r--client/src/app/videos/video-list/video-trending.component.ts10
4 files changed, 36 insertions, 0 deletions
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 8f9d50a7b..9d626abd1 100644
--- a/client/src/app/videos/video-list/video-local.component.ts
+++ b/client/src/app/videos/video-list/video-local.component.ts
@@ -3,9 +3,12 @@ import { ActivatedRoute, Router } from '@angular/router'
3import { immutableAssign } from '@app/shared/misc/utils' 3import { immutableAssign } from '@app/shared/misc/utils'
4import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
5import { AuthService } from '../../core/auth' 5import { AuthService } from '../../core/auth'
6import { PopoverModule } from 'ngx-bootstrap/popover'
6import { AbstractVideoList } from '../../shared/video/abstract-video-list' 7import { AbstractVideoList } from '../../shared/video/abstract-video-list'
7import { SortField } from '../../shared/video/sort-field.type' 8import { SortField } from '../../shared/video/sort-field.type'
8import { VideoService } from '../../shared/video/video.service' 9import { VideoService } from '../../shared/video/video.service'
10import { FeedFormat } from '../../../../../shared/models/feeds/feed-format.enum'
11import * as url from 'url'
9 12
10@Component({ 13@Component({
11 selector: 'my-videos-local', 14 selector: 'my-videos-local',
@@ -27,6 +30,7 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On
27 30
28 ngOnInit () { 31 ngOnInit () {
29 super.ngOnInit() 32 super.ngOnInit()
33 this.generateSyndicationList()
30 } 34 }
31 35
32 ngOnDestroy () { 36 ngOnDestroy () {
@@ -38,4 +42,11 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On
38 42
39 return this.videoService.getVideos(newPagination, this.sort, 'local') 43 return this.videoService.getVideos(newPagination, this.sort, 'local')
40 } 44 }
45
46 generateSyndicationList () {
47 const feeds = this.videoService.getFeed('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 }
41} 52}
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 1cecd14a0..2bdc20d92 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
@@ -6,6 +6,8 @@ import { AuthService } from '../../core/auth'
6import { AbstractVideoList } from '../../shared/video/abstract-video-list' 6import { AbstractVideoList } from '../../shared/video/abstract-video-list'
7import { SortField } from '../../shared/video/sort-field.type' 7import { SortField } from '../../shared/video/sort-field.type'
8import { VideoService } from '../../shared/video/video.service' 8import { VideoService } from '../../shared/video/video.service'
9import { FeedFormat } from '../../../../../shared/models/feeds/feed-format.enum'
10import * as url from 'url'
9 11
10@Component({ 12@Component({
11 selector: 'my-videos-recently-added', 13 selector: 'my-videos-recently-added',
@@ -27,6 +29,7 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On
27 29
28 ngOnInit () { 30 ngOnInit () {
29 super.ngOnInit() 31 super.ngOnInit()
32 this.generateSyndicationList()
30 } 33 }
31 34
32 ngOnDestroy () { 35 ngOnDestroy () {
@@ -38,4 +41,11 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On
38 41
39 return this.videoService.getVideos(newPagination, this.sort) 42 return this.videoService.getVideos(newPagination, this.sort)
40 } 43 }
44
45 generateSyndicationList () {
46 const feeds = this.videoService.getFeed('local')
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 }
41} 51}
diff --git a/client/src/app/videos/video-list/video-search.component.ts b/client/src/app/videos/video-list/video-search.component.ts
index b94be8e11..ef9afa757 100644
--- a/client/src/app/videos/video-list/video-search.component.ts
+++ b/client/src/app/videos/video-list/video-search.component.ts
@@ -7,6 +7,7 @@ import { Subscription } from 'rxjs/Subscription'
7import { AuthService } from '../../core/auth' 7import { AuthService } from '../../core/auth'
8import { AbstractVideoList } from '../../shared/video/abstract-video-list' 8import { AbstractVideoList } from '../../shared/video/abstract-video-list'
9import { VideoService } from '../../shared/video/video.service' 9import { VideoService } from '../../shared/video/video.service'
10import { FeedFormat } from '../../../../../shared/models/feeds/feed-format.enum'
10 11
11@Component({ 12@Component({
12 selector: 'my-videos-search', 13 selector: 'my-videos-search',
@@ -61,4 +62,8 @@ export class VideoSearchComponent extends AbstractVideoList implements OnInit, O
61 const newPagination = immutableAssign(this.pagination, { currentPage: page }) 62 const newPagination = immutableAssign(this.pagination, { currentPage: page })
62 return this.videoService.searchVideos(this.otherRouteParams.search, newPagination, this.sort) 63 return this.videoService.searchVideos(this.otherRouteParams.search, newPagination, this.sort)
63 } 64 }
65
66 generateSyndicationList () {
67 throw new Error('Method not implemented.')
68 }
64} 69}
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 1dd1ad23b..905c75ab0 100644
--- a/client/src/app/videos/video-list/video-trending.component.ts
+++ b/client/src/app/videos/video-list/video-trending.component.ts
@@ -6,6 +6,8 @@ import { AuthService } from '../../core/auth'
6import { AbstractVideoList } from '../../shared/video/abstract-video-list' 6import { AbstractVideoList } from '../../shared/video/abstract-video-list'
7import { SortField } from '../../shared/video/sort-field.type' 7import { SortField } from '../../shared/video/sort-field.type'
8import { VideoService } from '../../shared/video/video.service' 8import { VideoService } from '../../shared/video/video.service'
9import { FeedFormat } from '../../../../../shared/models/feeds/feed-format.enum'
10import * as url from 'url'
9 11
10@Component({ 12@Component({
11 selector: 'my-videos-trending', 13 selector: 'my-videos-trending',
@@ -27,6 +29,7 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit,
27 29
28 ngOnInit () { 30 ngOnInit () {
29 super.ngOnInit() 31 super.ngOnInit()
32 this.generateSyndicationList()
30 } 33 }
31 34
32 ngOnDestroy () { 35 ngOnDestroy () {
@@ -37,4 +40,11 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit,
37 const newPagination = immutableAssign(this.pagination, { currentPage: page }) 40 const newPagination = immutableAssign(this.pagination, { currentPage: page })
38 return this.videoService.getVideos(newPagination, this.sort) 41 return this.videoService.getVideos(newPagination, this.sort)
39 } 42 }
43
44 generateSyndicationList () {
45 const feeds = this.videoService.getFeed('local')
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 }
40} 50}