aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/client.js3
-rw-r--r--src/client/players/RawSubs.hx1
2 files changed, 4 insertions, 0 deletions
diff --git a/res/client.js b/res/client.js
index 016a4e4..a11e3a6 100644
--- a/res/client.js
+++ b/res/client.js
@@ -2707,6 +2707,9 @@ client_players_Raw.prototype = {
var client_players_RawSubs = function() { };
client_players_RawSubs.__name__ = true;
client_players_RawSubs.loadSubs = function(item,video) {
+ if(item.subs == null || item.subs.length == 0) {
+ return;
+ }
var ext = PathTools.urlExtension(item.subs);
if(client_JsApi.hasSubtitleSupport(ext)) {
return;
diff --git a/src/client/players/RawSubs.hx b/src/client/players/RawSubs.hx
index 88a2f03..a8cbc98 100644
--- a/src/client/players/RawSubs.hx
+++ b/src/client/players/RawSubs.hx
@@ -18,6 +18,7 @@ private typedef Duration = {
class RawSubs {
public static function loadSubs(item:VideoItem, video:VideoElement):Void {
+ if (item.subs == null || item.subs.length == 0) return;
final ext = PathTools.urlExtension(item.subs);
// do not load subs if there is custom plugin
if (JsApi.hasSubtitleSupport(ext)) return;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage