From fd18bd84ca8e414fe8c897c38bbe70cd22ddb4aa Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 19 Feb 2019 10:37:29 +0100 Subject: [PATCH] Don't download subtitles for magnet links (until the media file/metadata is ready at least) --- platypush/backend/http/static/js/media.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/backend/http/static/js/media.js b/platypush/backend/http/static/js/media.js index 4ff4a58804..e5588ebb47 100644 --- a/platypush/backend/http/static/js/media.js +++ b/platypush/backend/http/static/js/media.js @@ -187,7 +187,7 @@ $(document).ready(function() { const getSubtitles = function(resource) { return new Promise((resolve, reject) => { - if (!window.config.media.subtitles) { + if (!window.config.media.subtitles || resource.startsWith('magnet:?')) { resolve(); // media.subtitles plugin not configured } @@ -440,7 +440,7 @@ $(document).ready(function() { $mediaSubtitlesResultsContainer.show(); resolve(subs); }).catch((error) => { - $mediaSubtitlesMessage.text('Unable to load subtitles: ' + error.message); + $mediaSubtitlesMessage.text('Unable to load subtitles: ' + error); reject(error); }); });