ruby / rss

RSS reading and writing
BSD 2-Clause "Simplified" License
185 stars 36 forks source link

itunes:image for Items::Item #8

Closed ianrandmckenzie closed 4 years ago

ianrandmckenzie commented 5 years ago

I have been digging through the source code and can't seem to find any code that supports an itunes:image tag for the Items::Item class.

I never run into many opportunities for contributing to source code that I use, but I'd be happy to make a pull request if it would be well received. That being said, I don't write code nearly as well as you folks do, so there would be some hand-holding involved if I contributed.

itunes:image tags are now a recommended tag for items in Podcast feeds: https://help.apple.com/itc/podcasts_connect/#/itcb54353390

Thanks for your time.

Edit: In case it is already in the code, I am getting an error attempting to use it:

undefined method `itunes_image' for #<RSS::Maker::RSS20::Items::Item:0x00007fefe954f138> Did you mean? itunes_email itunes_name

Here's my code:

item.itunes_image.href = feed_image # feed_image is defined elsewhere

I also tried:

item.itunes_image = feed_image

I tried using RSS versions 0.9 and 2.0

Final edit: I managed to get itunes:image working for items on a fork of this repository, but I couldn't figure out how to make a pull request (maybe I have to be added as a contributor?). If you'd like to see what I did, checkout https://github.com/ianrandmckenzie/rss — All I really did was copy the itunes:image channel code and pasted it in the appropriate sections for item. If you'd like me to make a pull request, I'll add tests before I do (that's the only part I haven't done so far).

kou commented 5 years ago

You can create a pull request without any additional permission. You should create a topic branch instead of working on master branch.

ianrandmckenzie commented 5 years ago

Awesome, thank you. I'll make a pull request next time I work on my podcast project!