Skip to content

fix: remove obsolete subscribed_only parameter from list_podcasts calls#89

Merged
allenhutchison merged 2 commits intomainfrom
fix/remove-subscribed-only-parameter
Jan 20, 2026
Merged

fix: remove obsolete subscribed_only parameter from list_podcasts calls#89
allenhutchison merged 2 commits intomainfrom
fix/remove-subscribed-only-parameter

Conversation

@allenhutchison
Copy link
Owner

@allenhutchison allenhutchison commented Jan 20, 2026

Summary

  • Removes obsolete subscribed_only parameter from list_podcasts() calls
  • Fixes TypeError in web app "all podcasts" view

Problem

After the is_subscribed field refactor (PR #86), the subscribed_only parameter was removed from list_podcasts(), but two callers still passed it:

  • src/web/app.py:692 - list_all_podcasts endpoint
  • scripts/backfill_last_new_episode.py:27

This caused:

TypeError: SQLAlchemyPodcastRepository.list_podcasts() got an unexpected keyword argument 'subscribed_only'

Test plan

  • All 1082 tests pass
  • Verified no other subscribed_only usages remain in repository calls

Summary by CodeRabbit

  • Refactor
    • Podcast listing now relies on default retrieval behavior (subscription filter removed), affecting which podcasts are returned.
  • Chores
    • Subscription flag removed from data exports and migrations; exported/migrated podcast records no longer include subscription status.
  • Documentation
    • Podcast statistics output no longer documents a subscription field.
  • Tests
    • Tests validating subscription-filter behavior were removed.

✏️ Tip: You can customize this high-level summary in your review settings.

The subscribed_only parameter was removed from list_podcasts() in a
previous refactor but two callers still passed it, causing TypeError.

Fixed in:
- src/web/app.py (list_all_podcasts endpoint)
- scripts/backfill_last_new_episode.py
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Calls to list_podcasts() were changed to rely on its default parameter instead of passing subscribed_only=False; additionally, the is_subscribed podcast column was removed from SQLite→SQL and SQLite→Postgres export/migration code, docs/tests updated accordingly, and a test suite referencing subscribed-only behavior was removed.

Changes

Cohort / File(s) Summary
List podcasts call sites
scripts/backfill_last_new_episode.py, src/web/app.py
Removed explicit subscribed_only=False argument when calling repo.list_podcasts(); now rely on default parameter.
Export SQLite -> SQL
scripts/export_sqlite_to_sql.py
Exclude is_subscribed from exported columns and row values; adjust boolean handling and INSERT column list to omit that column.
Migrate SQLite -> Postgres
scripts/migrate_sqlite_to_postgres.py
Filter out is_subscribed from podcasts.columns, build keep indices, and map rows to the reduced column set during INSERTs; adjust boolean conversion logic accordingly.
Repository docs/shape
src/db/repository.py
Documentation for get_podcast_stats updated to remove is_subscribed from the returned snapshot structure (no signature change).
Tests
tests/test_web_app.py
Removed test suite TestChatEndpointWithSubscribedOnly that validated subscribed-only behavior on the /api/chat endpoint.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through lines of code today,
Removed a flag, let defaults play,
Columns trimmed and tests set free,
A lighter hop — hooray for me! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: removing the obsolete subscribed_only parameter from list_podcasts calls to fix a TypeError.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/remove-subscribed-only-parameter

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc0458b and 778aa30.

📒 Files selected for processing (4)
  • scripts/export_sqlite_to_sql.py
  • scripts/migrate_sqlite_to_postgres.py
  • src/db/repository.py
  • tests/test_web_app.py

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

- Remove TestChatEndpointWithSubscribedOnly tests (ChatRequest model
  doesn't have subscribed_only field)
- Update migrate_sqlite_to_postgres.py to exclude is_subscribed column
- Update export_sqlite_to_sql.py to exclude is_subscribed column
- Fix docstring in repository.py that referenced is_subscribed
@allenhutchison allenhutchison merged commit 37efc0f into main Jan 20, 2026
2 of 3 checks passed
@allenhutchison allenhutchison deleted the fix/remove-subscribed-only-parameter branch January 20, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant