Refactor: Separated "Other Videos" section into a dedicated component/service (#969)
authorBrad Johnson <bradsk88@gmail.com>
Fri, 31 Aug 2018 15:19:21 +0000 (09:19 -0600)
committerChocobozzz <me@florianbigard.com>
Fri, 31 Aug 2018 15:19:21 +0000 (17:19 +0200)
commit7f5f4152a4cd4fc328d6ae177d281ebe7e792dd3
treefd0401bd9c43e1adbbedbd2042c93bd4fef46632
parent1a4710914432b44115b185cec1883fdf409aef1d
Refactor: Separated "Other Videos" section into a dedicated component/service (#969)

* Separated "Other Videos" section into a dedicated component/service

I'm currently working on some proof-of-concepts for recommendation
providers that could work with PeerTube to provide useful video
suggestions to the user.

As a first step, I want to have great clarity about how PeerTube,
itself, will surface these videos to the user.

With this branch, I'm refactoring the "recommendations" to make it
easier to swap out different recommender implementations quickly.

Stop recommender from including the video that's being watched.

Ensure always 5 recommendations

* Treat recommendations as a stream of values, rather than a single async value.

* Prioritize readability over HTTP response size early-optimization.

* Simplify pipe
16 files changed:
.gitignore
.travis.yml
client/package.json
client/src/app/shared/video/video.service.ts
client/src/app/videos/+video-watch/video-watch.component.html
client/src/app/videos/+video-watch/video-watch.component.ts
client/src/app/videos/+video-watch/video-watch.module.ts
client/src/app/videos/recommendations/recent-videos-recommendation.service.spec.ts [new file with mode: 0644]
client/src/app/videos/recommendations/recent-videos-recommendation.service.ts [new file with mode: 0644]
client/src/app/videos/recommendations/recommendations.module.ts [new file with mode: 0644]
client/src/app/videos/recommendations/recommendations.service.ts [new file with mode: 0644]
client/src/app/videos/recommendations/recommended-videos.component.html [new file with mode: 0644]
client/src/app/videos/recommendations/recommended-videos.component.ts [new file with mode: 0644]
client/src/app/videos/recommendations/recommended-videos.store.spec.ts [new file with mode: 0644]
client/src/app/videos/recommendations/recommended-videos.store.ts [new file with mode: 0644]
scripts/travis.sh