-
Notifications
You must be signed in to change notification settings - Fork 42
Updates iTunes podcast feed and entry support to latest spec #75
Updates iTunes podcast feed and entry support to latest spec #75
Conversation
@OpenHaus — could you review and confirm that the behavior I've added is correct and what you would expect? Thanks in advance! |
Thank you @weierophinney for your effort! It´s great you have taking the time to work on the ticket. Without testing it, yet, this won´t be the whole solution as it only deals with the Reader part. The Writer should support the new tags as well to close the ticket. |
Ah - right! Thanks for reviewing, as I'd missed that part! I'll get that done this morning. |
aac235e
to
c0417d4
Compare
@OpenHaus Changes to the Writer subcomponent have been made and pushed; please review! |
Makes the following changes to the `Zend\Feed\Reader\Extension\Podcast` namespace (which maps to the `itunes` RSS extension): - Deprecates `Feed::getKeywords()`, as the spec no longer supports it. - Adds `Feed::isComplete()` (mapping to `itunes:complete`), for determining if a podcast is complete (no more episodes will occur). - Adds `Feed::getPodcastType()` (mapping to `itunes:type`), for determining the podcast type (one of "serial" or "episodic", the latter being the default) - Adds `Entry::getEpisode()` (mapping to `itunes:episode`), for determining the current episode number. - Adds `Entry::getEpisodeType()` (mapping to `itunes:episodeType`), for determining the current episode type (one of "full", "trailer", or "bonus").
So it needs to be deprecated in both.
Adds the following methods to `Zend\Feed\Writer\Extension\ITunes\Entry`: - `setItunesEpisode(int $number) : self` - `setItunesEpisodeType(string $type) : self` Each raises an exception on invalid data, but otherwise sets the data in the container. `Zend\Feed\Writer\Extension\ITunes\Renderer\Entry` was updated to now render these new types.
…sion Adds the following methods to `Zend\Feed\Writer\Extension\ITunes\Feed`: - `setItunesType(string $type) : self` - `setItunesComplete(boolean $status) : self` It also updates `Zend\Feed\Writer\Extension\ITunes\Renderer\Feed` to emit the associated tags if data is found for them.
c0417d4
to
0654328
Compare
…sion Adds the method `Zend\Feed\Reader\Extension\Podcast\Entry::isClosedCaptioned()`. The method returns `true` if and only if the `itunes:isClosedCaptioned` tag is both present and has a value of `Yes`.
Adds the method `Zend\Feed\Reader\Extension\Podcast\Entry::getSeason()`. The method returns either `null`, or an integer indicating the season to which the episode belongs.
Adds the method `Zend\Feed\Writer\Extension\ITunes\Entry::setItunesIsClosedCaptioned(bool $status) : self`. The method raises an exception for non-boolean `$status` values. If the value is boolean true, it stores it; otherwise it ignores it. `Zend\Feed\Writer\Extension\ITunes\Renderer\Entry` now renders the `itunes:isClosedCaptioned` tag if the entry indicates it is, using the value `Yes` as the contents.
Adds the method `Zend\Feed\Writer\Extension\ITunes\Entry::setItunesSeason(int $number) : self`. The method raises an exception for non-numeric, non-integer values, but otherwise stores the value as the season number. Updates `Zend\Feed\Writer\Extension\ITunes\Renderer\Entry` to render the `itunes:season` tag if a value is present.
I've added awareness of |
Makes the following changes to the
Zend\Feed\Reader\Extension\Podcast
andZend\Feed\Writer\Extension\ITunes
namespaces (which map to theitunes
RSS extension):Feed::(get|set|add)Keywords()
and `Entry::(get|set|add)Keywords(), as the spec no longer supports it.Feed::isComplete()
/Feed::setItunesComplete()
(mapping toitunes:complete
), for retrieving/setting if a podcast is complete (no more episodes will occur).Feed::getPodcastType()
/Feed:setItunesType()
(mapping toitunes:type
), for retrieving/setting the podcast type (one of "serial" or "episodic", the latter being the default).Entry::getEpisode()
/Entry::setItunesEpisode()
(mapping toitunes:episode
), for retrieving/setting the current episode number.Entry::getEpisodeType()
/Entry::setItunesEpisodeType()
(mapping toitunes:episodeType
), for retrieving/setting the current episode type (one of "full", "trailer", or "bonus").Entry::isClosedCaptioned()
/Entry::setItunesIsClosedCaptioned()
(mapping toitunes:isClosedCaptioned
), for retrieving/setting closed captioning status.Entry::getSeason()
/Entry::setItunesSeason()
(mapping toitunes:season
), for retrieving/setting the season to which an episode belongs.Fixes #66