[totem-pl-parser] podcast: Fetch feed image uri from new image tag format
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] podcast: Fetch feed image uri from new image tag format
- Date: Tue, 23 Feb 2021 17:07:28 +0000 (UTC)
commit 733a4d256b238170847447adce91d400ea1e8951
Author: crvi <crvisqr gmail com>
Date: Wed Jul 29 01:52:11 2020 +0530
podcast: Fetch feed image uri from new image tag format
<image> tag doesn't have any node data, so the existing code was
providing image uri to podcast feed requests only from <itunes:image>
tag, if it occurs after <image> tag, returning NULL otherwise. We now
fetch image uri from <url> child tag of <image> tag.
plparse/tests/parser.c | 17 +++++++++++
plparse/tests/podcast-image-url.1.rss | 57 +++++++++++++++++++++++++++++++++++
plparse/tests/podcast-image-url.2.rss | 1 +
plparse/totem-pl-parser-podcast.c | 6 +++-
4 files changed, 80 insertions(+), 1 deletion(-)
---
diff --git a/plparse/tests/parser.c b/plparse/tests/parser.c
index 71e2227..5ab30ec 100644
--- a/plparse/tests/parser.c
+++ b/plparse/tests/parser.c
@@ -819,6 +819,22 @@ test_parsing_item_description (void)
g_free (uri);
}
+static void
+test_parsing_feed_image (void)
+{
+ char *uri;
+
+ /* <itunes:image> followed by <image> */
+ uri = get_relative_uri (TEST_SRCDIR "podcast-image-url.1.rss");
+ g_assert_cmpstr (parser_test_get_playlist_field (uri, TOTEM_PL_PARSER_FIELD_IMAGE_URI), ==,
"http://i1.sndcdn.com/avatars-000325311522-dw14t0-original.jpg");
+ g_free (uri);
+
+ /* <image> followed by <itunes:image> */
+ uri = get_relative_uri (TEST_SRCDIR "podcast-image-url.2.rss");
+ g_assert_cmpstr (parser_test_get_playlist_field (uri, TOTEM_PL_PARSER_FIELD_IMAGE_URI), ==,
"http://ichef.bbci.co.uk/images/ic/3000x3000/p076j2sr.jpg");
+ g_free (uri);
+}
+
static void
test_parsing_hadess (void)
{
@@ -1502,6 +1518,7 @@ main (int argc, char *argv[])
g_test_add_func ("/parser/parsing/podcast_medium", test_parsing_medium);
g_test_add_func ("/parser/parsing/podcast_feed_description", test_parsing_feed_description);
g_test_add_func ("/parser/parsing/podcast_item_description", test_parsing_item_description);
+ g_test_add_func ("/parser/parsing/podcast_feed_image", test_parsing_feed_image);
g_test_add_func ("/parser/parsing/live_streaming", test_parsing_live_streaming);
g_test_add_func ("/parser/parsing/xml_mixed_cdata", test_parsing_xml_mixed_cdata);
g_test_add_func ("/parser/parsing/m3u_streaming", test_parsing_m3u_streaming);
diff --git a/plparse/tests/podcast-image-url.1.rss b/plparse/tests/podcast-image-url.1.rss
new file mode 100644
index 0000000..a28eb88
--- /dev/null
+++ b/plparse/tests/podcast-image-url.1.rss
@@ -0,0 +1,57 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:atom="http://www.w3.org/2005/Atom">
+ <channel>
+ <atom:link href="http://feeds.soundcloud.com/users/soundcloud:users:320899690/sounds.rss" rel="self"
type="application/rss+xml"/>
+ <atom:link
href="http://feeds.soundcloud.com/users/soundcloud:users:320899690/sounds.rss?before=336780890" rel="next"
type="application/rss+xml"/>
+ <title>Exit Poll New England</title>
+ <link>http://soundcloud.com/exitpollnewengland</link>
+ <pubDate>Wed, 23 Aug 2017 01:55:17 +0000</pubDate>
+ <lastBuildDate>Wed, 23 Aug 2017 01:55:17 +0000</lastBuildDate>
+ <ttl>60</ttl>
+ <language>en</language>
+ <copyright>All rights reserved</copyright>
+ <webMaster>feeds soundcloud com (SoundCloud Feeds)</webMaster>
+ <description>Podcast by Exit Poll New England</description>
+ <itunes:subtitle>Podcast by Exit Poll New England</itunes:subtitle>
+ <itunes:owner>
+ <itunes:name>Exit Poll New England</itunes:name>
+ <itunes:email>exitpollnewengland gmail com</itunes:email>
+ </itunes:owner>
+ <itunes:author>Exit Poll New England</itunes:author>
+ <itunes:explicit>no</itunes:explicit>
+ <itunes:image href="http://i1.sndcdn.com/avatars-000325311522-dw14t0-original.jpg"/>
+ <image>
+ <url>http://i1.sndcdn.com/avatars-000325311522-dw14t0-original.jpg</url>
+ <title>Exit Poll New England</title>
+ <link>http://soundcloud.com/exitpollnewengland</link>
+ </image>
+ <itunes:category text="News"/>
+ <item>
+ <guid isPermaLink="false">tag:soundcloud,2010:tracks/339085841</guid>
+ <title>Exit Poll Episode 4</title>
+ <pubDate>Wed, 23 Aug 2017 01:55:17 +0000</pubDate>
+ <link>https://soundcloud.com/exitpollnewengland/exit-poll-episode-4</link>
+ <itunes:duration>01:03:36</itunes:duration>
+ <itunes:author>Exit Poll New England</itunes:author>
+ <itunes:explicit>no</itunes:explicit>
+ <itunes:summary>Exit Poll Episode 4 by Exit Poll New England</itunes:summary>
+ <itunes:subtitle>Exit Poll Episode 4 by Exit Poll New England</itunes:subtitle>
+ <description>Exit Poll Episode 4 by Exit Poll New England</description>
+ <enclosure type="audio/mpeg"
url="http://feeds.soundcloud.com/stream/339085841-exitpollnewengland-exit-poll-episode-4.mp3"
length="61060074"/>
+ <itunes:image href="http://i1.sndcdn.com/avatars-000325311522-dw14t0-original.jpg"/>
+ </item><item>
+ <guid isPermaLink="false">tag:soundcloud,2010:tracks/336780890</guid>
+ <title>Episode 3 - Jason Palitsch</title>
+ <pubDate>Mon, 07 Aug 2017 02:08:50 +0000</pubDate>
+ <link>https://soundcloud.com/exitpollnewengland/episode-3</link>
+ <itunes:duration>01:05:29</itunes:duration>
+ <itunes:author>Exit Poll New England</itunes:author>
+ <itunes:explicit>no</itunes:explicit>
+ <itunes:summary>In episode 3 Clancy and Joe talk to Jason Palitsch about his experience in
politics!</itunes:summary>
+ <itunes:subtitle>In episode 3 Clancy and Joe talk to Jason Palitsc…</itunes:subtitle>
+ <description>In episode 3 Clancy and Joe talk to Jason Palitsch about his experience in
politics!</description>
+ <enclosure type="audio/mpeg"
url="http://feeds.soundcloud.com/stream/336780890-exitpollnewengland-episode-3.mp3" length="62863986"/>
+ <itunes:image href="http://i1.sndcdn.com/artworks-000237209681-dqpcbk-t3000x3000.jpg"/>
+ </item>
+ </channel>
+ </rss>
\ No newline at end of file
diff --git a/plparse/tests/podcast-image-url.2.rss b/plparse/tests/podcast-image-url.2.rss
new file mode 100644
index 0000000..44a9ba3
--- /dev/null
+++ b/plparse/tests/podcast-image-url.2.rss
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:ppg="http://bbc.co.uk/2009/01/ppgRss"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"><!--By accessing this feed you are warranting that
you are using these feeds in accordance with the BBC's Terms of Use
http://www.bbc.co.uk/usingthebbc/terms-of-use/. If you are using these feeds for business or commercial
purposes you warrant that you have obtained the necessary licence from the BBC and that BBC services and
content are made available strictly in line with the BBC's Distribution Policy--><channel><title>6 Minute
English</title><link>http://www.bbc.co.uk/programmes/p02pc9tn</link><description>Learn and practise useful
English language for everyday situations with the BBC. A weekly instruction manual for saying or doing
something in English is published every Thursday.</description><itunes:summary>Learn and practise useful Engl
ish language for everyday situations with the BBC. A weekly instruction manual for saying or doing something
in English is published every Thursday.</itunes:summary><itunes:author>BBC
Radio</itunes:author><itunes:owner><itunes:name>BBC</itunes:name><itunes:email>RadioMusic Support bbc co
uk</itunes:email></itunes:owner><itunes:new-feed-url>https://podcasts.files.bbci.co.uk/p02pc9tn.rss</itunes:new-feed-url><language>en</language><ppg:seriesDetails
frequency="weekly" daysLive="30"/><ppg:systemRef systemId="pid.brand" key="p02pc9tn"/><ppg:systemRef
systemId="pid.genre" key="C00044"/><ppg:network id="bbc_radio_webonly" name="BBC
Radio"/><image><url>http://ichef.bbci.co.uk/images/ic/3000x3000/p076j2sr.jpg</url><title>6 Minute
English</title><link>http://www.bbc.co.uk/programmes/p02pc9tn</link></image><itunes:image
href="http://ichef.bbci.co.uk/images/ic/3000x3000/p076j2sr.jpg"/><copyright>(C) BBC
2020</copyright><pubDate>Thu, 23 Jul 2020 15:02:00 +0000</pubDate><itunes:category text="Ed
ucation"/><itunes:explicit>no</itunes:explicit><media:rating
scheme="urn:simple">nonadult</media:rating><atom:link
href="http://www.bbc.co.uk/programmes/p02pc9tn/episodes/downloads.rss" rel="self"
type="application/rss+xml"/><item><title>Food made in space</title><description>Find out how growing plants
in space might help develop better crops.</description><itunes:subtitle>Find out how growing plants in space
might help develop better crops.</itunes:subtitle><itunes:summary>Find out how growing plants in space might
help develop better crops.</itunes:summary><pubDate>Thu, 23 Jul 2020 15:02:00
+0000</pubDate><itunes:duration>377</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08lmrp1.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08lmrp1.mp3"
length="30160
00" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08lmrp1.mp3"
length="3016000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08lms7n</guid><link>http://www.bbc.co.uk/programmes/p08lms7n</link><itunes:explicit>clean</itunes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08lmrp1.mp3"
fileSize="3016000" type="audio/mpeg" medium="audio" expression="full" duration="377"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08lms7n</ppg:canonical></item><item><title>Sport against
poverty</title><description>Neil and Sam discuss how sport is giving hope to young people leading the
toughest lives.</description><itunes:subtitle>Neil and Sam discuss how sport is giving hope to young people
leading the toughest lives.</itunes:subtitle><itunes:summary>Neil a
nd Sam discuss how sport is giving hope to young people leading the toughest
lives.</itunes:summary><pubDate>Thu, 16 Jul 2020 12:00:00
+0000</pubDate><itunes:duration>377</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08kszpy.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08kszpy.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08kszpy.mp3"
length="3016000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08kt02q</guid><link>http://www.bbc.co.uk/programmes/p08kt02q</link><itunes:explicit>clean</itunes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-
download-low/proto/http/vpid/p08kszpy.mp3" fileSize="3016000" type="audio/mpeg" medium="audio"
expression="full" duration="377"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08kt02q</ppg:canonical></item><item><title>Covid-19: The
office after lockdown</title><description>Companies are rushing to install technology to make offices safer.
Neil and Sam discuss.</description><itunes:subtitle>Companies are rushing to install technology to make
offices safer. Neil and Sam discuss.</itunes:subtitle><itunes:summary>Companies are rushing to install
technology to make offices safer. Neil and Sam discuss.</itunes:summary><pubDate>Thu, 09 Jul 2020 10:00:00
+0000</pubDate><itunes:duration>377</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08k5cnh.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/me
diaset/audio-nondrm-download-low/proto/http/vpid/p08k5cnh.mp3" length="3016000"
type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08k5cnh.mp3"
length="3016000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08k5d35</guid><link>http://www.bbc.co.uk/programmes/p08k5d35</link><itunes:explicit>clean</itunes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08k5cnh.mp3"
fileSize="3016000" type="audio/mpeg" medium="audio" expression="full" duration="377"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08k5d35</ppg:canonical></item><item><title>Should we wear a
face mask?</title><description>Can wearing masks in public help prevent the spread of coronavirus? Rob and
Sam discuss.</description><itunes:subtitle>Can wearing masks in public help prevent the spr
ead of coronavirus? Rob and Sam discuss.</itunes:subtitle><itunes:summary>Can wearing masks in public help
prevent the spread of coronavirus? Rob and Sam discuss.</itunes:summary><pubDate>Thu, 02 Jul 2020 13:00:00
+0000</pubDate><itunes:duration>380</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08jc7wk.mp3"
length="3040000" type="audio/mpeg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08jc7wk.mp3"
length="3040000" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08jc7wk.mp3"
length="3040000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08jc866</guid><link>http://www.bbc.co.uk/programmes/p08jc866</link><itunes:explicit>clean</itunes:explicit><media:content
url="http
://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08jc7wk.mp3"
fileSize="3040000" type="audio/mpeg" medium="audio" expression="full" duration="380"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08jc866</ppg:canonical></item><item><title>Millennials and
business</title><description>Rob and Sam discuss the new generation's desire to make the world a better
place.</description><itunes:subtitle>Rob and Sam discuss the new generation's desire to make the world a
better place.</itunes:subtitle><itunes:summary>Rob and Sam discuss the new generation's desire to make the
world a better place.</itunes:summary><pubDate>Thu, 25 Jun 2020 13:00:00
+0000</pubDate><itunes:duration>382</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08hvh88.mp3"
length="3056000" type="audio/mpeg"/><ppg:enclosureLegacy url="http://open.live
.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08hvh88.mp3"
length="3056000" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08hvh88.mp3"
length="3056000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08hvj31</guid><link>http://www.bbc.co.uk/programmes/p08hvj31</link><itunes:explicit>clean</itunes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08hvh88.mp3"
fileSize="3056000" type="audio/mpeg" medium="audio" expression="full" duration="382"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08hvj31</ppg:canonical></item><item><title>Is being thrifty
a virtue?</title><description>Neil and Sam talk about being a saver in a consumer culture and teach you
vocabulary.</description><itunes:subtitle>Neil
and Sam talk about being a saver in a consumer culture and teach you
vocabulary.</itunes:subtitle><itunes:summary>Neil and Sam talk about being a saver in a consumer culture and
teach you vocabulary.</itunes:summary><pubDate>Thu, 18 Jun 2020 13:00:00
+0000</pubDate><itunes:duration>377</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08h6bzk.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08h6bzk.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08h6bzk.mp3"
length="3016000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08h6cv0</guid><link>http://www.bbc.co.uk/programmes/p08h6cv0</link><itunes:explicit>clean</itu
nes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08h6bzk.mp3"
fileSize="3016000" type="audio/mpeg" medium="audio" expression="full" duration="377"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08h6cv0</ppg:canonical></item><item><title>The food delivery
revolution</title><description>Takeaway apps are changing food culture. We talk about it and teach you
vocabulary.</description><itunes:subtitle>Takeaway apps are changing food culture. We talk about it and teach
you vocabulary.</itunes:subtitle><itunes:summary>Takeaway apps are changing food culture. We talk about it
and teach you vocabulary.</itunes:summary><pubDate>Thu, 11 Jun 2020 12:01:00
+0000</pubDate><itunes:duration>377</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08gkbcv.mp3"
length="3016000" type="audio/mp
eg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08gkbcv.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08gkbcv.mp3"
length="3016000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08gkk79</guid><link>http://www.bbc.co.uk/programmes/p08gkk79</link><itunes:explicit>clean</itunes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08gkbcv.mp3"
fileSize="3016000" type="audio/mpeg" medium="audio" expression="full" duration="377"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08gkk79</ppg:canonical></item><item><title>What difference
has #MeToo made?</title><description>Sam and Georgina talk about the movement and teach you related vocab
ulary.</description><itunes:subtitle>Sam and Georgina talk about the movement and teach you related
vocabulary.</itunes:subtitle><itunes:summary>Sam and Georgina talk about the movement and teach you related
vocabulary.</itunes:summary><pubDate>Thu, 04 Jun 2020 09:05:00
+0000</pubDate><itunes:duration>377</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08g0zmd.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08g0zmd.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08g0zmd.mp3"
length="3016000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08g0zzp</guid><link>http://www.bbc.co.uk/programmes/p08g0zzp</link><itunes
:explicit>clean</itunes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08g0zmd.mp3"
fileSize="3016000" type="audio/mpeg" medium="audio" expression="full" duration="377"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08g0zzp</ppg:canonical></item><item><title>Is the recycling
system broken?</title><description>We talk about the over-reliance on recycling rather than reducing the use
of plastics</description><itunes:subtitle>We talk about the over-reliance on recycling rather than reducing
the use of plastics</itunes:subtitle><itunes:summary>We talk about the over-reliance on recycling rather than
reducing the use of plastics</itunes:summary><pubDate>Thu, 28 May 2020 12:40:00
+0000</pubDate><itunes:duration>377</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08ff84c.mp3"
le
ngth="3016000" type="audio/mpeg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08ff84c.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08ff84c.mp3"
length="3016000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08ffdrt</guid><link>http://www.bbc.co.uk/programmes/p08ffdrt</link><itunes:explicit>clean</itunes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08ff84c.mp3"
fileSize="3016000" type="audio/mpeg" medium="audio" expression="full" duration="377"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08ffdrt</ppg:canonical></item><item><title>The soothing
power of books</title><description>How can books help us relax and feel more al
ive during troubled times?</description><itunes:subtitle>How can books help us relax and feel more alive
during troubled times?</itunes:subtitle><itunes:summary>How can books help us relax and feel more alive
during troubled times?</itunes:summary><pubDate>Thu, 21 May 2020 15:41:00
+0000</pubDate><itunes:duration>377</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08dtn75.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08dtn75.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08dtn75.mp3"
length="3016000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08dtnyl</guid><link>http://www.bbc.co.uk/programmes/p08dtnyl</
link><itunes:explicit>clean</itunes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08dtn75.mp3"
fileSize="3016000" type="audio/mpeg" medium="audio" expression="full" duration="377"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08dtnyl</ppg:canonical></item><item><title>Shocking facts
about electricity</title><description>Neil and Georgina talk about how electrical systems differ from country
to country.</description><itunes:subtitle>Neil and Georgina talk about how electrical systems differ from
country to country.</itunes:subtitle><itunes:summary>Neil and Georgina talk about how electrical systems
differ from country to country.</itunes:summary><pubDate>Thu, 14 May 2020 10:15:00
+0000</pubDate><itunes:duration>377</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08d4twk.
mp3" length="3016000" type="audio/mpeg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08d4twk.mp3"
length="3016000" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p08d4twk.mp3"
length="3016000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p08d4v4h</guid><link>http://www.bbc.co.uk/programmes/p08d4v4h</link><itunes:explicit>clean</itunes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p08d4twk.mp3"
fileSize="3016000" type="audio/mpeg" medium="audio" expression="full" duration="377"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p08d4v4h</ppg:canonical></item><item><title>Internet - good
or bad?</title><description>Rob and Neil discuss some of the advantag
es and drawbacks of going online</description><itunes:subtitle>Rob and Neil discuss some of the advantages
and drawbacks of going online</itunes:subtitle><itunes:summary>Rob and Neil discuss some of the advantages
and drawbacks of going online</itunes:summary><pubDate>Thu, 26 Apr 2018 09:51:00
+0000</pubDate><itunes:duration>379</itunes:duration><enclosure
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p065dkwq.mp3"
length="3032000" type="audio/mpeg"/><ppg:enclosureLegacy
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p065dkwq.mp3"
length="3032000" type="audio/mpeg"/><ppg:enclosureSecure
url="https://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/https/vpid/p065dkwq.mp3"
length="3032000" type="audio/mpeg"/><guid
isPermaLink="false">urn:bbc:podcast:p065dlhj</guid><link>http://www.bbc.co.uk/programme
s/p065dlhj</link><itunes:explicit>clean</itunes:explicit><media:content
url="http://open.live.bbc.co.uk/mediaselector/6/redir/version/2.0/mediaset/audio-nondrm-download-low/proto/http/vpid/p065dkwq.mp3"
fileSize="3032000" type="audio/mpeg" medium="audio" expression="full" duration="379"/><itunes:author>BBC
Radio</itunes:author><ppg:canonical>/programmes/p065dlhj</ppg:canonical></item></channel></rss>
\ No newline at end of file
diff --git a/plparse/totem-pl-parser-podcast.c b/plparse/totem-pl-parser-podcast.c
index 2599129..cb4531b 100644
--- a/plparse/totem-pl-parser-podcast.c
+++ b/plparse/totem-pl-parser-podcast.c
@@ -277,7 +277,11 @@ parse_rss_items (TotemPlParser *parser, const char *uri, xml_node_t *parent)
} else if (g_ascii_strcasecmp (node->name, "webMaster") == 0) {
contact = node->data;
} else if (g_ascii_strcasecmp (node->name, "image") == 0) {
- img = node->data;
+ const char *tmp;
+
+ tmp = xml_parser_get_node_value (node, "url");
+ if (tmp != NULL)
+ img = tmp;
} else if (g_ascii_strcasecmp (node->name, "itunes:image") == 0) {
const char *href;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]