diff options
author | 2024-02-24 13:47:03 +0100 | |
---|---|---|
committer | 2024-02-24 19:43:33 -0800 | |
commit | c544dadd55b3f96d0f488d0c3e4266ae9f15d71f (patch) | |
tree | 42aaea5f5900de7adb4548dd0784b656fedafe6c /internal/reader/opml/parser.go | |
parent | 1da65d97d86193918d2d5b47f9410ea69e382216 (diff) | |
download | v2-c544dadd55b3f96d0f488d0c3e4266ae9f15d71f.tar.gz v2-c544dadd55b3f96d0f488d0c3e4266ae9f15d71f.tar.zst v2-c544dadd55b3f96d0f488d0c3e4266ae9f15d71f.zip |
Fix categories import from Thunderbird's OPML
Thunderbird OPML exports are looking like this:
```xml
<opml version="1.0" xmlns:fz="urn:forumzilla:">
<head>
<title>Thunderbird OPML Export - RSS</title>
<dateCreated>Sat, 24 Feb 2024 11:31:13 GMT</dateCreated>
</head>
<body>
<outline title="News">
<outline type="rss" ...>
<outline type="rss" ...>
...
</outline>
<outline title="Blogs">
<outline type="rss" ...>
<outline type="rss" ...>
...
</outline>
</body>
```
This commit make it so that categories are now correctly imported.
Diffstat (limited to 'internal/reader/opml/parser.go')
-rw-r--r-- | internal/reader/opml/parser.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/reader/opml/parser.go b/internal/reader/opml/parser.go index 5e3fd0d2..09455a69 100644 --- a/internal/reader/opml/parser.go +++ b/internal/reader/opml/parser.go @@ -37,7 +37,7 @@ func getSubscriptionsFromOutlines(outlines opmlOutlineCollection, category strin CategoryName: category, }) } else if outline.Outlines.HasChildren() { - subscriptions = append(subscriptions, getSubscriptionsFromOutlines(outline.Outlines, outline.Text)...) + subscriptions = append(subscriptions, getSubscriptionsFromOutlines(outline.Outlines, outline.GetTitle())...) } } return subscriptions |