Support gPodder OPML Export files
This commit is contained in:
parent
e00b6db189
commit
20e1d80d16
|
@ -195,7 +195,7 @@ export default Vue.extend({
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
name: 'Database File',
|
name: 'Database File',
|
||||||
extensions: ['*']
|
extensions: ['opml', 'xml']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -219,6 +219,7 @@ export default Vue.extend({
|
||||||
opmlToJson(data, async (err, json) => {
|
opmlToJson(data, async (err, json) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
console.log('error reading')
|
||||||
const message = this.$t('Settings.Data Settings.Invalid subscriptions file')
|
const message = this.$t('Settings.Data Settings.Invalid subscriptions file')
|
||||||
this.showToast({
|
this.showToast({
|
||||||
message: `${message}: ${err}`
|
message: `${message}: ${err}`
|
||||||
|
@ -226,9 +227,12 @@ export default Vue.extend({
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const feedData = json.children[0].children
|
let feedData = json.children[0].children
|
||||||
|
|
||||||
if (typeof feedData === 'undefined') {
|
if (typeof feedData === 'undefined') {
|
||||||
|
if (json.title.includes('gPodder')) {
|
||||||
|
feedData = json.children
|
||||||
|
} else {
|
||||||
const message = this.$t('Settings.Data Settings.Invalid subscriptions file')
|
const message = this.$t('Settings.Data Settings.Invalid subscriptions file')
|
||||||
this.showToast({
|
this.showToast({
|
||||||
message: message
|
message: message
|
||||||
|
@ -236,6 +240,7 @@ export default Vue.extend({
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const primaryProfile = JSON.parse(JSON.stringify(this.profileList[0]))
|
const primaryProfile = JSON.parse(JSON.stringify(this.profileList[0]))
|
||||||
const subscriptions = []
|
const subscriptions = []
|
||||||
|
|
Loading…
Reference in New Issue