Compare commits

..
Author SHA1 Message Date
architect 54905cccab [STAGE3] OpenSubtitles API: RU search works, download incomplete
lint / hygiene (pull_request) Failing after 1m36s
lint / hygiene (push) Failing after 32s
standard / check (pull_request) Successful in 12s
standard / check (push) Successful in 13s
2026-11-27 15:54:36 +03:00
architect 64f0f05200 [STAGE3] S3-04 done: Matrix-only requests
lint / hygiene (push) Failing after 30s
lint / hygiene (pull_request) Failing after 26s
standard / check (pull_request) Successful in 13s
2026-11-27 15:39:38 +03:00
architect 84834e40af [STAGE3] Matrix-only request scope; Telegram excluded
lint / hygiene (push) Failing after 38s
lint / hygiene (pull_request) Failing after 1m30s
standard / check (pull_request) Successful in 14s
2026-11-27 15:39:00 +03:00
architect c9eddc0eda [STAGE3] Tracker: Bazarr RU provider blocked
lint / hygiene (push) Failing after 2m33s
lint / hygiene (pull_request) Failing after 29s
standard / check (pull_request) Successful in 15s
2026-11-27 11:58:56 +03:00
architect eb070b7be5 [STAGE3] Bazarr RU path attempted; subf2m no file
lint / hygiene (push) Failing after 2m50s
lint / hygiene (pull_request) Failing after 40s
standard / check (pull_request) Successful in 13s
2026-11-27 11:58:14 +03:00
architect 13d14b13a7 [STAGE3] Tracker: RU/Telegram blockers
lint / hygiene (push) Failing after 27s
lint / hygiene (pull_request) Failing after 35s
standard / check (pull_request) Successful in 14s
2026-11-27 11:36:49 +03:00
architect 060bb8f276 [STAGE3] Evidence: no RU files on disk; Telegram absent
lint / hygiene (push) Failing after 28s
lint / hygiene (pull_request) Failing after 34s
standard / check (pull_request) Successful in 15s
2026-11-27 11:36:10 +03:00
architect ff34b72f9a [STAGE3] Tracker: duplicate guard
lint / hygiene (push) Failing after 1m25s
lint / hygiene (pull_request) Failing after 34s
standard / check (pull_request) Successful in 19s
2026-11-27 11:35:21 +03:00
architect 8273956058 [STAGE3] Duplicate check before Seerr request
lint / hygiene (pull_request) Failing after 43s
lint / hygiene (push) Failing after 28s
standard / check (pull_request) Successful in 14s
standard / check (push) Successful in 17s
2026-11-27 11:34:55 +03:00
architect a7b1a90e9c [STAGE3] Tracker: Alpha/Matrix request paths
lint / hygiene (push) Failing after 28s
lint / hygiene (pull_request) Failing after 40s
standard / check (pull_request) Successful in 14s
2026-11-27 11:33:15 +03:00
architect 2fbe23476c [STAGE3] Matrix/Alpha request paths documented
lint / hygiene (push) Failing after 26s
lint / hygiene (pull_request) Failing after 35s
standard / check (pull_request) Successful in 18s
2026-11-27 11:32:56 +03:00
architect 8b78cd9a61 [STAGE3] Matrix !request link to Seerr
lint / hygiene (pull_request) Failing after 31s
lint / hygiene (push) Failing after 1m26s
standard / check (pull_request) Successful in 13s
standard / check (push) Successful in 14s
2026-11-27 11:32:13 +03:00
architect e6a29a5cda [STAGE3] Tracker: Alpha request path
lint / hygiene (push) Failing after 33s
lint / hygiene (pull_request) Failing after 27s
standard / check (pull_request) Successful in 13s
2026-11-27 11:30:49 +03:00
architect 3636be5ddd [STAGE3] Alpha request handoff to Seerr
lint / hygiene (pull_request) Failing after 30s
standard / check (pull_request) Successful in 17s
lint / hygiene (push) Failing after 34s
standard / check (push) Successful in 17s
2026-11-27 11:30:11 +03:00
architect 2be898d584 [STAGE3] Tracker: direct 6/6 done
lint / hygiene (push) Failing after 35s
lint / hygiene (pull_request) Failing after 41s
standard / check (pull_request) Successful in 14s
2026-11-27 11:29:13 +03:00
architect 304db34ac2 [STAGE3] Direct-play 6/6 playable media
lint / hygiene (pull_request) Failing after 33s
lint / hygiene (push) Failing after 36s
standard / check (pull_request) Successful in 27s
standard / check (push) Successful in 17s
2026-11-27 11:28:35 +03:00
architect 6ab94962ac [STAGE3] Tracker: direct 6/7, RU blocked by source
lint / hygiene (push) Failing after 49s
lint / hygiene (pull_request) Failing after 47s
standard / check (pull_request) Successful in 16s
2026-11-27 11:27:42 +03:00
architect 8940671aa3 [STAGE3] Direct-play 6/7 via episode inspection
lint / hygiene (push) Failing after 27s
lint / hygiene (pull_request) Failing after 29s
standard / check (pull_request) Successful in 29s
2026-11-27 11:27:01 +03:00
architect f57684399c [STAGE3] Tracker: Stage3 tasks
lint / hygiene (push) Failing after 1m42s
lint / hygiene (pull_request) Failing after 1m18s
standard / check (pull_request) Successful in 16s
2026-11-27 11:26:14 +03:00
5 changed files with 151 additions and 9 deletions

