DeadAir is off for every feed until turned on for it (#171)

There was one switch for everything, with a feed kept out by hand; any
feed already subscribed would have been in it the moment the switch was
turned on. Now each feed, or the group it came in, is turned on by
itself, and a feed of a group turned on can still be kept out. The
general switch and /api/me's deadair are gone; /api/me keeps
deadair_saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 17:49:24 +00:00
parent 63e192767d
commit 16b0686aab
6 changed files with 30 additions and 40 deletions

View File

@@ -2509,9 +2509,9 @@ mod tests {
}
};
let off = page().await;
assert_eq!((off.position, off.enclosures[0].deadair), (300, None), "off until turned on");
assert_eq!((off.position, off.enclosures[0].deadair), (300, None), "off until turned on for the feed");
db.set_deadair(u, "", Some(true)).await.unwrap();
db.set_deadair(u, "f", Some(true)).await.unwrap();
let on = page().await;
assert_eq!((on.position, on.duration, on.enclosures[0].deadair), (180, Some(480), Some(120)));
@@ -2531,7 +2531,7 @@ mod tests {
playing.lock().unwrap().clear();
assert_eq!(deadair::on_save(&ctx, &playing, u, "f", "g", 200, Some(600)).await.unwrap(), (200, Some(600)));
// Kept out: the original's clock again.
// Turned off again: the original's clock.
db.set_deadair(u, "f", Some(false)).await.unwrap();
assert_eq!(page().await.enclosures[0].deadair, None);
}