Skip to content

Commit

Permalink
fixing string encoding issue in rss enclosure length attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Petring committed Jul 12, 2015
1 parent 57321cf commit 76198fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rss.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type RssEnclosure struct {
//RSS 2.0 <enclosure url="http://example.com/file.mp3" length="123456789" type="audio/mpeg" />
XMLName xml.Name `xml:"enclosure"`
Url string `xml:"url,attr"`
Length string `xml:"length,attr"`
Length int64 `xml:"length,attr"`
Type string `xml:"type,attr"`
}

Expand All @@ -91,7 +91,7 @@ func newRssItem(i *Item) *RssItem {
Link: i.Link.Href,
Description: i.Description,
Guid: i.Id,
Enclosure: &RssEnclosure{Url: i.Link.Href, Type: i.Link.Type, Length: string(i.Link.Length)},
Enclosure: &RssEnclosure{Url: i.Link.Href, Type: i.Link.Type, Length: i.Link.Length},
PubDate: anyTimeFormat(time.RFC822, i.Created, i.Updated),
}
if i.Author != nil {
Expand Down

0 comments on commit 76198fd

Please sign in to comment.