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 lampac.code-workspace
cache
configs/sisi_bkp.js
+15 -51
View File
@@ -16,7 +16,7 @@
Lampa.Lang.add({ Lampa.Lang.add({
lampac_sisiname: { lampac_sisiname: {
ru: 'Settings', ru: 'Клубничка',
en: 'Strawberry', en: 'Strawberry',
uk: 'Полуничка', uk: 'Полуничка',
zh: '草莓' zh: '草莓'
@@ -34,23 +34,11 @@
return /vip.mp4/.test(element.video); return /vip.mp4/.test(element.video);
} }
if (window.rchtype == undefined) { if (!window.rch) {
window.rchtype = 'web'; Lampa.Utils.putScript(["{localhost}/invc-rch.js"], function() {}, false, function() {
var check = function check(good) { if (!window.rch.startTypeInvoke)
window.rchtype = Lampa.Platform.is('android') ? 'apk' : good ? 'cors' : 'web'; window.rch.typeInvoke('{localhost}', function() {});
} }, true);
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'
});
}
} }
var hubConnection; var hubConnection;
@@ -63,33 +51,8 @@
} }
hubConnection = new signalR.HubConnectionBuilder().withUrl(json.ws).build(); hubConnection = new signalR.HubConnectionBuilder().withUrl(json.ws).build();
hubConnection.start().then(function() { hubConnection.start().then(function() {
hubConnection.invoke("RchRegistry", JSON.stringify({version: 138, host: location.host, rchtype: window.rchtype})).then(function() { window.rch.Registry(json.result, hubConnection, function() {
call() 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
});
}
});
}); });
})["catch"](function(err) { })["catch"](function(err) {
//return console.error(err.toString()); //return console.error(err.toString());
@@ -97,6 +60,7 @@
if (json.keepalive > 0) { if (json.keepalive > 0) {
hub_timer = setTimeout(function() { hub_timer = setTimeout(function() {
hubConnection.stop(); hubConnection.stop();
hubConnection = null;
}, 1000 * json.keepalive); }, 1000 * json.keepalive);
} }
} }
@@ -416,7 +380,7 @@
} }
if (uid) { 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) { if (u.indexOf('token=') == -1) {
@@ -521,7 +485,7 @@
this.menu = function(success, error) { this.menu = function(success, error) {
if (menu) return success(menu); 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) { if (data.channels) {
menu = data.channels; menu = data.channels;
success(menu); success(menu);
@@ -552,7 +516,7 @@
}; };
this.bookmark = function(element, add, call) { 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) { network.silent(this.account(u), function(e) {
call(true); call(true);
}, function() { }, function() {
@@ -580,7 +544,7 @@
} }
if (uid) { 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)); else u = u.replace(/uid=[^&]+/, 'uid=' + encodeURIComponent(uid));
} }
@@ -916,7 +880,7 @@
} }
function add() { 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') { if (Defined.use_api == 'pwa') {
var pw = $('<div>p</div>'); var pw = $('<div>p</div>');
@@ -1015,4 +979,4 @@
*/ */
} }
})(); })();
+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: ports:
- 9118:9118 - 9118:9118
volumes: volumes:
# - /HDD1/Torrents:/home/dlna # - /volume4/Torrents:/home/dlna
# - /srv/docker/lampac/sisi.js:/home/plugins/sisi.js - ./plugins/extensions.json:/home/plugins/extensions.json
# - /srv/docker/lampac/manifest.json:/home/module/manifest.json - ./configs/sisi.js:/home/plugins/sisi.js
- /root/lampac/plugins/extensions.json:/home/plugins/extensions.json # - ./manifest.json:/home/module/manifest.json
- type: bind - type: bind
source: /root/lampac/configs/init.conf source: ./configs/init.conf
target: /home/init.conf target: /home/init.conf
read_only: true read_only: true
+115 -108
View File
@@ -1,109 +1,116 @@
{ {
"secuses": true, "secuses": true,
"results": [ "results": [
{ {
"title": "Рекомендуем", "title": "Рекомендуем",
"results": [ "results": [
{ {
"name": "MODS's", "name": "MODS's",
"author": "@modss_group", "author": "@modss_group",
"link": "http://lampa.stream/modss", "link": "http://lampa.stream/modss",
"descr": "Фильмы и сериалы в онлайн. Плюс различные дополнения через меню настроек Modss", "descr": "Фильмы и сериалы в онлайн. Плюс различные дополнения через меню настроек Modss",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Клубничка 18+", "name": "Showy",
"author": "bwa.to", "author": "@Showy",
"link": "http://bwa.to/re", "link": "http://showwwy.com/m.js",
"descr": "Онлайн просмотр контента для взрослых, больше 30 сайтов", "descr": "Фильмы и сериалы в онлайн.",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Добавляет пункт \"Парсер\" в меню", "name": "Клубничка 18+",
"author": "@lampa", "author": "bwa.to",
"link": "{localhost}/plugins/etor.js", "link": "http://bwa.to/re",
"descr": "Плагин для ТВ, на которых Lampa установлена через официальные магазины LG Store и Tizen App Store. Включает в настройках отображение пунктов Парсер и Torrserver", "descr": "Онлайн просмотр контента для взрослых, больше 30 сайтов",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Публичные парсеры", "name": "Добавляет пункт \"Парсер\" в меню",
"author": "@lme", "author": "@lampa",
"link": "{localhost}/plugins/pubtorr.js", "link": "{localhost}/plugins/etor.js",
"descr": "Сборник публичных парсеров отображением статуса доступности", "descr": "Плагин для ТВ, на которых Lampa установлена через официальные магазины LG Store и Tizen App Store. Включает в настройках отображение пунктов Парсер и Torrserver",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Вторая кнопка Торренты", "name": "Публичные парсеры",
"author": "@VitalikPVA", "author": "@lme",
"link": "{localhost}/plugins/torrents.js", "link": "{localhost}/plugins/pubtorr.js",
"descr": "Плагин добавляет вторую кнопку Торренты", "descr": "Сборник публичных парсеров отображением статуса доступности",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Кинопоиск", "name": "Вторая кнопка Торренты",
"author": "and7ey", "author": "@VitalikPVA",
"link": "https://and7ey.github.io/lampa/kinopoisk.js", "link": "{localhost}/plugins/torrents.js",
"descr": "Отображает в приложении список фильмов из папки Буду смотреть на Кинопоиске", "descr": "Плагин добавляет вторую кнопку Торренты",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Оригинальные названия", "name": "Кинопоиск",
"author": "@BDV_Burik", "author": "and7ey",
"link": "https://bdvburik.github.io/title.js", "link": "https://and7ey.github.io/lampa/kinopoisk.js",
"descr": "Добавляет оригинальные названия к фильмам, сериалам.", "descr": "Отображает в приложении список фильмов из папки Буду смотреть на Кинопоиске",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Отзывы и рецензии", "name": "Оригинальные названия",
"author": "@elenatv99", "author": "@BDV_Burik",
"link": "https://lampaplugins.github.io/store/o.js", "link": "https://bdvburik.github.io/title.js",
"descr": "Добавляет кнопку чтения отзывов с КиноПоиск в карточку фильма или сериала", "descr": "Добавляет оригинальные названия к фильмам, сериалам.",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Отзывы с HDRezka", "name": "Отзывы и рецензии",
"author": "@BDV_Burik", "author": "@elenatv99",
"link": "{localhost}/plugins/rezkacomment.js", "link": "https://lampaplugins.github.io/store/o.js",
"descr": "Добавляет кнопку чтения отзывов с rezka.ag в карточку фильма или сериала", "descr": "Добавляет кнопку чтения отзывов с КиноПоиск в карточку фильма или сериала",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Рейтинг КиноПоиск и IMDB", "name": "Отзывы с HDRezka",
"author": "@t_anton", "author": "@BDV_Burik",
"link": "{localhost}/plugins/rating.js", "link": "{localhost}/plugins/rezkacomment.js",
"descr": "Показ рейтинга КиноПоиск и IMDB в карточке. Функционал аналогичен части из MODSs, так что их не следует использовать вместе", "descr": "Добавляет кнопку чтения отзывов с rezka.ag в карточку фильма или сериала",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Предзагрузка ts", "name": "Рейтинг КиноПоиск и IMDB",
"author": "@rootu", "author": "@t_anton",
"link": "{localhost}/plugins/ts-preload.js", "link": "{localhost}/plugins/rating.js",
"descr": "Плагин визуализации предзагрузки торрентов для встроенного клиента TorrServer", "descr": "Показ рейтинга КиноПоиск и IMDB в карточке. Функционал аналогичен части из MODSs, так что их не следует использовать вместе",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Торрент1", "name": "Предзагрузка ts",
"author": "@rootu", "author": "@rootu",
"link": "https://lampame.github.io/main/torrentmanager.js", "link": "{localhost}/plugins/ts-preload.js",
"descr": "Плагин управления торрентами", "descr": "Плагин визуализации предзагрузки торрентов для встроенного клиента TorrServer",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Торрент1", "name": "LME Torrent Manager",
"author": "@rootu", "author": "@rootu",
"link": "https://lampame.github.io/td/td.js", "link": "https://lampame.github.io/main/torrentmanager.js",
"descr": "Плагин управления торрентами", "descr": "Плагин управления торрентами",
"available_lampa": 1 "available_lampa": 1
}, },
{ {
"name": "Поиск локального TorrServer", "name": "Torrent downloader",
"author": "@AndreyURL54", "author": "@rootu",
"link": "{localhost}/plugins/checker.js", "link": "https://lampame.github.io/td/td.js",
"descr": "Плагин позволяет произвести поиск вашего локального TorrServer", "descr": "Плагин управления торрентами",
"available_lampa": 1 "available_lampa": 1
} },
], {
"hpu": "best" "name": "Поиск локального TorrServer",
} "author": "@AndreyURL54",
] "link": "{localhost}/plugins/checker.js",
} "descr": "Плагин позволяет произвести поиск вашего локального TorrServer",
"available_lampa": 1
}
],
"hpu": "best"
}
]
}