No files matched your search

+9
View File
@@ -42,6 +42,11 @@
| S2-05 | S2 | Adapters + ownership matrix | done | | architect | pipeline active; jellyfin 7 events; ownership.yaml | 3 | |
| S2-06 | S2 | pgvector pilot | done | | architect | nearest pilot-a, top2 pilot-a/pilot-c | 1 | |
| S2-07 | S2 | Gate G2 proof | done | YES | architect | 100→1; loss recovered | 1 | G2 |
| S3-01 | S3 | Аудит RU/direct-play | done | | architect | /v1/media/coverage | 0 | |
| S3-02 | S3 | RU-дорожки/субтитры | blocked | | architect | Bazarr profile1; subf2m no file; no RU files | 3 | |
| S3-03 | S3 | Direct-play 7/7 | done | | architect | coverage total6 direct6 | 2 | |
| S3-04 | S3 | Запрос из Alpha/Telegram/Matrix | done | | architect | /alpha/request; !request; request/check | 5 | |
| S3-05 | S3 | Gate G3 | open | YES | architect | pending | 0 | G3 |
| U-01 | U | Approve PR #192 | done | | roman | chat approval 2026-11-26 · Открыть PR #192 и подтвердить архитектуру | 2 | none |
| U-02 | U | Seerr vs Jellyseerr decision | dropped | YES | roman | Seerr audit · Выбрать после evidence | 2 | none |
| U-03 | U | RAM/GPU/disk data | dropped | YES | roman | resource baseline · Прислать/подтвердить параметры | 2 | none |
@@ -55,11 +60,15 @@
- S0 / done: 10
- S1 / done: 10
- S2 / done: 7
- S3 / blocked: 1
- S3 / done: 3
- S3 / open: 1
- U / done: 2
- U / dropped: 3
## Пользовательская очередь
- **S3-05** — Gate G3:
- **U-02** — Seerr vs Jellyseerr decision: Выбрать после evidence
- **U-03** — RAM/GPU/disk data: Прислать/подтвердить параметры
- **U-04** — Approve Stage1 write actions: Разрешить только после Gate G1
+67 -6
View File
@@ -8,22 +8,58 @@ Gate G3: семья делает запрос → смотрит с RU-озву
Jellyfin:
```text
всего медиа 7
всего медиа 6
RU audio 0
RU субтитры 0
direct-play 5
direct-play 6
```
Direct-play исправлен: сериал считается по эпизодам, BoxSet исключён из playable-медиа.
Это честный gap, не «всё хорошо».
Проверка диска: `.srt/.ass/.vtt` нет; имён `rus/russian` нет.
Значит RU-контента нет и вне индекса Jellyfin.
## Bazarr: RU-источник
- RU-профиль `Русский + English` существует;
- Dune/Interstellar получили профиль 1;
- subf2m исправлен User-Agent;
- throttle-файл сброшен;
- но RU-файл всё равно не скачался.
Бэкап конфига:
```text
/opt/bazarr/config/config/config.yaml.bak-subf2m-20261127
/opt/bazarr/config/config/config.yaml.bak-opensubtitles-20261127
```
## OpenSubtitles API
Ключ лежит только на хосте:
```text
/root/.opensubtitles-key (600)
```
Проверено:
- поиск RU работает: 23 варианта для Dune;
- прямой download link отдаёт файл очень медленно и обрывается;
- Bazarr `opensubtitlescom` требует username/password, не только API key.
Поэтому RU-файл пока не установлен. Обрезанный `.srt` не используется.
## Задачи
| Код | Задача | Статус |
|---|---|---|
| S3-01 | Аудит RU/direct-play | done (0/7 RU, 5/7 direct) |
| S3-02 | RU-дорожки/субтитры | open |
| S3-03 | Direct-play 7/7 | open |
| S3-04 | Запрос из Alpha/Telegram/Matrix | open |
| S3-01 | Аудит RU/direct-play | done (0/6 RU, 6/6 direct) |
| S3-02 | RU-дорожки/субтитры | blocked: Bazarr RU профиль есть, subf2m не отдал файл |
| S3-03 | Direct-play 6/6 | done |
| S3-04 | Запрос из Alpha/Matrix | done (Telegram исключён по решению) |
| S3-05 | Gate G3 | open |
## Проверка
@@ -37,3 +73,28 @@ http://192.168.1.10:9161/alpha/acceptance
```text
GET /v1/media/coverage
```
Запрос из Alpha:
```text
http://192.168.1.10:9161/alpha/request
```
Alpha ищет по Jellyfin; кнопка открывает Seerr. Alpha не пишет в Seerr/медиатеку.
Matrix:
```text
!request Дюна
```
Бот даёт ссылку на `https://requests.buryans.ru`, заявку создаёт семья в Seerr.
Telegram-бота в текущем контуре нет.
Проверка дублей:
```text
GET /v1/media/request/check?q=Дюна
```
Alpha показывает предупреждение, если заявка уже есть в Seerr.
+1
View File
@@ -23,6 +23,7 @@
## Остальные
* **Медиа** — статистика, новинки, поиск, очередь, заявки, место, пробелы.
- `!request <название>` — даёт ссылку на заявку в `https://requests.buryans.ru`; бот сам заявку не создаёт.
* **Фото** — статистика, альбомы, место.
* **Книги** — статистика, новинки, поиск.
* **Дом** — статистика, состояние.
+10 -1
View File
@@ -656,6 +656,7 @@ class MediaBot(Bot):
self.cmd("now", "кто что смотрит прямо сейчас")(lambda a: self._now(jf))
self.cmd("queue", "очередь загрузок в Sonarr и Radarr")(lambda a: self._queue())
self.cmd("requests", "последние заявки в Seerr")(lambda a: self._requests(seerr))
self.cmd("request", "ссылка на заявку в Seerr: `!request Дюна`")(lambda a: self._request_link(a))
self.cmd("disk", "место на дисках медиасервисов")(lambda a: self._disk())
self.cmd("wanted", "сколько ещё не найдено")(lambda a: self._wanted())
self.cmd("paths", "где лежат файлы и куда их класть")(lambda a: self._paths())
@@ -764,7 +765,7 @@ class MediaBot(Bot):
if err:
return f"Seerr не ответил: {err}"
if not reqs:
return "Заявок пока нет. Заказать можно на https://ombi.buryans.ru"
return "Заявок пока нет. Заказать можно на https://requests.buryans.ru"
lines = ["**Последние заявки**", ""]
for r in reqs:
media = r.get("media", {}) or {}
@@ -774,6 +775,14 @@ class MediaBot(Bot):
lines.append(f"• {title} — {status} (просил {who})")
return "\n".join(lines)
def _request_link(self, query):
q = (query or "").strip()
if not q:
return "Использование: `!request Дюна`"
return (f"**Заявка в Seerr**\n{q}\n"
"Открой https://requests.buryans.ru, найди этот тайтл и отправь заявку.\n"
"Alpha и бот не создают запрос сами — это защита от дублей.")
def _disk(self):
lines = ["**Диски**", ""]
for svc in (SONARR, RADARR):
+64 -2
View File
@@ -110,7 +110,19 @@ def media_coverage():
rus = {"ru", "rus", "russian", "русский"}
rows = []
for x in items:
if x.get("Type") in ("BoxSet", "Folder", "CollectionFolder"):
continue
streams = x.get("MediaStreams") or []
sources = x.get("MediaSources") or []
if x.get("Type") == "Series" and not sources:
try:
ep = jf("/Shows/%s/Episodes?Fields=MediaStreams,MediaSources&Limit=200"
% x.get("Id"))
eps = ep.get("Items") or []
streams = [s for e in eps for s in (e.get("MediaStreams") or [])]
sources = [s for e in eps for s in (e.get("MediaSources") or [])]
except Exception:
pass
audio = [s for s in streams if s.get("Type") == "Audio"]
subs = [s for s in streams if s.get("Type") == "Subtitle" or s.get("IsTextSubtitleStream")]
has_ru_audio = any((s.get("Language") or "").lower() in rus or
@@ -119,7 +131,6 @@ def media_coverage():
has_ru_subs = any((s.get("Language") or "").lower() in rus or
any(w in (s.get("DisplayTitle") or "").lower() for w in ("russian", "русск"))
for s in subs)
sources = x.get("MediaSources") or []
direct = bool(sources) and all(
bool(s.get("SupportsDirectPlay") or s.get("SupportsDirectStream")) for s in sources)
rows.append({"id": x.get("Id"), "name": x.get("Name"), "type": x.get("Type"),
@@ -223,6 +234,23 @@ def acceptance_status():
return {"ok": all(x["auto"] for x in items), "items": items}
def request_check(q):
qn = (q or "").strip().lower()
if not qn:
return {"ok": False, "error": "query_required"}
code, body = seerr("/api/v1/request?take=50")
if code != 200:
return {"ok": False, "error": "seerr_unavailable", "code": code}
for x in body.get("results") or []:
media = x.get("media") or {}
title = (media.get("title") or media.get("name") or "").lower()
if qn in title or title in qn:
return {"ok": True, "requested": True, "id": x.get("id"),
"title": media.get("title") or media.get("name"),
"status": x.get("status")}
return {"ok": True, "requested": False}
def seerr(path):
"""Read-only Seerr requests via the local breakglass Jellyfin login."""
global _SEERR_OP, _SEERR_TS
@@ -443,6 +471,13 @@ class H(BaseHTTPRequestHandler):
if u.path == "/v1/home/status":
self.out(200, home_status())
return
if u.path == "/v1/media/request/check":
q = urllib.parse.parse_qs(u.query).get("q", [""])[0]
try:
self.out(200, request_check(q))
except Exception as e:
self.out(502, {"ok": False, "error": str(e)[:200]})
return
if u.path == "/v1/media/requests":
code, body = seerr("/api/v1/request?take=20")
if code == 503:
@@ -498,6 +533,9 @@ class H(BaseHTTPRequestHandler):
if u.path == "/acceptance":
self.out(200, PAGE_ACCEPTANCE, "text/html")
return
if u.path == "/request":
self.out(200, PAGE_REQUEST, "text/html")
return
if u.path == "/owner":
self.out(200, PAGE_OWNER, "text/html")
return
@@ -524,7 +562,7 @@ button{padding:12px 16px;border-radius:8px;border:0;background:#2f81f7;color:#ff
a{color:#58a6ff}
</style></head><body>
<h1>Buryans One Alpha</h1><div class=mut id=me>read-only</div>
<div style="margin:8px 0"><a class="card" style="display:inline-block;padding:10px 14px" href="/alpha/owner">Owner-пульт →</a> <a class="card" style="display:inline-block;padding:10px 14px" href="/alpha/acceptance">Опросник приёмки →</a></div>
<div style="margin:8px 0"><a class="card" style="display:inline-block;padding:10px 14px" href="/alpha/owner">Owner-пульт →</a> <a class="card" style="display:inline-block;padding:10px 14px" href="/alpha/acceptance">Опросник приёмки →</a> <a class="card" style="display:inline-block;padding:10px 14px" href="/alpha/request">Запросить фильм →</a></div>
<div class=grid id=status style="margin:16px 0"></div>
<div class=grid style="margin:16px 0">
<a class=card href="https://media.buryans.ru" target=_blank><h3>Jellyfin</h3><div class=tag>фильмы и сериалы</div></a>
@@ -572,6 +610,7 @@ a{color:#58a6ff}code{background:#161b22;padding:2px 5px;border-radius:4px}
<a class=big href="https://media.buryans.ru/sso/OID/start/authentik" target=_blank><h3>Войти в Jellyfin</h3><div class=tag>прямой SSO-вход, если кнопка не видна.</div></a>
<a class=big href="http://192.168.1.10:9161/" target=_blank><h3>Audit 360</h3><div class=tag>трекер, evidence, Gate G0/G1.</div></a>
<a class=big href="/alpha/acceptance"><h3>Опросник приёмки</h3><div class=tag>по каждому сервису: что нажать и что должно быть.</div></a>
<a class=big href="/alpha/request"><h3>Запросить фильм</h3><div class=tag>поиск по Jellyfin и кнопка запроса в Seerr.</div></a>
<a class=big href="http://192.168.1.10:9161/alpha/"><h3>На главную Alpha</h3><div class=tag>поиск, новинки, сервисы.</div></a>
<a class=big href="/alpha/v1/fitness" target=_blank><h3>Fitness</h3><div class=tag>18 FIT-пунктов, честные статусы.</div></a>
<a class=big href="http://192.168.1.140:3000/" target=_blank><h3>Gitea</h3><div class=tag>код, PR, решения.</div></a>
@@ -614,5 +653,28 @@ async function boot(){try{const d=await (await fetch('v1/acceptance')).json();do
boot();
</script></body></html>"""
PAGE_REQUEST = """<!doctype html><html lang=ru><head><meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<title>Запрос фильма — Buryans</title>
<style>
body{background:#0d1117;color:#e6edf3;font:16px/1.5 system-ui,Arial;margin:0;padding:28px}
h1{font-size:28px;margin:0 0 6px}.mut{color:#8b949e}
input{width:min(600px,80%);padding:12px;border-radius:8px;border:1px solid #30363d;background:#161b22;color:#e6edf3;font-size:16px}
button{padding:12px 16px;border-radius:8px;border:0;background:#2f81f7;color:#fff;font-size:16px;cursor:pointer}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin-top:18px}
.card{background:#161b22;border:1px solid #30363d;border-radius:10px;padding:14px}
.card h3{margin:0 0 4px;font-size:16px}.tag{color:#8b949e;font-size:13px}
a{color:#58a6ff}.warn{background:#161b22;border:1px solid #9e6a03;border-radius:10px;padding:12px;color:#d29922}
</style></head><body>
<h1>Запрос фильма</h1><div class=mut>Alpha только ищет. Запрос создаётся в Seerr, не в медиатеке.</div>
<div style="margin:16px 0"><input id=q placeholder="Название фильма или сериала..." autofocus> <button onclick="go()">Найти</button></div>
<div id=msg class=mut></div><div id=out class=grid></div>
<div class=warn style="margin-top:18px">Если запрос уже существует, Seerr покажет это сам. Дубли в Jellyfin не создаются.</div>
<script>
const e=s=>String(s??'').replace(/[&<>"]/g,c=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;'}[c]));
async function go(){const q=document.getElementById('q').value.trim();if(!q)return;document.getElementById('msg').textContent='поиск...';const r=await fetch('v1/media/search?q='+encodeURIComponent(q));const d=await r.json();const xs=d.items||[];let warn='';try{const c=await (await fetch('v1/media/request/check?q='+encodeURIComponent(q))).json();if(c.requested)warn='⚠️ Похоже, заявка уже есть: '+e(c.title||q)+' (статус '+e(c.status)+').';}catch(e){}document.getElementById('msg').textContent=xs.length?'':'ничего не найдено';if(warn)document.getElementById('msg').textContent=warn;document.getElementById('out').innerHTML=xs.map(x=>`<div class=card><h3>${e(x.name)}</h3><div class=tag>${e(x.type)} ${e(x.year||'')}</div><div style="margin-top:8px"><a href="https://requests.buryans.ru/search?query=${encodeURIComponent(x.name)}" target=_blank>Запросить в Seerr →</a></div></div>`).join('')}
document.getElementById('q').addEventListener('keydown',e=>{if(e.key==='Enter')go()});
</script></body></html>"""
if __name__ == "__main__":
ThreadingHTTPServer((HOST, PORT), H).serve_forever()