From b36f41ca09e92ecb30d367d91d1089a23d10d585 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 Sep 2018 09:57:21 +0200 Subject: Add trending videos strategy --- shared/models/redundancy/videos-redundancy.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shared') diff --git a/shared/models/redundancy/videos-redundancy.model.ts b/shared/models/redundancy/videos-redundancy.model.ts index eb84964e0..85982e5b3 100644 --- a/shared/models/redundancy/videos-redundancy.model.ts +++ b/shared/models/redundancy/videos-redundancy.model.ts @@ -1,4 +1,4 @@ -export type VideoRedundancyStrategy = 'most-views' +export type VideoRedundancyStrategy = 'most-views' | 'trending' export interface VideosRedundancy { strategy: VideoRedundancyStrategy -- cgit v1.2.3 From 3f6b6a565dc98a658ec9d8f697252788c0faa46d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 Sep 2018 11:05:38 +0200 Subject: Add recently added redundancy strategy --- shared/models/redundancy/videos-redundancy.model.ts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'shared') diff --git a/shared/models/redundancy/videos-redundancy.model.ts b/shared/models/redundancy/videos-redundancy.model.ts index 85982e5b3..436394c1e 100644 --- a/shared/models/redundancy/videos-redundancy.model.ts +++ b/shared/models/redundancy/videos-redundancy.model.ts @@ -1,6 +1,19 @@ -export type VideoRedundancyStrategy = 'most-views' | 'trending' +export type VideoRedundancyStrategy = 'most-views' | 'trending' | 'recently-added' -export interface VideosRedundancy { - strategy: VideoRedundancyStrategy +export type MostViewsRedundancyStrategy = { + strategy: 'most-views' size: number } + +export type TrendingRedundancyStrategy = { + strategy: 'trending' + size: number +} + +export type RecentlyAddedStrategy = { + strategy: 'recently-added' + size: number + minViews: number +} + +export type VideosRedundancy = MostViewsRedundancyStrategy | TrendingRedundancyStrategy | RecentlyAddedStrategy -- cgit v1.2.3 From 4b5384f6e7be62d072d21d8d964951ba572ab10e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 Sep 2018 14:57:59 +0200 Subject: Add redundancy stats --- shared/models/server/server-stats.model.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'shared') diff --git a/shared/models/server/server-stats.model.ts b/shared/models/server/server-stats.model.ts index 5c1bf3468..a6bd2d4d3 100644 --- a/shared/models/server/server-stats.model.ts +++ b/shared/models/server/server-stats.model.ts @@ -1,3 +1,5 @@ +import { VideoRedundancyStrategy } from '../redundancy' + export interface ServerStats { totalUsers: number totalLocalVideos: number @@ -9,4 +11,12 @@ export interface ServerStats { totalInstanceFollowers: number totalInstanceFollowing: number + + videosRedundancy: { + strategy: VideoRedundancyStrategy + totalSize: number + totalUsed: number + totalVideoFiles: number + totalVideos: number + }[] } -- cgit v1.2.3