-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add info about image into rss item. #155
Conversation
Modify abstract reader to parse image info by default.
Thanks @logart for the PR. The easiest solution is as you suggested to map the media:thumbnail url attribute to author field. An alternative solution is to create your own RssReader class by extending I have started to implement a Media RSS module similar to the iTunes module that supports all tags and attributes of the Media RSS specification but I never finished that work. |
Thanks, @w3stling This sounds like a great plan. Do you think it's ok to add this custom reader to your repo like the iTunes one? I will gladly move implementation here to not pollute the Item class. It's totally ok for me to maintain my own fork, but if you think this is a good solution I would rather merge it to your repository to not create a lot of copies of the library. Let me know what do you think. Best regards, |
Add parser for media rss. Add media rss extension on item. Add support for parsing fields of media thumbnail.
I've updated the MR with media:thumbnail parsing support from media rss. Unfortunately I am unable to complete the whole spec. Hopefully when someone else would need it he can finish the job. |
Thanks @logart. Merged |
Thank you @w3stling |
Hi, @w3stling
I really appreciate your library since it saved me a lot of time and I really like the extension points with addItemExtension API.
However, for my project I needed to parse media:thumbnail attribute of the rss feed. Of course I could parse it into author or comments field as a hack like this .addItemExtension("media:thumbnail", "url", Item::setAuthor), but I would rather contribute to the library to add additional image field on the rss Item class.
If you don't mind, I've added the default behaviour to abstract parser so it will work out of the box. But if this is inapropriate, I can happily use .addItemExtension("media:thumbnail", "url", Item::setImage) in my code.
Let me know if you could accept my PR as is, or should I remove default behaviour from abstact parser and only add an image field on the item class.
I wish you have a best day,
Artem