diff options
| author | davy <davy.wybiral@gmail.com> | 2019-06-29 11:16:01 -0500 |
|---|---|---|
| committer | davy <davy.wybiral@gmail.com> | 2019-06-29 11:16:01 -0500 |
| commit | 0979457d751b79cee627fb9f78ce1b0280ef969e (patch) | |
| tree | 1747f13635973fba571fa89c45d14173e2cbe8c6 /pkg/media | |
| parent | 0b87a1137f330a36419030a4e82363ed36563a23 (diff) | |
added rss enclosures
Diffstat (limited to 'pkg/media')
| -rw-r--r-- | pkg/media/video.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/media/video.go b/pkg/media/video.go index 7fddbee..2499433 100644 --- a/pkg/media/video.go +++ b/pkg/media/video.go @@ -16,6 +16,7 @@ type Video struct { Thumb []byte ThumbType string Modified string + Size int64 Timestamp time.Time } @@ -28,6 +29,7 @@ func ParseVideo(path string) (*Video, error) { if err != nil { return nil, err } + size := info.Size() timestamp := info.ModTime() modified := timestamp.Format("2006-01-02 03:04 PM") name := info.Name() @@ -52,6 +54,7 @@ func ParseVideo(path string) (*Video, error) { Album: m.Album(), Description: m.Comment(), Modified: modified, + Size: size, Timestamp: timestamp, } // Add thumbnail (if exists) |
