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

Add rss/channel/itunes:summary handling #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

CJxD
Copy link

@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
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
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.

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