I've updated the regex used in ITunesDuration#parse to accept any string of digits and reflect the spec point in the code by calculating from the seconds the corresponding components if no colons are present.
I've followed the "be conservative in what you send, be liberal in what you accept" principle and if a maker creates a feed by speciying just seconds:
item.itunes_duration = "315"
It will still output formatted values (eg. 05:15).
As mentioned in ruby/rss#4 the iTunes Podcast Spec supports the use of nonformated seconds as the value for
itunes:duration
elements:source: RSS tags for Podcasts Connect
I've updated the regex used in
ITunesDuration#parse
to accept any string of digits and reflect the spec point in the code by calculating from the seconds the corresponding components if no colons are present.I've followed the "be conservative in what you send, be liberal in what you accept" principle and if a maker creates a feed by speciying just seconds:
It will still output formatted values (eg.
05:15
).