mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Convert enclosure size field to bigint
This commit is contained in:
parent
fec391a336
commit
482785c5e6
7 changed files with 9 additions and 6 deletions
|
@ -187,7 +187,7 @@ func getEnclosures(a *atomEntry) model.EnclosureList {
|
|||
|
||||
for _, link := range a.Links {
|
||||
if strings.ToLower(link.Rel) == "enclosure" {
|
||||
length, _ := strconv.Atoi(link.Length)
|
||||
length, _ := strconv.ParseInt(link.Length, 10, 0)
|
||||
enclosures = append(enclosures, &model.Enclosure{URL: link.URL, MimeType: link.Type, Size: length})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ type jsonAttachment struct {
|
|||
URL string `json:"url"`
|
||||
MimeType string `json:"mime_type"`
|
||||
Title string `json:"title"`
|
||||
Size int `json:"size_in_bytes"`
|
||||
Size int64 `json:"size_in_bytes"`
|
||||
Duration int `json:"duration_in_seconds"`
|
||||
}
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ func (r *rssItem) GetEnclosures() model.EnclosureList {
|
|||
enclosures := make(model.EnclosureList, 0)
|
||||
|
||||
for _, enclosure := range r.Enclosures {
|
||||
length, _ := strconv.Atoi(enclosure.Length)
|
||||
length, _ := strconv.ParseInt(enclosure.Length, 10, 0)
|
||||
enclosureURL := enclosure.URL
|
||||
|
||||
if r.OrigEnclosureLink != "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue