This commit is contained in:
Фёдоров Дмитрий
2025-03-25 12:54:22 +03:00
parent 831630ef7c
commit 280c0b8acc
5 changed files with 157 additions and 164 deletions
+2
View File
@@ -1 +1,3 @@
lampac.code-workspace
cache
configs/sisi_bkp.js
+14 -50
View File
@@ -16,7 +16,7 @@
Lampa.Lang.add({
lampac_sisiname: {
ru: 'Settings',
ru: 'Клубничка',
en: 'Strawberry',
uk: 'Полуничка',
zh: '草莓'
@@ -34,23 +34,11 @@
return /vip.mp4/.test(element.video);
}
if (window.rchtype == undefined) {
window.rchtype = 'web';
var check = function check(good) {
window.rchtype = Lampa.Platform.is('android') ? 'apk' : good ? 'cors' : 'web';
}
if (Lampa.Platform.is('android') || Lampa.Platform.is('tizen')) check(true);
else {
var net = new Lampa.Reguest();
net.silent('{localhost}'.indexOf(location.host) >= 0 ? 'https://github.com/' : '{localhost}/cors/check', function() {
check(true);
}, function() {
check(false);
}, false, {
dataType: 'text'
});
}
if (!window.rch) {
Lampa.Utils.putScript(["{localhost}/invc-rch.js"], function() {}, false, function() {
if (!window.rch.startTypeInvoke)
window.rch.typeInvoke('{localhost}', function() {});
}, true);
}
var hubConnection;
@@ -63,33 +51,8 @@
}
hubConnection = new signalR.HubConnectionBuilder().withUrl(json.ws).build();
hubConnection.start().then(function() {
hubConnection.invoke("RchRegistry", JSON.stringify({version: 138, host: location.host, rchtype: window.rchtype})).then(function() {
call()
hubConnection.on("RchClient", function(rchId, url, data, headers, returnHeaders) {
function result(html) {
if (Lampa.Arrays.isObject(html) || Lampa.Arrays.isArray(html)) html = JSON.stringify(html);
network.silent(json.result, false, false, {
id: rchId,
value: html
}, {
dataType: 'text',
timeout: 1000 * 5
});
}
if (url == 'eval')
result(eval(data))
else {
network["native"](url, result, function() {
result('');
}, data, {
dataType: 'text',
timeout: 1000 * json.timeout,
headers: headers,
returnHeaders: returnHeaders
});
}
});
window.rch.Registry(json.result, hubConnection, function() {
call();
});
})["catch"](function(err) {
//return console.error(err.toString());
@@ -97,6 +60,7 @@
if (json.keepalive > 0) {
hub_timer = setTimeout(function() {
hubConnection.stop();
hubConnection = null;
}, 1000 * json.keepalive);
}
}
@@ -416,7 +380,7 @@
}
if (uid) {
if (u.indexOf('&uid=') == -1) u = Lampa.Utils.addUrlComponent(u, 'uid=' + encodeURIComponent(uid));
if (u.indexOf('uid=') == -1) u = Lampa.Utils.addUrlComponent(u, 'uid=' + encodeURIComponent(uid));
}
if (u.indexOf('token=') == -1) {
@@ -521,7 +485,7 @@
this.menu = function(success, error) {
if (menu) return success(menu);
network.silent(this.account(Defined.localhost)+'&rchtype='+window.rchtype, function(data) {
network.silent(this.account(Defined.localhost)+'&rchtype='+(window.rch ? window.rch.type : ''), function(data) {
if (data.channels) {
menu = data.channels;
success(menu);
@@ -552,7 +516,7 @@
};
this.bookmark = function(element, add, call) {
var u = Defined.localhost + '/bookmark/' + (add ? 'add' : 'remove?buid=' + element.bookmark.uid);
var u = Defined.localhost + '/bookmark/' + (add ? 'add' : 'remove?id=' + element.bookmark.uid);
network.silent(this.account(u), function(e) {
call(true);
}, function() {
@@ -580,7 +544,7 @@
}
if (uid) {
if (u.indexOf('&uid=') == -1) u = Lampa.Utils.addUrlComponent(u, 'uid=' + encodeURIComponent(uid));
if (u.indexOf('uid=') == -1) u = Lampa.Utils.addUrlComponent(u, 'uid=' + encodeURIComponent(uid));
else u = u.replace(/uid=[^&]+/, 'uid=' + encodeURIComponent(uid));
}
@@ -916,7 +880,7 @@
}
function add() {
var button = $("<li class=\"menu__item selector\">\n <div class=\"menu__ico\">\n <svg width=\"200\" height=\"243\" viewBox=\"0 0 200 243\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M187.714 130.727C206.862 90.1515 158.991 64.2019 100.983 64.2019C42.9759 64.2019 -4.33044 91.5669 10.875 130.727C26.0805 169.888 63.2501 235.469 100.983 234.997C138.716 234.526 168.566 171.303 187.714 130.727Z\" stroke=\"currentColor\" stroke-width=\"15\"/><path d=\"M102.11 62.3146C109.995 39.6677 127.46 28.816 169.692 24.0979C172.514 56.1811 135.338 64.2018 102.11 62.3146Z\" stroke=\"currentColor\" stroke-width=\"15\"/><path d=\"M90.8467 62.7863C90.2285 34.5178 66.0667 25.0419 31.7127 33.063C28.8904 65.1461 68.8826 62.7863 90.8467 62.7863Z\" stroke=\"currentColor\" stroke-width=\"15\"/><path d=\"M100.421 58.5402C115.627 39.6677 127.447 13.7181 85.2149 9C82.3926 41.0832 83.5258 35.4214 100.421 58.5402Z\" stroke=\"currentColor\" stroke-width=\"15\"/><rect x=\"39.0341\" y=\"98.644\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/><rect x=\"90.8467\" y=\"92.0388\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/><rect x=\"140.407\" y=\"98.644\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/><rect x=\"116.753\" y=\"139.22\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/><rect x=\"64.9404\" y=\"139.22\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/><rect x=\"93.0994\" y=\"176.021\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/></svg>\n </div>\n <div class=\"menu__text\">" + Lampa.Lang.translate('lampac_sisiname') + "</div>\n </li>");
var button = $("<li class=\"menu__item selector\" data-action=\"sisi\">\n <div class=\"menu__ico\">\n <svg width=\"200\" height=\"243\" viewBox=\"0 0 200 243\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M187.714 130.727C206.862 90.1515 158.991 64.2019 100.983 64.2019C42.9759 64.2019 -4.33044 91.5669 10.875 130.727C26.0805 169.888 63.2501 235.469 100.983 234.997C138.716 234.526 168.566 171.303 187.714 130.727Z\" stroke=\"currentColor\" stroke-width=\"15\"/><path d=\"M102.11 62.3146C109.995 39.6677 127.46 28.816 169.692 24.0979C172.514 56.1811 135.338 64.2018 102.11 62.3146Z\" stroke=\"currentColor\" stroke-width=\"15\"/><path d=\"M90.8467 62.7863C90.2285 34.5178 66.0667 25.0419 31.7127 33.063C28.8904 65.1461 68.8826 62.7863 90.8467 62.7863Z\" stroke=\"currentColor\" stroke-width=\"15\"/><path d=\"M100.421 58.5402C115.627 39.6677 127.447 13.7181 85.2149 9C82.3926 41.0832 83.5258 35.4214 100.421 58.5402Z\" stroke=\"currentColor\" stroke-width=\"15\"/><rect x=\"39.0341\" y=\"98.644\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/><rect x=\"90.8467\" y=\"92.0388\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/><rect x=\"140.407\" y=\"98.644\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/><rect x=\"116.753\" y=\"139.22\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/><rect x=\"64.9404\" y=\"139.22\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/><rect x=\"93.0994\" y=\"176.021\" width=\"19.1481\" height=\"30.1959\" rx=\"9.57407\" fill=\"currentColor\"/></svg>\n </div>\n <div class=\"menu__text\">" + Lampa.Lang.translate('lampac_sisiname') + "</div>\n </li>");
if (Defined.use_api == 'pwa') {
var pw = $('<div>p</div>');
+19
View File
@@ -0,0 +1,19 @@
---
services:
lampac:
image: immisterio/lampac:latest
container_name: lampac
restart: always
ports:
- 9118:9118
volumes:
- /volume4/Torrents:/home/dlna
- /volume1/docker/lampac/plugins/extensions.json:/home/plugins/extensions.json
- /volume1/docker/lampac/sisi.js:/home/plugins/sisi.js
# - /volume1/docker/lampac/manifest.json:/home/module/manifest.json
- type: bind
source: /volume1/docker/lampac/configs/init.conf
target: /home/init.conf
read_only: true
+6 -5
View File
@@ -8,11 +8,12 @@ services:
ports:
- 9118:9118
volumes:
# - /HDD1/Torrents:/home/dlna
# - /srv/docker/lampac/sisi.js:/home/plugins/sisi.js
# - /srv/docker/lampac/manifest.json:/home/module/manifest.json
- /root/lampac/plugins/extensions.json:/home/plugins/extensions.json
# - /volume4/Torrents:/home/dlna
- ./plugins/extensions.json:/home/plugins/extensions.json
- ./configs/sisi.js:/home/plugins/sisi.js
# - ./manifest.json:/home/module/manifest.json
- type: bind
source: /root/lampac/configs/init.conf
source: ./configs/init.conf
target: /home/init.conf
read_only: true
+9 -2
View File
@@ -11,6 +11,13 @@
"descr": "Фильмы и сериалы в онлайн. Плюс различные дополнения через меню настроек Modss",
"available_lampa": 1
},
{
"name": "Showy",
"author": "@Showy",
"link": "http://showwwy.com/m.js",
"descr": "Фильмы и сериалы в онлайн.",
"available_lampa": 1
},
{
"name": "Клубничка 18+",
"author": "bwa.to",
@@ -82,14 +89,14 @@
"available_lampa": 1
},
{
"name": "Торрент1",
"name": "LME Torrent Manager",
"author": "@rootu",
"link": "https://lampame.github.io/main/torrentmanager.js",
"descr": "Плагин управления торрентами",
"available_lampa": 1
},
{
"name": "Торрент1",
"name": "Torrent downloader",
"author": "@rootu",
"link": "https://lampame.github.io/td/td.js",
"descr": "Плагин управления торрентами",