Skip to content

Conversation

@liberlanco
Copy link
Contributor

I met this issue with following RSS: https://feeds.fireside.fm/smartlogic/rss

They uses lowercase values for episodeType like 'trailer' or 'full'. I tried 2 different RSS readers with the URL and all of them read this feed without problems (liferea and some from flatpack, forget the name).

ruby/rss raises exception:

RSS::NotAvailableValueError: value <trailer> of tag <episodeType> is not available. (RSS::NotAvailableValueError)

I also tried RSS validator, and it gave many errors but not about episodeType value: https://www.rssboard.org/rss-validator/check.cgi?url=https%3A%2F%2Fround-lake.dustinice.workers.dev%3A443%2Fhttps%2Ffeeds.fireside.fm%2Fsmartlogic%2Frss

Hence I understood that official specs defines Full, Trailer and Bonus as legal values for this XML tag, but looks like it's already common practice to use lowercase values (even validator doesn't think it's bad)

So here is the patch to support them + small test update with lowercase value

@kou
Copy link
Member

kou commented Dec 29, 2023

I can understand what you think but please disable validation for this case. (And please feedback this to fireside.fm if you want.)
If we provide a "loose" validation, users can't trust validated feeds. Users need some workarounds even with validated feeds. For example, users need to normalize case for this case.

In general, feed readers parse feed loosely as much as possible because there are many broken feeds in the world and feed readers needs to process them as much as possible.

def #{name}=(new_value)
if @do_validate and
!["Full", "Trailer", "Bonus", nil].include?(new_value)
!["full", "trailer", "bonus", nil].include?(new_value.downcase)
Copy link
Member

Choose a reason for hiding this comment

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

Could you accept only Full/full variants? (We don't want to accept FULL, fULL and so on.

Suggested change
!["full", "trailer", "bonus", nil].include?(new_value.downcase)
!["Full", "full", "Trailer", "trailer", "Bonus", "bonus", nil].include?(new_value)

@kou
Copy link
Member

kou commented May 25, 2024

Apple uses full/trailer/bonus too internally.
See also: #51 (comment)

@kou
Copy link
Member

kou commented Aug 2, 2024

Implemented by #53.

@kou kou closed this Aug 2, 2024
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.

2 participants