Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ Updating is changing the image tag and redeploying. The database migrates itself
forward on start, and no release so far has needed anything else — where a release
changes what your listeners see, it says so.

## 1.9.1 — 2026-09-16

### Fixed

- **The Adverts page was blank for anyone with an ad blocker.** 1.9.0 named the panel on that
page `ad-panel` and its notes `ad-note`. EasyList, which uBlock Origin, AdGuard and most other
blockers load by default, hides any element with those names, so the page arrived complete and
the browser hid it. Nothing was lost: every cut, rule and decision was there all along. The
names on these pages no longer contain "ad", "advert" or "sponsor" as a word, and a test now
fails if one comes back. The same change covers the cuts on the episode page and the dashboard.

## 1.9.0 — 2026-09-16

### Changed — adverts you can see, and put back
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ Reading the words is the slow part of a pass. With an NVIDIA card, use the GPU i
instead of the regular one — same app, same data, different tag:

```
ghcr.io/antoine-debroye/selfpod:1.9.0-cuda
ghcr.io/antoine-debroye/selfpod:1.9.1-cuda
```

It is amd64 only, about two and a half gigabytes, and uses the `small` model by default,
Expand Down
4 changes: 4 additions & 0 deletions doc/selfpod-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,10 @@ states (Cut, Waiting, Kept, Restored here). Boundaries are taught by typing thei
stretches by time on an episode page, as well as by words in its transcript. The episode page
plays the original beside the published copy.

**Amended in 1.9.1.** No class or id on these pages may contain *ad*, *ads*, *advert*,
*sponsor* or *promo* as a word: ad blockers hide elements by those names whatever the server
sends (`test/integration/adblock-names.test.js`).

