aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/abstract-video-list.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-04-17 00:49:04 +0200
committerRigel <sendmemail@rigelk.eu>2018-04-17 01:09:06 +0200
commit244e76a552ef05a5067134b1065d26dd89246d8c (patch)
treea15fcd52bce99797fc9366572fea62a7a44aaabe /client/src/app/shared/video/abstract-video-list.ts
parentc36d5a6b98056ef7fec3db43fbee880ee7332dcf (diff)
downloadPeerTube-244e76a552ef05a5067134b1065d26dd89246d8c.tar.gz
PeerTube-244e76a552ef05a5067134b1065d26dd89246d8c.tar.zst
PeerTube-244e76a552ef05a5067134b1065d26dd89246d8c.zip
feature: initial syndication feeds support
Provides rss 2.0, atom 1.0 and json 1.0 feeds for videos (instance and account-wide) on listings and video-watch views. * still lacks redis caching * still lacks lastBuildDate support * still lacks channel-wide support * still lacks semantic annotation (for licenses, NSFW warnings, etc.) * still lacks love ( ˘ ³˘) * RSS: has MRSS support for torrent lists! * RSS: includes the first torrent in an enclosure * JSON: lists all torrents in the 'attachments' object * ATOM: lacking torrent listing support Advances #23 Partial implementation for the accountId generation in the client, which will need a hotfix to add a way to get the proper account id.
Diffstat (limited to 'client/src/app/shared/video/abstract-video-list.ts')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index 1b9a519bd..024834dfc 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -3,6 +3,7 @@ import { ActivatedRoute, Router } from '@angular/router'
3import { isInMobileView } from '@app/shared/misc/utils' 3import { isInMobileView } from '@app/shared/misc/utils'
4import { InfiniteScrollerDirective } from '@app/shared/video/infinite-scroller.directive' 4import { InfiniteScrollerDirective } from '@app/shared/video/infinite-scroller.directive'
5import { NotificationsService } from 'angular2-notifications' 5import { NotificationsService } from 'angular2-notifications'
6import { PopoverModule } from 'ngx-bootstrap/popover'
6import 'rxjs/add/operator/debounceTime' 7import 'rxjs/add/operator/debounceTime'
7import { Observable } from 'rxjs/Observable' 8import { Observable } from 'rxjs/Observable'
8import { fromEvent } from 'rxjs/observable/fromEvent' 9import { fromEvent } from 'rxjs/observable/fromEvent'
@@ -11,6 +12,8 @@ import { AuthService } from '../../core/auth'
11import { ComponentPagination } from '../rest/component-pagination.model' 12import { ComponentPagination } from '../rest/component-pagination.model'
12import { SortField } from './sort-field.type' 13import { SortField } from './sort-field.type'
13import { Video } from './video.model' 14import { Video } from './video.model'
15import { FeedFormat } from '../../../../../shared'
16import { VideoFeedComponent } from '@app/shared/video/video-feed.component'
14 17
15export abstract class AbstractVideoList implements OnInit, OnDestroy { 18export abstract class AbstractVideoList implements OnInit, OnDestroy {
16 private static LINES_PER_PAGE = 4 19 private static LINES_PER_PAGE = 4
@@ -25,6 +28,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
25 } 28 }
26 sort: SortField = '-createdAt' 29 sort: SortField = '-createdAt'
27 defaultSort: SortField = '-createdAt' 30 defaultSort: SortField = '-createdAt'
31 syndicationItems = {}
32
28 loadOnInit = true 33 loadOnInit = true
29 pageHeight: number 34 pageHeight: number
30 videoWidth: number 35 videoWidth: number
@@ -47,6 +52,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
47 private resizeSubscription: Subscription 52 private resizeSubscription: Subscription
48 53
49 abstract getVideosObservable (page: number): Observable<{ videos: Video[], totalVideos: number}> 54 abstract getVideosObservable (page: number): Observable<{ videos: Video[], totalVideos: number}>
55 abstract generateSyndicationList ()
50 56
51 get user () { 57 get user () {
52 return this.authService.getUser() 58 return this.authService.getUser()