10up / simple-podcasting

A simple podcasting solution for WordPress.
https://wordpress.org/plugins/simple-podcasting/
GNU General Public License v2.0
186 stars 30 forks source link

Individual Episode Cover Art #273

Closed zamanq closed 8 months ago

zamanq commented 9 months ago

Description of the Change

Added the option to select cover art for individual episodes. Right now user can use the default featured image as episode cover art and that'd also render the same metadata in the feed. With this new option they can also add an image from the Podcast Settings panel. There's a new button "Add Cover Art" which upon clicking will open the media modal. After selection user will be able to replace or remove the media as well.

So if there's no featured image selected then the new custom cover art will get used and vice-versa.

Closes #255

Verification Process

Upon selecting a cover art, it'll be available in the feed channel url under item along with all the other item feed properties. The tag will be <itunes:image href='url-of-the-image' />

Checklist:

Changelog Entry

Added - Ability to add Unique Cover Art for Episodes

Credits

Props @zamanq @jeffpaul

iamdharmesh commented 9 months ago

Hi @zamanq,

Thank you for the PR.

Right now user can use the default featured image as episode cover art and that'd also render the same metadata in the feed.

I started reviewing the PR and am curious about the new "Add Cover Art" button. Currently, the default featured image is already being used as cover art for the episode in the feed. Have we added this button within the podcast block for better visibility and to avoid confusion, or is there another specific reason behind it?

Thanks

zamanq commented 9 months ago

Hi @iamdharmesh, Yes the goal was to provide an easy way for the user to set cover art individually for an episode while being on the sidebar settings for the block. The meta key podcast_episode_cover for this custom setting is different than the default featured image. The featured image will get priority when rendering the image in the feed and if not set then it'll look for the new custom cover art.

As a whole this seems redundant having two different options for achieving the same thing. Actually, this is due to my oversight of not inspecting the whole thing first and was really focused on creating that feature assuming that it is not introduced yet as the issue was reported in #255 cc: @jeffpaul

Thanks!

jeffpaul commented 8 months ago

@iamdharmesh are you saying that if the post that the podcast is attached to has a featured image that that image gets sent as the episode image versus otherwise inheriting the default show image?

iamdharmesh commented 8 months ago

@iamdharmesh are you saying that if the post that the podcast is attached to has a featured image that that image gets sent as the episode image versus otherwise inheriting the default show image?

@jeffpaul No. Currently, the plugin has already sent a featured image as an episode image (by setting <itunes:image href='url-of-the-image' />). However, this PR adds a new image select field on the sidebar settings for the block to make it easier for the user.

So, now we have two fields for the episode cover image:

  1. Featured image
  2. Episode cover image field in the block sidebar.

I would suggest checking the possibility of showing the featured image in the block sidebar, similar to what we have done for the podcast taxonomy terms (PR https://github.com/10up/simple-podcasting/pull/183). If that is possible, we can achieve this without adding additional metadata in the database. If this is not possible at the moment, then we are good with PR.

jeffpaul commented 8 months ago

I would suggest checking the possibility of showing the featured image in the block sidebar, similar to what we have done for the podcast taxonomy terms (PR https://github.com/10up/simple-podcasting/pull/183). If that is possible, we can achieve this without adding additional metadata in the database. If this is not possible at the moment, then we are good with PR.

I agree, that sounds like the most ideal. @zamanq can you research and try that if its feasible?

zamanq commented 8 months ago

@jeffpaul @iamdharmesh Refactored the code to leverage the post featured image as the episode cover art. If there's none, the user can select one either using the default post featured image area or using the block sidebar and it'll reflect in the featured image as well.