Skip to content

Commit

Permalink
Fix normalizeTitle
Browse files Browse the repository at this point in the history
  • Loading branch information
nb557 committed Jan 25, 2024
1 parent c383a1b commit bd4a640
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion kp_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
}

function normalizeTitle(str) {
return cleanTitle(str.toLowerCase().replace(//g, '-').replace(/ё/g, 'е'));
return cleanTitle(str.toLowerCase().replace(/[\-\u2010-\u2015\u2E3A\u2E3B\uFE58\uFE63\uFF0D]+/g, '-').replace(/ё/g, 'е'));
}

function containsTitle(str, title) {
Expand Down
14 changes: 8 additions & 6 deletions online_mod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//24.01.2024 - Fix proxy video stream option
//26.01.2024 - Fix normalizeTitle

(function () {
'use strict';
Expand Down Expand Up @@ -3202,7 +3202,7 @@
return {
label: item.label,
quality: quality ? parseInt(quality[1]) : NaN,
file: link
file: component.proxyStream(link, 'cdnmovies')
};
});
items.sort(function (a, b) {
Expand Down Expand Up @@ -3262,7 +3262,7 @@
url = url.replace('/sundb.coldcdn.xyz/', '/sundb.nl/');

if (url) {
element.stream = url;
element.stream = component.proxyStream(url, 'cdnmovies');
element.qualitys = false;
call(element);
} else error();
Expand Down Expand Up @@ -3328,7 +3328,7 @@
link = link.replace('/sundb.coldcdn.xyz/', '/sundb.nl/');
return {
label: item.label,
url: link
url: component.proxyStream(link, 'cdnmovies')
};
});
return subtitles.length ? subtitles : false;
Expand Down Expand Up @@ -14058,7 +14058,7 @@
};

this.normalizeTitle = function (str) {
return this.cleanTitle(str.toLowerCase().replace(//g, '-').replace(/ё/g, 'е'));
return this.cleanTitle(str.toLowerCase().replace(/[\-\u2010-\u2015\u2E3A\u2E3B\uFE58\uFE63\uFF0D]+/g, '-').replace(/ё/g, 'е'));
};

this.equalTitle = function (t1, t2) {
Expand Down Expand Up @@ -14556,6 +14556,8 @@
this.proxyUrlCall(proxy_url, method, url, timeout, post_data, call_success, call_fail);
};

this.proxyCall = this.proxyCall2;

this.extendChoice = function () {
var data = Lampa.Storage.cache('online_mod_choice_' + balanser, 500, {});
var save = data[selected_id || object.movie.id] || {};
Expand Down Expand Up @@ -14988,7 +14990,7 @@
};
}

var mod_version = '24.01.2024';
var mod_version = '26.01.2024';
var isMSX = !!(window.TVXHost || window.TVXManager);
var isTizen = navigator.userAgent.toLowerCase().indexOf('tizen') !== -1;
var isIFrame = window.parent !== window;
Expand Down
2 changes: 1 addition & 1 deletion rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
}

function normalizeTitle(str){
return cleanTitle(str.toLowerCase().replace(//g, '-').replace(/ё/g, 'е'));
return cleanTitle(str.toLowerCase().replace(/[\-\u2010-\u2015\u2E3A\u2E3B\uFE58\uFE63\uFF0D]+/g, '-').replace(/ё/g, 'е'));
}

function equalTitle(t1, t2){
Expand Down

0 comments on commit bd4a640

Please sign in to comment.