parse podcast description from HTML to text just as with episodes (#354)
This commit is contained in:
@@ -6,11 +6,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func NewPodcastChannel(p *db.Podcast) *PodcastChannel {
|
func NewPodcastChannel(p *db.Podcast) *PodcastChannel {
|
||||||
|
desc, err := html2text.FromString(p.Description, html2text.Options{TextOnly: true})
|
||||||
|
if (err != nil) {
|
||||||
|
desc = ""
|
||||||
|
}
|
||||||
ret := &PodcastChannel{
|
ret := &PodcastChannel{
|
||||||
ID: p.SID(),
|
ID: p.SID(),
|
||||||
OriginalImageURL: p.ImageURL,
|
OriginalImageURL: p.ImageURL,
|
||||||
Title: p.Title,
|
Title: p.Title,
|
||||||
Description: p.Description,
|
Description: desc,
|
||||||
URL: p.URL,
|
URL: p.URL,
|
||||||
CoverArt: p.SID(),
|
CoverArt: p.SID(),
|
||||||
Status: "skipped",
|
Status: "skipped",
|
||||||
|
|||||||
Reference in New Issue
Block a user