Skip to content

Commit

Permalink
Fix podcast support to work with <channel> contained podcasts
Browse files Browse the repository at this point in the history
  • Loading branch information
jwheare committed Dec 9, 2009
1 parent ab042e9 commit 3d0471a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/importers.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,15 @@ IMPORTERS = {
return playlist;
},
createPlaylistFromPodcast: function (source, podcast, callback, exception) {
if (podcast.channel) {
podcast = podcast.channel;
}
if (!podcast.item) {
throw exception('No tracks in Podcast response', podcast);
}
var items = podcast.item;
// XML to JSON converters often return single item lists as single items
var trackList = $.makeArray(podcast.item);
var trackList = $.makeArray(items);
if (!trackList.length) {
throw exception('No tracks in Podcast', jspf.trackList);
}
Expand Down

0 comments on commit 3d0471a

Please sign in to comment.