diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 10:51:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 10:51:51 +0200 |
commit | 6a02dd1c3d250130404cd22e3691f4e681208e15 (patch) | |
tree | 74fba4baf737aea0c8bea4f8109e22b62c23e147 /client/src/assets/player | |
parent | 0b684daa3dbbe24bd3871eff46093c6aaa02e9cf (diff) | |
download | PeerTube-6a02dd1c3d250130404cd22e3691f4e681208e15.tar.gz PeerTube-6a02dd1c3d250130404cd22e3691f4e681208e15.tar.zst PeerTube-6a02dd1c3d250130404cd22e3691f4e681208e15.zip |
Fix metric with old webtorrent videos
Diffstat (limited to 'client/src/assets/player')
-rw-r--r-- | client/src/assets/player/shared/metrics/metrics-plugin.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/assets/player/shared/metrics/metrics-plugin.ts b/client/src/assets/player/shared/metrics/metrics-plugin.ts index 1b2349eba..2844828da 100644 --- a/client/src/assets/player/shared/metrics/metrics-plugin.ts +++ b/client/src/assets/player/shared/metrics/metrics-plugin.ts | |||
@@ -64,7 +64,9 @@ class MetricsPlugin extends Plugin { | |||
64 | if (!videoFile) return | 64 | if (!videoFile) return |
65 | 65 | ||
66 | resolution = videoFile.resolution.id | 66 | resolution = videoFile.resolution.id |
67 | fps = videoFile.fps | 67 | fps = videoFile.fps && videoFile.fps !== -1 |
68 | ? videoFile.fps | ||
69 | : undefined | ||
68 | } | 70 | } |
69 | 71 | ||
70 | const body: PlaybackMetricCreate = { | 72 | const body: PlaybackMetricCreate = { |