add my import :)
This commit is contained in:
parent
c11fdb9787
commit
cb5242f79b
3 changed files with 36 additions and 7 deletions
|
@ -828,14 +828,25 @@ angular.module('podcasts.settings', ['podcasts.database'])
|
|||
}])
|
||||
;
|
||||
|
||||
angular.module('podcasts.importer', [])
|
||||
.service('opml', function() {
|
||||
angular.module('podcasts.importer', ['podcasts.utilities', 'podcasts.services'])
|
||||
.service('opml', ['xmlParser', 'feeds', function(xmlParser, feeds) {
|
||||
return {
|
||||
import: function(url) {
|
||||
import: function(xml) {
|
||||
angular.forEach(xml.find('outline'), function(value, key) {
|
||||
var element = angular.element(value);
|
||||
if ("rss" != element.attr('type')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var feedUrl = element.attr('xmlUrl');
|
||||
if (feedUrl) {
|
||||
console.log('adding something');
|
||||
feeds.add(feedUrl);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}])
|
||||
.service('google', ['$q', '$http', 'feeds', function($q, $http, feeds) {
|
||||
return {
|
||||
import: function(email, password) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue