Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve podcast handling #330

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open

Improve podcast handling #330

wants to merge 6 commits into from

Commits on Jul 30, 2023

  1. podcasts: DRY up template handling logic

    This is a fairly conservative change; I think a lot of this can be pushed
    up into the Controller logic.
    MattWindsor91 committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    dd8d137 View commit details
    Browse the repository at this point in the history
  2. podcasts: improve check for unpublished podcasts

    The check occurs at the model level,
    so anything that retrieves podcasts will now ignore unpublished ones.
    
    This commit doesn't implement 404 handling for missing podcasts in the player,
    so this currently just triggers a 200 and a blank screen.
    
    Fixes #269.
    MattWindsor91 committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    b220e4e View commit details
    Browse the repository at this point in the history
  3. podcasts: bail if list page is out of range

    There was a missing return - harmless but inefficient, I think?
    MattWindsor91 committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    3edf05b View commit details
    Browse the repository at this point in the history
  4. podcasts: drop to basic Go 404 for GetEmbed

    This is better than nothing.
    MattWindsor91 committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    509fa7e View commit details
    Browse the repository at this point in the history
  5. controllers: pull up 404 and template rendering

    This might be a bit controversial, so I've left it til the end.
    The general idea here is that podcasts and not_found should agree
    on 404 error handling, and the template rendering helper I wrote
    earlier is generalisable to other controllers, so
    into controller.go they go.
    
    Comments and feedback welcomed.
    MattWindsor91 committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    7d7da03 View commit details
    Browse the repository at this point in the history
  6. podcasts: Eagerly construct model

    It seems strange to construct the model afresh every request,
    when we have everything needed to construct it available in the ctor.
    MattWindsor91 committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    2541ccf View commit details
    Browse the repository at this point in the history