Choose correct title and summary for feed (might be related to #3).
This commit is contained in:
parent
5afe73a4b2
commit
ffd3ba33db
1 changed files with 5 additions and 3 deletions
|
@ -22,11 +22,13 @@ angular.module('podcasts.models', ['podcasts.database', 'podcasts.utilities'])
|
||||||
promise.then(function(xml) {
|
promise.then(function(xml) {
|
||||||
var channelChildren = xml.find('channel').children(),
|
var channelChildren = xml.find('channel').children(),
|
||||||
newFeed = {},
|
newFeed = {},
|
||||||
imageUrl;
|
imageUrl,
|
||||||
|
titles = xml.find('title'),
|
||||||
|
descriptions = xml.find('description');
|
||||||
|
|
||||||
newFeed.url = cleanedUrl;
|
newFeed.url = cleanedUrl;
|
||||||
newFeed.title = xml.find('title').text();
|
newFeed.title = angular.element(titles[Object.keys(titles)[0]]).text();
|
||||||
newFeed.summary = xml.find('description').text();
|
newFeed.summary = angular.element(descriptions[Object.keys(descriptions)[0]]).text();
|
||||||
newFeed.nrQueueItems = 1;
|
newFeed.nrQueueItems = 1;
|
||||||
|
|
||||||
angular.forEach(channelChildren, function(value, key) {
|
angular.forEach(channelChildren, function(value, key) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue