diff options
| author | Ben Sima <ben@bensima.com> | 2025-12-02 15:52:27 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-12-02 15:55:49 -0500 |
| commit | b60fc6f95e68c8581e2cec48f8d99e7c467a1db2 (patch) | |
| tree | af582c102744a7d4804f7fa9fba473fd42241fdf | |
| parent | 9e65e80276aeb33c0f917d005e621a18158fffee (diff) | |
Remove pyproject=true, use format=setuptools, add toggle_episode_public
| -rw-r--r-- | Biz/PodcastItLater/Core.py | 12 | ||||
| -rw-r--r-- | Omni/Bild/Builder.nix | 3 | ||||
| -rw-r--r-- | Omni/Bild/Deps/Python.nix | 1 |
3 files changed, 13 insertions, 3 deletions
diff --git a/Biz/PodcastItLater/Core.py b/Biz/PodcastItLater/Core.py index 3a88f22..62eead8 100644 --- a/Biz/PodcastItLater/Core.py +++ b/Biz/PodcastItLater/Core.py @@ -1073,6 +1073,18 @@ class Database: # noqa: PLR0904 logger.info("Unmarked episode %s as public", episode_id) @staticmethod + def toggle_episode_public(episode_id: int) -> None: + """Toggle an episode's public status.""" + with Database.get_connection() as conn: + cursor = conn.cursor() + cursor.execute( + "UPDATE episodes SET is_public = NOT is_public WHERE id = ?", + (episode_id,), + ) + conn.commit() + logger.info("Toggled public status for episode %s", episode_id) + + @staticmethod def get_public_episodes(limit: int = 50) -> list[dict[str, Any]]: """Get public episodes for public feed.""" with Database.get_connection() as conn: diff --git a/Omni/Bild/Builder.nix b/Omni/Bild/Builder.nix index 9ede3b8..9356d97 100644 --- a/Omni/Bild/Builder.nix +++ b/Omni/Bild/Builder.nix @@ -280,8 +280,7 @@ with bild; let python = python.buildPythonApplication rec { inherit name src CODEROOT; - pyproject = true; - build-system = [python.packages.setuptools]; + format = "setuptools"; nativeBuildInputs = [makeWrapper]; propagatedBuildInputs = langdeps_ ++ sysdeps_ ++ rundeps_; buildInputs = sysdeps_; diff --git a/Omni/Bild/Deps/Python.nix b/Omni/Bild/Deps/Python.nix index d21e129..2b8531b 100644 --- a/Omni/Bild/Deps/Python.nix +++ b/Omni/Bild/Deps/Python.nix @@ -23,7 +23,6 @@ "pytest-asyncio" "pytest-mock" "requests" - "setuptools" "slixmpp" "sqids" "starlette" |
