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 Compatibility for Self-Hosted Audio Files in Podcast Block #330

Open
1 task done
jeffpaul opened this issue Dec 4, 2024 · 0 comments
Open
1 task done
Labels
help wanted Extra attention is needed needs:engineering This requires engineering to resolve.

Comments

@jeffpaul
Copy link
Member

jeffpaul commented Dec 4, 2024

Is your enhancement related to a problem? Please describe.

As noted by @bacoords:

The podcast block currently fails to render properly on the front-end when audio files are self-hosted and inserted via the "Insert from URL" option. This appears to be due to a null attachment_id being returned for audio files not in the Media Library.

Steps to Reproduce:

  1. Use the Podcast block to add an audio file.
  2. Insert an audio file URL manually via "Insert from URL" (bypassing the Media Library).
  3. Observe that the block does not render on the front-end.

Expected Behavior:

The Podcast block should gracefully handle audio files inserted via "Insert from URL," even when they are not part of the Media Library.

Actual Behavior:

The block fails to render on the front-end, likely due to the conditional check here:
https://github.com/10up/simple-podcasting/blob/develop/includes/blocks/podcast/markup.php#L29C1-L31C2

Additional Context:

  • This issue was noticed when transitioning from Offload Media Lite (S3) to a self-hosted setup for MP3s.
  • It seems the block is heavily reliant on Media Library metadata, which isn’t available for files inserted via URL.

Suggested Improvement:

Explore ways to make the block more agnostic to file sources. For instance:

  • Allow rendering based solely on the provided URL without requiring an attachment_id.
  • Improve conditional handling for cases where the attachment_id is null.

Additional Questions:

  • Is there a particular reason the block relies on attachment_id?
  • Are there specific metadata fields that could be optional or dynamically fetched for self-hosted files?

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jeffpaul jeffpaul added the type:enhancement New feature or request. label Dec 4, 2024
@jeffpaul jeffpaul added this to the Future Release milestone Dec 4, 2024
@jeffpaul jeffpaul removed the type:enhancement New feature or request. label Dec 4, 2024
@jeffpaul jeffpaul moved this from Incoming to Backlog in Open Source Practice Dec 4, 2024
@jeffpaul jeffpaul added help wanted Extra attention is needed needs:engineering This requires engineering to resolve. labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed needs:engineering This requires engineering to resolve.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant