ribbons / RadioDownloader

An easy to use application for managing podcast subscriptions and downloads.
https://nerdoftheherd.com/tools/radiodld/
GNU General Public License v3.0
15 stars 11 forks source link

Resolved error when fetching info for a podcast episode with the same ID as a previous filtered episode #241

Closed ribbons closed 4 years ago

ribbons commented 4 years ago

This issue was reported by a user trying to fetch episodes from https://www.rte.ie/radio1/podcast/podcast_documentaryonone.xml, which caused the following exception:

System.IO.InvalidDataException
   at RadioDld.Model.Episode.UpdateInfo(Int32 progid, String episodeExtId) in C:\projects\radiodownloader\Classes\Model\Episode.cs:line 306

The specific part of the XML which causes this issue is as follows:

<item>
  <title />
  <itunes:author>RTÉ Documentary on One</itunes:author>
  <link>https://podcast.rasset.ie/podcasts/2013/pc/pod-v-30031338m30stwomilesanhourdoconone-pid0-2310120_audio.mp3</link>
  <description />
  <itunes:subtitle />
  <itunes:summary />
  <itunes:duration>0:38:30</itunes:duration>
  <guid isPermaLink="false">https://www.rte.ie/podcasts/2013/pc/pod-v-30031338m30stwomilesanhourdoconone-pid0-2310120_audio.mp3</guid>
  <enclosure type="audio/mpeg" url="https://podcast.rasset.ie/podcasts/2013/pc/pod-v-30031338m30stwomilesanhourdoconone-pid0-2310120_audio.mp3" />
  <pubDate>Fri, 29 Mar 2013 12:00:00 +0000</pubDate>
  <itunes:explicit>no</itunes:explicit>
  <avms:id>51942619</avms:id>
  <clipper:id>3510226</clipper:id>
</item>
<item>
  <title>Two Miles An Hour</title>
  <itunes:author>RTÉ Documentary on One</itunes:author>
  <link>https://podcast.rasset.ie/podcasts/2013/pc/pod-v-30031338m30stwomilesanhourdoconone-pid0-2310120_audio.mp3</link>
  <description>Writer Eugene O’Brien takes a trip on a barge through the heart of the midlands, experiencing his home county in a different – and much slower – way than usual.   </description>
  <itunes:subtitle>Writer Eugene O’Brien takes a trip on a barge through the heart of the midlands, experiencing his home county in a different – and much slower – way than usual.   </itunes:subtitle>
  <itunes:summary>Writer Eugene O’Brien takes a trip on a barge through the heart of the midlands, experiencing his home county in a different – and much slower – way than usual.   </itunes:summary>
  <itunes:duration>0:38:30</itunes:duration>
  <guid isPermaLink="false">https://www.rte.ie/podcasts/2013/pc/pod-v-30031338m30stwomilesanhourdoconone-pid0-2310120_audio.mp3</guid>
  <enclosure type="audio/mpeg" url="https://podcast.rasset.ie/podcasts/2013/pc/pod-v-30031338m30stwomilesanhourdoconone-pid0-2310120_audio.mp3" />
  <pubDate>Fri, 29 Mar 2013 12:00:00 +0000</pubDate>
  <itunes:explicit>no</itunes:explicit>
  <avms:id>51942617</avms:id>
  <clipper:id>3510219</clipper:id>
</item>

The podcast provider filters out the first of these two item nodes as it has a <title> node without any text, but the second passes filtering. However, as the second has the same value for <guid>, the podcast provider tries to load the episode information from the first node it encounters with a matching guid.