aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 10:51:51 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 10:51:51 +0200
commit6a02dd1c3d250130404cd22e3691f4e681208e15 (patch)
tree74fba4baf737aea0c8bea4f8109e22b62c23e147 /client/src
parent0b684daa3dbbe24bd3871eff46093c6aaa02e9cf (diff)
downloadPeerTube-6a02dd1c3d250130404cd22e3691f4e681208e15.tar.gz
PeerTube-6a02dd1c3d250130404cd22e3691f4e681208e15.tar.zst
PeerTube-6a02dd1c3d250130404cd22e3691f4e681208e15.zip
Fix metric with old webtorrent videos
Diffstat (limited to 'client/src')
-rw-r--r--client/src/assets/player/shared/metrics/metrics-plugin.ts4
-rw-r--r--client/src/root-helpers/logger.ts1
2 files changed, 3 insertions, 2 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 = {
diff --git a/client/src/root-helpers/logger.ts b/client/src/root-helpers/logger.ts
index 0dcda525e..0d486c433 100644
--- a/client/src/root-helpers/logger.ts
+++ b/client/src/root-helpers/logger.ts
@@ -131,7 +131,6 @@ class Logger {
131 131
132 private buildStack (err: Error) { 132 private buildStack (err: Error) {
133 return `${err.message}\n${err.stack || ''}` 133 return `${err.message}\n${err.stack || ''}`
134
135 } 134 }
136} 135}
137 136