Skip to content

Commit

Permalink
Fix collaps
Browse files Browse the repository at this point in the history
  • Loading branch information
nb557 committed May 29, 2024
1 parent 2da6905 commit dae0b9a
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions online_mod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//16.05.2024 - Fix
//29.05.2024 - Fix collaps

(function () {
'use strict';
Expand Down Expand Up @@ -2784,7 +2784,8 @@
var prefer_http = Lampa.Storage.field('online_mod_prefer_http') === true;
var prefer_dash = Lampa.Storage.field('online_mod_prefer_dash') === true;
var prox = component.proxy('collaps');
var embed = prox + (prefer_http ? 'http:' : 'https:') + '//api.linktodo.ws/embed/';
var embed = prox + (prefer_http ? 'http:' : 'https:') + '//api.insertunit.ws/embed/';
var embed2 = prox + (prefer_http ? 'http:' : 'https:') + '//api.kinogram.best/embed/';
var filter_items = {};
var choice = {
season: 0,
Expand All @@ -2797,9 +2798,21 @@
network.silent(embed + api, function (str) {
if (callback) callback(str || '');
}, function (a, c) {
if (a.status == 404 && a.responseText && a.responseText.indexOf('видео недоступно') !== -1 || a.status == 0 && a.statusText !== 'timeout') {
if (a.status == 404 && a.responseText && a.responseText.indexOf('видео недоступно') !== -1) {
if (callback) callback('');
} else if (error) error(network.errorDecode(a, c));
} else {
network.clear();
network.timeout(10000);
network.silent(embed2 + api, function (str) {
if (callback) callback(str || '');
}, function (a, c) {
if (a.status == 404 && a.responseText && a.responseText.indexOf('видео недоступно') !== -1 || a.status == 0 && a.statusText !== 'timeout') {
if (callback) callback('');
} else if (error) error(network.errorDecode(a, c));
}, false, {
dataType: 'text'
});
}
}, false, {
dataType: 'text'
});
Expand Down Expand Up @@ -15163,7 +15176,7 @@
};
}

var mod_version = '16.05.2024';
var mod_version = '29.05.2024';
console.log('App', 'start address:', window.location.href);
var isMSX = !!(window.TVXHost || window.TVXManager);
var isTizen = navigator.userAgent.toLowerCase().indexOf('tizen') !== -1;
Expand Down

0 comments on commit dae0b9a

Please sign in to comment.