Skip to content

Commit

Permalink
Merge pull request #73 from gentslava/main
Browse files Browse the repository at this point in the history
[pull] master from main
  • Loading branch information
pull[bot] authored Jan 10, 2025
2 parents 214fcc3 + 980f77e commit 82aab45
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 9 deletions.
39 changes: 30 additions & 9 deletions app.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,7 @@
github: 'https://github.com/yumata/lampa-source',
css_version: '2.5.1',
app_version: '2.2.5',
cub_domain: 'cub.red'
cub_mirrors: ['cub.red', 'standby.cub.red']
};
var plugins$1 = [];
Object.defineProperty(object$2, 'app_digital', {
Expand All @@ -1982,6 +1982,12 @@
}
}
});
Object.defineProperty(object$2, 'cub_domain', {
get: function get() {
var use = localStorage.getItem('cub_domain') || '';
return object$2.cub_mirrors.indexOf(use) > -1 ? use : object$2.cub_mirrors[0];
}
});

function toObject(a) {
if (Object.prototype.toString.call(a) === '[object Object]') return a;else {
Expand Down Expand Up @@ -2253,7 +2259,7 @@

var html$1K = "<div>\n <div class=\"settings-param selector\" data-type=\"toggle\" data-name=\"cloud_use\">\n <div class=\"settings-param__name\">\u0421\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u044F</div>\n <div class=\"settings-param__value\"></div>\n <div class=\"settings-param__descr\">\u0421\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u044F \u0434\u0430\u0451\u0442 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u044C \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0430\u0448\u0438 \u0437\u0430\u043A\u043B\u0430\u0434\u043A\u0438, \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u043E\u0432, \u043C\u0435\u0442\u043A\u0438 \u0438 \u0442\u0430\u0439\u043C-\u043A\u043E\u0434\u044B. \u0418\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u044F \u043F\u043E \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044E https://github.com/yumata/lampa/wiki</div>\n </div>\n\n <div class=\"settings-param-title\"><span>\u0410\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u044F</span></div>\n\n <div class=\"settings-param selector\" data-type=\"input\" data-name=\"cloud_token\" placeholder=\"\u041D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\">\n <div class=\"settings-param__name\">Token</div>\n <div class=\"settings-param__value\"></div>\n </div>\n\n <div class=\"settings-param-title\"><span>\u0421\u0442\u0430\u0442\u0443\u0441</span></div>\n\n <div class=\"settings-param selector settings--cloud-status\" data-static=\"true\">\n <div class=\"settings-param__name\"></div>\n <div class=\"settings-param__descr\"></div>\n </div>\n</div>";

var html$1J = "<div>\n <div class=\"settings-param selector\" data-type=\"toggle\" data-name=\"account_use\">\n <div class=\"settings-param__name\">#{settings_cub_sync}</div>\n <div class=\"settings-param__value\"></div>\n <div class=\"settings-param__descr\">#{settings_cub_sync_descr}</div>\n </div>\n\n <div class=\"settings-param-title settings--account-user hide\"><span>#{settings_cub_account}</span> <span class=\"settings-param__label hide\">Premium</span></div>\n\n <div class=\"settings-param selector settings--account-user settings--account-user-info hide\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_logged_in_as}</div>\n <div class=\"settings-param__value\"></div>\n </div>\n\n <div class=\"settings-param selector settings--account-user settings--account-user-profile hide\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_profile}</div>\n <div class=\"settings-param__value\"></div>\n </div>\n\n <div class=\"settings-param selector settings--account-user settings--account-user-out hide\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_logout}</div>\n </div>\n\n <div class=\"settings-param-title settings--account-signin\"><span>#{settings_cub_signin}</span></div>\n\n <div class=\"settings-param selector settings--account-signin settings--account-device-add\" data-type=\"button\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_signin_button}</div>\n <div class=\"settings-param__value\"></div>\n </div>\n\n <div class=\"settings-param-title\"><span>#{settings_cub_status}</span></div>\n\n <div class=\"settings-param selector settings--account-status\" data-static=\"true\">\n <div class=\"settings-param__value\"></div>\n <div class=\"settings-param__descr\"></div>\n </div>\n\n <div class=\"settings-param-title settings--account-user hide\"><span>#{more}</span></div>\n\n <div class=\"settings-param selector settings--account-user settings--account-user-sync hide\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_sync_btn}</div>\n <div class=\"settings-param__value\">#{settings_cub_sync_btn_descr}</div>\n </div>\n\n <div class=\"settings-param selector settings--account-user settings--account-user-backup hide\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_backup}</div>\n <div class=\"settings-param__value\">#{settings_cub_backup_descr}</div>\n </div>\n\n <div class=\"settings-param-title\"><span>CUB Premium</span></div>\n\n <div class=\"selectbox-item selector selectbox-item--checkbox settings--account-premium\" data-static=\"true\">\n <div class=\"selectbox-item__title\">#{settings_cub_sync_filters}</div>\n <div class=\"selectbox-item__checkbox\"></div>\n </div>\n <div class=\"selectbox-item selector selectbox-item--checkbox settings--account-premium\" data-static=\"true\">\n <div class=\"selectbox-item__title\">#{settings_cub_sync_calendar}</div>\n <div class=\"selectbox-item__checkbox\"></div>\n </div>\n <div class=\"selectbox-item selector selectbox-item--checkbox settings--account-premium\" data-static=\"true\">\n <div class=\"selectbox-item__title\">#{settings_cub_sync_timecodes}</div>\n <div class=\"selectbox-item__checkbox\"></div>\n </div>\n <div class=\"selectbox-item selector selectbox-item--checkbox settings--account-premium\" data-static=\"true\">\n <div class=\"selectbox-item__title\">#{settings_cub_sync_search}</div>\n <div class=\"selectbox-item__checkbox\"></div>\n </div>\n</div>";
var html$1J = "<div>\n <div class=\"settings-param selector\" data-type=\"toggle\" data-name=\"account_use\">\n <div class=\"settings-param__name\">#{settings_cub_sync}</div>\n <div class=\"settings-param__value\"></div>\n <div class=\"settings-param__descr\">#{settings_cub_sync_descr}</div>\n </div>\n\n <div class=\"settings-param-title settings--account-user hide\"><span>#{settings_cub_account}</span> <span class=\"settings-param__label hide\">Premium</span></div>\n\n <div class=\"settings-param selector\" data-type=\"select\" data-name=\"cub_domain\">\n <div class=\"settings-param__name\">#{settings_cub_domain}</div>\n <div class=\"settings-param__value\"></div>\n </div>\n\n <div class=\"settings-param selector settings--account-user settings--account-user-info hide\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_logged_in_as}</div>\n <div class=\"settings-param__value\"></div>\n </div>\n\n <div class=\"settings-param selector settings--account-user settings--account-user-profile hide\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_profile}</div>\n <div class=\"settings-param__value\"></div>\n </div>\n\n <div class=\"settings-param selector settings--account-user settings--account-user-out hide\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_logout}</div>\n </div>\n\n <div class=\"settings-param-title settings--account-signin\"><span>#{settings_cub_signin}</span></div>\n\n <div class=\"settings-param selector settings--account-signin settings--account-device-add\" data-type=\"button\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_signin_button}</div>\n <div class=\"settings-param__value\"></div>\n </div>\n\n <div class=\"settings-param-title\"><span>#{settings_cub_status}</span></div>\n\n <div class=\"settings-param selector settings--account-status\" data-static=\"true\">\n <div class=\"settings-param__value\"></div>\n <div class=\"settings-param__descr\"></div>\n </div>\n\n <div class=\"settings-param-title settings--account-user hide\"><span>#{more}</span></div>\n\n <div class=\"settings-param selector settings--account-user settings--account-user-sync hide\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_sync_btn}</div>\n <div class=\"settings-param__value\">#{settings_cub_sync_btn_descr}</div>\n </div>\n\n <div class=\"settings-param selector settings--account-user settings--account-user-backup hide\" data-static=\"true\">\n <div class=\"settings-param__name\">#{settings_cub_backup}</div>\n <div class=\"settings-param__value\">#{settings_cub_backup_descr}</div>\n </div>\n\n <div class=\"settings-param-title\"><span>CUB Premium</span></div>\n\n <div class=\"selectbox-item selector selectbox-item--checkbox settings--account-premium\" data-static=\"true\">\n <div class=\"selectbox-item__title\">#{settings_cub_sync_filters}</div>\n <div class=\"selectbox-item__checkbox\"></div>\n </div>\n <div class=\"selectbox-item selector selectbox-item--checkbox settings--account-premium\" data-static=\"true\">\n <div class=\"selectbox-item__title\">#{settings_cub_sync_calendar}</div>\n <div class=\"selectbox-item__checkbox\"></div>\n </div>\n <div class=\"selectbox-item selector selectbox-item--checkbox settings--account-premium\" data-static=\"true\">\n <div class=\"selectbox-item__title\">#{settings_cub_sync_timecodes}</div>\n <div class=\"selectbox-item__checkbox\"></div>\n </div>\n <div class=\"selectbox-item selector selectbox-item--checkbox settings--account-premium\" data-static=\"true\">\n <div class=\"selectbox-item__title\">#{settings_cub_sync_search}</div>\n <div class=\"selectbox-item__checkbox\"></div>\n </div>\n</div>";

var html$1I = "<div class=\"items-line layer--visible layer--render\">\n <div class=\"items-line__head\">\n <div class=\"items-line__title\">{title}</div>\n </div>\n <div class=\"items-line__body\"></div>\n</div>";

Expand Down Expand Up @@ -8934,6 +8940,13 @@
timelines(true);
updateProfileIcon();
}

if (e.name == 'cub_domain') {
Noty.show(Lang.translate('account_reload_after'));
setTimeout(function () {
window.location.reload();
}, 5000);
}
});
Socket.listener.follow('open', checkValidAccount);
Socket.listener.follow('open', function () {
Expand Down Expand Up @@ -9581,7 +9594,7 @@
type: 'account_bookmarks_parse',
data: rows
}, function (e) {
Storage.set('account_bookmarks', rows);
//Storage.set('account_bookmarks', rows) //забивает кеш, поэтому не используем
bookmarks = e.data;
if (call) call();
listener$d.send('update_bookmarks', {
Expand Down Expand Up @@ -18692,6 +18705,9 @@
function addPluginParams(url) {
var encode = url;
encode = encode.replace('cub.watch', object$2.cub_domain);
object$2.cub_mirrors.forEach(function (mirror) {
encode = encode.replace(mirror, object$2.cub_domain);
});

if (!/[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/.test(encode)) {
encode = encode.replace(/\{storage_(\w+|\d+|_|-)\}/g, function (match, key) {
Expand Down Expand Up @@ -33253,6 +33269,11 @@
'inner': '#{settings_param_player_inner}',
'youtube': 'YouTube'
}, 'inner');
var mirrors_select = {};
object$2.cub_mirrors.forEach(function (mirror) {
mirrors_select[mirror] = mirror;
});
select$1('cub_domain', mirrors_select, object$2.cub_domain);
/**
* Добовляем триггеры
*/
Expand Down Expand Up @@ -33764,9 +33785,7 @@

readed$1[name] = value;
} catch (e) {
if (e.name == 'QuotaExceededError') {
Noty.show(Lang.translate('storage_quota_exceeded'));
}
if (e.name == 'QuotaExceededError') ;
}

if (!nolisten) listener.send('change', {
Expand Down Expand Up @@ -33845,7 +33864,7 @@
}

need.forEach(function (a) {
localStorage.removeItem(a);
localStorage.setItem(a, '');
});
}

Expand Down Expand Up @@ -34023,6 +34042,7 @@
settings_cub_sync_recomends: 'Синхронизация рекомендаций',
settings_cub_sync_timecodes: 'Синхронизация тайм-кодов',
settings_cub_signin_button: 'Выполнить вход',
settings_cub_domain: 'Основной домен',
settings_input_links: 'Избранное',
settings_interface_type: 'Облегчённая версия',
settings_interface_size: 'Размер интерфейса',
Expand Down Expand Up @@ -36105,7 +36125,8 @@
player_normalization_type_all: 'All',
player_normalization_type_up: 'Only Increase',
player_normalization_type_down: 'Only Decrease',
storage_quota_exceeded: 'Storage quota exceeded. Clear cache and try again.'
storage_quota_exceeded: 'Storage quota exceeded. Clear cache and try again.',
settings_cub_domain: 'Primary domain'
};

var langs = {};
Expand Down Expand Up @@ -39453,7 +39474,7 @@
var appletv = navigator.userAgent.toLowerCase().indexOf("ipad") > -1 && window.innerWidth == 1920 && window.innerHeight == 1080;
Arrays.extend(window.lampa_settings, {
socket_use: true,
socket_url: 'wss://cub.red:8010',
socket_url: 'wss://' + object$2.cub_domain + ':8010',
socket_methods: true,
account_use: true,
account_sync: true,
Expand Down
1 change: 1 addition & 0 deletions lang/be.js
Original file line number Diff line number Diff line change
Expand Up @@ -1165,4 +1165,5 @@ export default {
player_normalization_type_all: 'Усе',
player_normalization_type_up: 'Толькі павышэнне',
player_normalization_type_down: 'Толькі паніжэнне',
settings_cub_domain: 'Асноўны дамен',
}
1 change: 1 addition & 0 deletions lang/bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -1149,5 +1149,6 @@ export default {
player_normalization_type_up: 'Само увеличаване',
player_normalization_type_down: 'Само намаляване',
storage_quota_exceeded: 'Надхвърлен е лимитът за съхранение. Изтрийте кеша и опитайте отново.',
settings_cub_domain: 'Основен домейн',

}
1 change: 1 addition & 0 deletions lang/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1230,5 +1230,6 @@ player_normalization_type_all: 'Vše',
player_normalization_type_up: 'Pouze zvýšení',
player_normalization_type_down: 'Pouze snížení',
storage_quota_exceeded: 'Překročena kvóta úložiště. Vymažte mezipaměť a zkuste to znovu.',
settings_cub_domain: 'Primární doména',

};
1 change: 1 addition & 0 deletions lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -1150,5 +1150,6 @@ export default {
player_normalization_type_up: 'Only Increase',
player_normalization_type_down: 'Only Decrease',
storage_quota_exceeded: 'Storage quota exceeded. Clear cache and try again.',
settings_cub_domain: 'Primary domain',

}
1 change: 1 addition & 0 deletions lang/he.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,4 +1048,5 @@ export default {
player_normalization_type_up: 'רק הגבהה',
player_normalization_type_down: 'רק הנמכה',
storage_quota_exceeded: 'מכסת האחסון חרגה. נקה את המטמון ונסה שוב.',
settings_cub_domain: 'דומיין ראשי',
}
1 change: 1 addition & 0 deletions lang/pt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1135,5 +1135,6 @@ export default {
player_normalization_type_up: 'Apenas Aumento',
player_normalization_type_down: 'Apenas Diminuição',
storage_quota_exceeded: 'Limite de armazenamento excedido. Limpe o cache e tente novamente.',
settings_cub_domain: 'Domínio primário',

}
1 change: 1 addition & 0 deletions lang/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default {
settings_cub_sync_recomends: 'Синхронизация рекомендаций',
settings_cub_sync_timecodes: 'Синхронизация тайм-кодов',
settings_cub_signin_button: 'Выполнить вход',
settings_cub_domain: 'Основной домен',

settings_input_links: 'Избранное',

Expand Down
1 change: 1 addition & 0 deletions lang/uk.js
Original file line number Diff line number Diff line change
Expand Up @@ -1125,5 +1125,6 @@ export default {
player_normalization_type_up: 'Тільки підвищення',
player_normalization_type_down: 'Тільки зниження',
storage_quota_exceeded: 'Перевищено ліміт сховища. Очистіть кеш і спробуйте ще раз.',
settings_cub_domain: 'Основний домен',

}
1 change: 1 addition & 0 deletions lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -1100,5 +1100,6 @@ export default {
player_normalization_type_up: '仅提升',
player_normalization_type_down: '仅降低',
storage_quota_exceeded: '存储配额已超出。清除缓存后重试。',
settings_cub_domain: '主域',

}

0 comments on commit 82aab45

Please sign in to comment.