**What it costs.** Measured on the owner's French show on a desktop: the `base`
model at about 40× real time and `small` at about 20×; on a two-thread Core-class
NAS expect several times real time for `base`. The image grows by about 260 MB for
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "selfpod",
"version": "1.9.0",
"version": "1.9.1",
"description": "SelfPod \u2014 a self-hosted podcast server. Drop a file in a folder; it's an episode.",
"license": "MIT",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion src/services/adverts-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function describeWork(owed) {
export function workStripHtml(show, owed) {
const sentence = describeWork(owed);
if (!sentence) return '';
return `<span class="ad-work__text" hx-get="/ui/shows/${escapeHtml(encodeURIComponent(show.slug))}/ad-work" hx-trigger="load delay:10s" hx-target="#ad-work" hx-swap="innerHTML">${escapeHtml(sentence)}</span>`;
return `<span class="cuts-work__text" hx-get="/ui/shows/${escapeHtml(encodeURIComponent(show.slug))}/ad-work" hx-trigger="load delay:10s" hx-target="#cuts-work" hx-swap="innerHTML">${escapeHtml(sentence)}</span>`;
}

export function createAdvertsView({ db, adDetect, transcriber, episodes, shows }) {
Expand Down
62 changes: 31 additions & 31 deletions src/web/public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,7 @@ dialog.modal[open]::backdrop { animation: sp-fade-in .16s ease-out both; }
.ep-table--pinned .dur,
.ep-table--pinned .size,
.ep-table--pinned .ep-reach,
.ep-table--pinned .ep-adverts,
.ep-table--pinned .ep-cuts,
.ep-table--pinned .ep-status {
display: inline-block;
vertical-align: middle;
Expand Down Expand Up @@ -2140,28 +2140,28 @@ dialog.modal[open]::backdrop { animation: sp-fade-in .16s ease-out both; }
cut is solid, waiting is hatched, restored is an outline. The word beside
each stretch says the same thing again.
═══════════════════════════════════════════════════════════════════════════ */
.ad-work:empty { display: none; }
.ad-work {
.cuts-work:empty { display: none; }
.cuts-work {
display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
padding: 9px 14px; border-radius: var(--r-sm);
background: var(--teal-soft); color: #1E547A; font-size: 13.5px;
}
.ad-work::before {
.cuts-work::before {
content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
animation: sp-pulse 1.6s ease-in-out infinite;
}

.ad-totals {
.cuts-totals {
display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px;
}
.ad-totals__item {
.cuts-totals__item {
background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
padding: 12px 14px; box-shadow: var(--shadow); min-width: 0;
}
.ad-totals dt { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.ad-totals dd { margin: 2px 0 0; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink); }
.ad-note { font-size: 13px; margin: -4px 0 14px; color: var(--ink-soft); }
.ad-note--warn { color: #8A5E10; }
.cuts-totals dt { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.cuts-totals dd { margin: 2px 0 0; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink); }
.cuts-note { font-size: 13px; margin: -4px 0 14px; color: var(--ink-soft); }
.cuts-note--warn { color: #8A5E10; }

.rules { list-style: none; margin: 8px 0 0; }
.rule {
Expand Down Expand Up @@ -2234,36 +2234,36 @@ a.cut-pill:hover { text-decoration: underline; }
}
.stretch__play:hover { background: var(--paper-2); }
.stretch__play.is-playing { background: var(--accent); border-color: var(--accent); color: #fff; }
.ad-timeline__more { margin-top: 12px; }
.ad-settings > summary { cursor: pointer; margin-bottom: 0; }
.ad-settings[open] > summary { margin-bottom: 14px; }
.ad-settings__check { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.meta--adverts { margin-top: 2px; }
.ep-adverts { white-space: nowrap; }
.ep-table--pinned .ep-adverts:empty { display: none; }
.cuts-timeline__more { margin-top: 12px; }
.cuts-settings > summary { cursor: pointer; margin-bottom: 0; }
.cuts-settings[open] > summary { margin-bottom: 14px; }
.cuts-settings__check { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.meta--cuts { margin-top: 2px; }
.ep-cuts { white-space: nowrap; }
.ep-table--pinned .ep-cuts:empty { display: none; }

/* The episode page's Adverts card. */
.ep-ad__hold { margin-bottom: 14px; }
.ep-ad__summary { margin-bottom: 12px; }
.ep-ad__headline { font-size: 14px; line-height: 1.5; }
.ep-ad__figures { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 10px 0 6px; }
.ep-ad__figures div { min-width: 0; }
.ep-ad__figures dt { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.ep-ad__figures dd { margin: 2px 0 0; font-size: 13.5px; }
.ep-ad__players { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.ep-ad__player { min-width: 0; }
.ep-ad__player audio { width: 100%; margin-top: 4px; }
.ep-cuts__hold { margin-bottom: 14px; }
.ep-cuts__summary { margin-bottom: 12px; }
.ep-cuts__headline { font-size: 14px; line-height: 1.5; }
.ep-cuts__figures { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 10px 0 6px; }
.ep-cuts__figures div { min-width: 0; }
.ep-cuts__figures dt { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.ep-cuts__figures dd { margin: 2px 0 0; font-size: 13.5px; }
.ep-cuts__players { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.ep-cuts__player { min-width: 0; }
.ep-cuts__player audio { width: 100%; margin-top: 4px; }
.teach-range { margin: 6px 0 4px; padding: 12px 14px; background: var(--paper-2); border-radius: var(--r-sm); }
.teach-range__time { width: 88px; flex: none; }
.ep-ad__more { margin-top: 8px; }
.ep-cuts__more { margin-top: 8px; }
/* The words are evidence for the card above them, not a card of their own. */
.ep-ad__heard { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.ep-cuts__heard { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

@media (max-width: 640px) {
.ad-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cuts-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rule, .stretch { flex-wrap: wrap; gap: 8px; }
.rule__main, .stretch__main { flex: 1 1 100%; }
.rule__act, .stretch__act { justify-content: flex-start; }
.ep-ad__players { grid-template-columns: 1fr; }
.ep-cuts__players { grid-template-columns: 1fr; }
.rule-teach select, .tx__teach-row select, .teach-range__row select { flex: 1 1 100%; }
}
2 changes: 1 addition & 1 deletion src/web/public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
var button = event.target.closest('[data-pick-from-player]');
if (!button) return;
var form = button.closest('form');
var card = button.closest('#episode-adverts') || document;
var card = button.closest('#episode-cuts') || document;
// Whichever copy of the original was listened to last: the player under the bar,
// or the one a ▶ on a stretch used. Reading only the first would fill in 0:00 for
// someone who found the moment by pressing ▶.
Expand Down
2 changes: 1 addition & 1 deletion src/web/routes/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default async function eventRoutes(fastify, { events, logger, shows, adPi
} catch (err) {
logger?.debug({ err }, 'could not work out what a show owes for the live strip');
}
send(`ad-work-${show.id}`, workStripHtml(show, owed));
send(`cuts-work-${show.id}`, workStripHtml(show, owed));
};
/* A trigger only: the panel, the episode table, the card and the episode page each
fetch themselves again when it arrives. */
Expand Down
34 changes: 17 additions & 17 deletions src/web/views/partials/ad-panel.eta
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
const rules = it.rules ?? { rows: [], kept: [] };
const timeline = it.timeline ?? { episodes: [], nextBefore: null };
%>
<div id="ad-panel" class="ad-panel"
<div id="cuts-panel" class="cuts-panel"
hx-get="/ui/shows/<%= slug %>/ad-panel"
hx-trigger="sse:ad-changed-<%= show.id %> from:body"
hx-swap="outerHTML">

<div id="ad-work" class="ad-work" role="status" aria-live="polite"
sse-swap="ad-work-<%= show.id %>" hx-swap="innerHTML"><%~ it.workHtml ?? '' %></div>
<div id="cuts-work" class="cuts-work" role="status" aria-live="polite"
sse-swap="cuts-work-<%= show.id %>" hx-swap="innerHTML"><%~ it.workHtml ?? '' %></div>

<% if (it.formError) { %>
<div class="notice warn" role="alert"><%= it.formError %></div>
Expand All @@ -27,16 +27,16 @@
</div>
<% } else { %>

<dl class="ad-totals">
<dl class="cuts-totals">
<% for (const figure of it.totals ?? []) { %>
<div class="ad-totals__item"><dt><%= figure.label %></dt><dd><%= figure.value %></dd></div>
<div class="cuts-totals__item"><dt><%= figure.label %></dt><dd><%= figure.value %></dd></div>
<% } %>
</dl>
<% if (it.heldSentence) { %><p class="ad-note ad-note--warn"><%= it.heldSentence %></p><% } %>
<% if (it.failedSentence) { %><p class="ad-note ad-note--warn"><%= it.failedSentence %></p><% } %>
<% if (it.engineSentence) { %><p class="ad-note ad-note--warn"><%= it.engineSentence %></p><% } %>
<% if (it.heldSentence) { %><p class="cuts-note cuts-note--warn"><%= it.heldSentence %></p><% } %>
<% if (it.failedSentence) { %><p class="cuts-note cuts-note--warn"><%= it.failedSentence %></p><% } %>
<% if (it.engineSentence) { %><p class="cuts-note cuts-note--warn"><%= it.engineSentence %></p><% } %>

<section class="form-card" id="ad-rules">
<section class="form-card" id="cuts-rules">
<div class="ftitle">What SelfPod cuts</div>
<% if (rules.rows.length) { %>
<ul class="rules">
Expand All @@ -49,7 +49,7 @@
</div>
<div class="rule__act">
<% for (const action of rule.actions) { %>
<%~ include('./ad-action.eta', { action, target: '#ad-panel', returnTo: null }) %>
<%~ include('./ad-action.eta', { action, target: '#cuts-panel', returnTo: null }) %>
<% } %>
</div>
</li>
Expand All @@ -60,7 +60,7 @@
<% } %>

<form class="rule-teach" method="post" action="/ui/shows/<%= slug %>/ad-markers"
hx-post="/ui/shows/<%= slug %>/ad-markers" hx-target="#ad-panel" hx-swap="outerHTML">
hx-post="/ui/shows/<%= slug %>/ad-markers" hx-target="#cuts-panel" hx-swap="outerHTML">
<label class="rule-teach__lead" for="boundary-position">The programme</label>
<select id="boundary-position" name="position">
<option value="starts">starts when it says</option>
Expand All @@ -84,7 +84,7 @@
</div>
<div class="rule__act">
<% for (const action of rule.actions) { %>
<%~ include('./ad-action.eta', { action, target: '#ad-panel', returnTo: null }) %>
<%~ include('./ad-action.eta', { action, target: '#cuts-panel', returnTo: null }) %>
<% } %>
</div>
</li>
Expand All @@ -94,16 +94,16 @@
<% } %>
</section>

<section class="form-card" id="ad-timeline">
<section class="form-card" id="cuts-timeline">
<div class="ftitle">Episode by episode</div>
<%~ include('./ad-timeline-items.eta', { show, timeline }) %>
</section>
<% } %>

<details class="form-card ad-settings" <%= mode === 'off' ? 'open' : '' %>>
<details class="form-card cuts-settings" <%= mode === 'off' ? 'open' : '' %>>
<summary class="ftitle">Settings</summary>
<form method="post" action="/ui/shows/<%= slug %>/ad-trim"
hx-post="/ui/shows/<%= slug %>/ad-trim" hx-target="#ad-panel" hx-swap="outerHTML">
hx-post="/ui/shows/<%= slug %>/ad-trim" hx-target="#cuts-panel" hx-swap="outerHTML">
<fieldset class="modal__choices">
<legend class="sr-only">What should SelfPod do about adverts?</legend>
<label class="choice">
Expand Down Expand Up @@ -170,8 +170,8 @@
</form>

<% if (mode !== 'off') { %>
<form class="ad-settings__check" method="post" action="/ui/shows/<%= slug %>/ad-detect"
hx-post="/ui/shows/<%= slug %>/ad-detect" hx-target="#ad-panel" hx-swap="outerHTML">
<form class="cuts-settings__check" method="post" action="/ui/shows/<%= slug %>/ad-detect"
hx-post="/ui/shows/<%= slug %>/ad-detect" hx-target="#cuts-panel" hx-swap="outerHTML">
<span class="muted">SelfPod checks after every scan.</span>
<button class="btn btn-ghost btn-sm" type="submit">Check now</button>
</form>
Expand Down
8 changes: 4 additions & 4 deletions src/web/views/partials/ad-timeline-items.eta
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
const timeline = it.timeline;
%>
<% for (const bar of timeline.episodes) { %>
<%~ include('./cut-bar.eta', { bar, target: '#ad-panel', returnTo: null }) %>
<%~ include('./cut-bar.eta', { bar, target: '#cuts-panel', returnTo: null }) %>
<% } %>
<% if (timeline.nextBefore) { %>
<div class="ad-timeline__more" id="ad-timeline-more">
<a class="btn btn-ghost btn-sm" href="/shows/<%= encodeURIComponent(show.slug) %>/adverts?before=<%= encodeURIComponent(timeline.nextBefore) %>#ad-timeline"
<div class="cuts-timeline__more" id="cuts-timeline-more">
<a class="btn btn-ghost btn-sm" href="/shows/<%= encodeURIComponent(show.slug) %>/adverts?before=<%= encodeURIComponent(timeline.nextBefore) %>#cuts-timeline"
hx-get="/ui/shows/<%= encodeURIComponent(show.slug) %>/ad-timeline?before=<%= encodeURIComponent(timeline.nextBefore) %>"
hx-target="#ad-timeline-more" hx-swap="outerHTML">Show older</a>
hx-target="#cuts-timeline-more" hx-swap="outerHTML">Show older</a>
</div>
<% } %>
2 changes: 1 addition & 1 deletion src/web/views/partials/cut-bar.eta
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
waiting or restored drawn where it is. Positions are computed on the server
(lib/cut-bar.js), so the bar is right with script off. */
const bar = it.bar;
const target = it.target ?? '#ad-panel';
const target = it.target ?? '#cuts-panel';
%>
<article class="cutbar" id="ep-<%= bar.id %>" data-cutbar>
<header class="cutbar__head">
Expand Down
22 changes: 11 additions & 11 deletions src/web/views/partials/episode-adverts.eta
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
const base = `/ui/episodes/${encodeURIComponent(episode.id)}`;
const listened = ad.listened;
%>
<section class="form-card" id="episode-adverts"
<section class="form-card" id="episode-cuts"
hx-get="<%= base %>/adverts"
hx-trigger="sse:transcript-<%= episode.id %> from:body, sse:ad-changed-<%= show.id %> from:body<%= listened.state === 'listening' ? ', load delay:10s' : '' %>"
hx-swap="outerHTML">
Expand All @@ -24,40 +24,40 @@
<% if (ad.trim.failed) { %>
<div class="notice warn" role="status"><div><%= ad.trim.failedSentence %></div></div>
<% } else if (ad.hold) { %>
<div class="notice warn ep-ad__hold" role="status"><div><%= ad.hold.sentence %></div></div>
<div class="notice warn ep-cuts__hold" role="status"><div><%= ad.hold.sentence %></div></div>
<% } %>

<div class="ep-ad__summary">
<div class="ep-cuts__summary">
<% if (ad.trim.isTrimmed && ad.trim.savedSeconds) { %>
<div class="ep-ad__headline"><strong><%= ad.trim.savedLabel %> removed</strong></div>
<dl class="ep-ad__figures">
<div class="ep-cuts__headline"><strong><%= ad.trim.savedLabel %> removed</strong></div>
<dl class="ep-cuts__figures">
<div><dt>On your share</dt><dd class="mono"><%= it.helpers.formatDuration(ad.trim.beforeSeconds) %> · <%= it.helpers.formatBytes(ad.trim.beforeBytes) %></dd></div>
<div><dt>Published</dt><dd class="mono"><%= it.helpers.formatDuration(ad.trim.afterSeconds) %> · <%= it.helpers.formatBytes(ad.trim.afterBytes) %></dd></div>
<div><dt>Cuts</dt><dd><%= ad.cut.length %></dd></div>
</dl>
<% } else if (ad.bar && ad.bar.state) { %>
<div class="ep-ad__headline"><strong><%= ad.bar.state.caption %></strong></div>
<div class="ep-cuts__headline"><strong><%= ad.bar.state.caption %></strong></div>
<% } %>
</div>

<% if (ad.bar) { %>
<%~ include('./cut-bar.eta', { bar: ad.bar, target: '#episode-adverts', returnTo: `episode:${episode.id}` }) %>
<%~ include('./cut-bar.eta', { bar: ad.bar, target: '#episode-cuts', returnTo: `episode:${episode.id}` }) %>
<% } %>

<div class="ep-ad__players">
<div class="ep-ad__player">
<div class="ep-cuts__players">
<div class="ep-cuts__player">
<div class="ds-caption">Published copy</div>
<audio controls preload="none" src="<%= ad.publishedAudioUrl %>"></audio>
</div>
<div class="ep-ad__player">
<div class="ep-cuts__player">
<div class="ds-caption">Original</div>
<audio controls preload="none" src="<%= ad.originalAudioUrl %>" data-original-player></audio>
</div>
</div>

<%~ include('./teach-range.eta', { adverts: ad, episode }) %>

<p class="hint ep-ad__more"><a href="<%= ad.advertsUrl %>#ep-<%= episode.id %>">All adverts in this show</a></p>
<p class="hint ep-cuts__more"><a href="<%= ad.advertsUrl %>#ep-<%= episode.id %>">All adverts in this show</a></p>
<% } %>

<%~ include('./episode-transcript.eta', { transcript: listened, show, episode, helpers: it.helpers, embedded: true }) %>
Expand Down
2 changes: 1 addition & 1 deletion src/web/views/partials/episode-row.eta
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<% } %>
</td>
<% if (it.cut !== undefined) { %>
<td class="ep-adverts"><% if (it.cut) { %><a class="cut-pill cut-pill--<%= it.cut.state %>" href="<%= it.cut.url %>" title="<%= it.cut.caption %>"><%= it.cut.pill %></a><% } %></td>
<td class="ep-cuts"><% if (it.cut) { %><a class="cut-pill cut-pill--<%= it.cut.state %>" href="<%= it.cut.url %>" title="<%= it.cut.caption %>"><%= it.cut.pill %></a><% } %></td>
<% } %>
<td class="ep-status"><span class="badge <%= badge.cls %> badge--tight"><span class="d" aria-hidden="true"></span><%= badge.label %></span></td>
<td class="ep-actions">
Expand Down
Loading
Loading