projects
/
oweals
/
peertube.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor: Separated "Other Videos" section into a dedicated component/service (#969)
[oweals/peertube.git]
/
client
/
src
/
app
/
shared
/
video
/
video.service.ts
diff --git
a/client/src/app/shared/video/video.service.ts
b/client/src/app/shared/video/video.service.ts
index 7cc98c77a1764f207187f2ea87262bc36f921d3a..5c0674e583763c5d13c30ed550cccdb5317f2f55 100644
(file)
--- a/
client/src/app/shared/video/video.service.ts
+++ b/
client/src/app/shared/video/video.service.ts
@@
-23,8
+23,17
@@
import { ServerService } from '@app/core'
import { UserSubscriptionService } from '@app/shared/user-subscription'
import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
import { UserSubscriptionService } from '@app/shared/user-subscription'
import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
+export interface VideosProvider {
+ getVideos (
+ videoPagination: ComponentPagination,
+ sort: VideoSortField,
+ filter?: VideoFilter,
+ categoryOneOf?: number
+ ): Observable<{ videos: Video[], totalVideos: number }>
+}
+
@Injectable()
@Injectable()
-export class VideoService {
+export class VideoService
implements VideosProvider
{
static BASE_VIDEO_URL = environment.apiUrl + '/api/v1/videos/'
static BASE_FEEDS_URL = environment.apiUrl + '/feeds/videos.'
static BASE_VIDEO_URL = environment.apiUrl + '/api/v1/videos/'
static BASE_FEEDS_URL = environment.apiUrl + '/feeds/videos.'