wt-plugin: clearify err msg

pull/3421/head
kontrollanten 2020-12-07 08:36:28 +01:00 committed by Chocobozzz
parent 40360c17d8
commit a5a69fc727
1 changed files with 4 additions and 0 deletions

View File

@ -139,6 +139,10 @@ class WebTorrentPlugin extends Plugin {
: this.pickAverageVideoFile()
}
if (videoFile === undefined) {
throw Error(`Can't update video file since videoFile is undefined.`)
}
// Don't add the same video file once again
if (this.currentVideoFile !== undefined && this.currentVideoFile.magnetUri === videoFile.magnetUri) {
return