diff options
Diffstat (limited to 'client/src/app/shared/video')
-rw-r--r-- | client/src/app/shared/video/video-details.model.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/shared/video/video-details.model.ts b/client/src/app/shared/video/video-details.model.ts index 1a956da7c..b96f8f6c8 100644 --- a/client/src/app/shared/video/video-details.model.ts +++ b/client/src/app/shared/video/video-details.model.ts | |||
@@ -46,6 +46,8 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { | |||
46 | privacy: VideoPrivacy | 46 | privacy: VideoPrivacy |
47 | privacyLabel: string | 47 | privacyLabel: string |
48 | account: Account | 48 | account: Account |
49 | likesPercent: number | ||
50 | dislikesPercent: number | ||
49 | 51 | ||
50 | constructor (hash: VideoDetailsServerModel) { | 52 | constructor (hash: VideoDetailsServerModel) { |
51 | super(hash) | 53 | super(hash) |
@@ -56,6 +58,9 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { | |||
56 | this.files = hash.files | 58 | this.files = hash.files |
57 | this.channel = hash.channel | 59 | this.channel = hash.channel |
58 | this.account = hash.account | 60 | this.account = hash.account |
61 | |||
62 | this.likesPercent = (this.likes / (this.likes + this.dislikes)) * 100 | ||
63 | this.dislikesPercent = (this.dislikes / (this.likes + this.dislikes)) * 100 | ||
59 | } | 64 | } |
60 | 65 | ||
61 | getAppropriateMagnetUri (actualDownloadSpeed = 0) { | 66 | getAppropriateMagnetUri (actualDownloadSpeed = 0) { |