Giter VIP home page Giter VIP logo

Comments (5)

kou avatar kou commented on August 13, 2024
  • How to disable validation is documented

Sorry. We don't have enough documentation for it in English.

  • Discuss the approach disabling validation of specific attributes vs global validation

I think that "disabling validation of specific attributes" isn't a good approach. If we have it, users can't trust parsed result. (Invalid value may be included.)

Adding support for preparer may be a good approach. For example: RSS::Parser.parse(content, preparers: {"itunes:episodeType" => lambda {|value| value == "full" ? "Full" : value})

  • Reconsider if casing should be considered a validation error.

    I am also unable to find a technical document stating that this should be a case sensitive value; I would happily take a link to a document that does as ammo to push back on the publisher.

Could you ask Apple to clarify this? If the specification clarifies it, we can follow it.

Related pages:

from rss.

ozydingo avatar ozydingo commented on August 13, 2024

Adding support for preparer may be a good approach. For example: RSS::Parser.parse(content, preparers: {"itunes:episodeType" => lambda {|value| value == "full" ? "Full" : value})

That's a nice idea, flexible and easy to point at specific known issues like this one!

Could you ask Apple to clarify this? If the specification clarifies it, we can follow it.

I will try :-)

from rss.

ozydingo avatar ozydingo commented on August 13, 2024

I am continuing to follow up with Apple, who, as you might have expected, so far have just provided basic information about "here's how to publish a podcast" and "we can't comment on third part software".

In the meantime, more prominent publishers including Google (e.g. https://feeds.libsyn.com/419861/rss ) have rss feeds that include, for example

<itunes:episodeType>full</itunes:episodeType>

This is breaking more of our integrations with major partners as a result of upgrading from 0.28 that was included by default in Ruby 2.7. The consequence of the current code, even though we don't care about this field in our integration, is that we are unable to parse the RSS feed, and an exception is raised instead.

For the time being I will be looking into a monkey patch, as this is a major strain our existing customer. But I do implore you to consider allowing more lenient behavior, such as ignoring fields, adding custom parsers or preprocessors, or modifying this particular validation to match what is seen in the real world. As you have stated, a custom pre-processor is a pretty good solution; however do note that this is still a breaking change for folks upgrading from 0.28 / Ruby 2.7.

from rss.

ozydingo avatar ozydingo commented on August 13, 2024

I just got this back from Apple after sending another ping:

In review of the casing of the types specified in the itunes:episodeType tag, I can confirm our public documentation (see the guide listed farther below) refers the the types as “Full”, “Trailer”, and "Bonus”, and our own internal resources referring to the types as “full”, “trailer”, and “bonus”:
“full (default) - Specify full when you are submitting the complete content of your show.
trailer - Specify trailer when you are submitting a short promotional piece of content that represents a preview of your current show.
bonus - Specify bonus when you are submitting extra content for your show (for example, behind the scenes information or interviews with the cast) or cross-promotional content for another show”

Additionally, as mentioned, I can confirm that with the volume of RSS feeds that I’ve personally had to validate, both casings have validated.

[...]

Apple recommends using Podba.se or Cast Feed Validator to validate RSS feeds.

Therefore I believe the correct move is to follow Apple's text here and allow lowercase values.

from rss.

kou avatar kou commented on August 13, 2024

Wow!

OK. Let's accept full/trailer/bonus too.

from rss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.