WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@CJxD
Copy link
Contributor

@CJxD CJxD commented May 15, 2024

We noticed that some podcasts don't have descriptions but do have itunes summaries.

Here's a file that can be used in a test: http://netstorage.discovery.com/ahc/podcasts/2016/ahc-ato-podcastrss.xml

Copy link
Member

@thp thp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From above that block:

# If you modify the mapping, don't forget to also update the documentation
# section "Supported XML Elements and Attributes" in doc/index.rst

Apart from that, it's good. It might cause some feeds that have both description and itunes:summary with different content to have different results after parsing, though.

@auouymous
Copy link
Member

@thp Could we add an optional or secondary flag to set_podcast_attr() so it only sets the value if None? Then description could be the primary field and summary a secondary, no matter which order they are found in the feed.

@CJxD
Copy link
Contributor Author

CJxD commented Jun 25, 2024

Just got back to this! Sorry for the delay. Yes I can look into a suitable fallback behaviour :)

@CJxD
Copy link
Contributor Author

CJxD commented Jun 25, 2024

Here's a question, the episode description behaviour is similar to what I have suggested here so I wonder if this change-if-none behaviour should also be applied in this case.

I also noted how HTML is handled in description but not in the summary according to this. Is it accurate? Should the same happen for channel/description?

**rss/channel/item/description**
    Episode description.
    If it contains html, it's returned as description_html.
    Otherwise it's returned as description (whitespace is squashed).
    See Mozilla's article `Why RSS Content Module is Popular`

**rss/channel/item/itunes:summary**
    Episode description (whitespace is squashed).

@auouymous
Copy link
Member

Here's a question, the episode description behaviour is similar to what I have suggested here so I wonder if this change-if-none behaviour should also be applied in this case.

Yes. It would have the same issue, unless it already only changes if none.

I also noted how HTML is handled in description but not in the summary according to this. Is it accurate? Should the same happen for channel/description?

It could if the RSS spec supports HTML in channel descriptions. gPodder only supports HTML descriptions for episodes and would need to detect an HTML channel description and strip it.

@thp
Copy link
Member

thp commented Sep 26, 2025

Bump; is there anything left to do here or can this be merged? :)

@CJxD
Copy link
Contributor Author

CJxD commented Oct 4, 2025

I'll take another pass at this next week :)

@CJxD
Copy link
Contributor Author

CJxD commented Oct 10, 2025

I've updated this MR to include:

  1. Support for the overwrite=True flag in PodcastAttrs
  2. Behaviour to default to reading the description field in case both itunes:summary and description are present
  3. Tests to confirm the behaviour
  4. A version number bump for the package

Copy link
Member

@thp thp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super clean now, just need to remove the version bump (it's done separately as part of releasing, not in code changes in branches). Thanks!

@thp thp merged commit c117c56 into gpodder:master Oct 20, 2025
7 checks passed
@thp
Copy link
Member

thp commented Oct 20, 2025

Merged, thanks!

@CJxD
Copy link
Contributor Author

CJxD commented Nov 3, 2025

Hey @thp - will there be a new release soon? I'd like to update the library in my project :)

@thp
Copy link
Member

thp commented Nov 18, 2025

Hey @thp - will there be a new release soon? I'd like to update the library in my project :)

Done: 5ac16fa

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.

3 participants