Skip to content

Commit 1b98b99

Browse files
committed
Add size to arr ContentFile
1 parent 06096c3 commit 1b98b99

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pkg/arr/content.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ func (a *Arr) GetMedia(mediaId string) ([]Content, error) {
105105
Id: d.Id,
106106
EpisodeId: eId,
107107
SeasonNumber: file.SeasonNumber,
108+
Size: file.Size,
108109
})
109110
}
110111
if len(files) == 0 {
@@ -148,6 +149,7 @@ func GetMovies(a *Arr, tvId string) ([]Content, error) {
148149
FileId: movie.MovieFile.Id,
149150
Id: movie.Id,
150151
Path: movie.MovieFile.Path,
152+
Size: movie.MovieFile.Size,
151153
})
152154
ct.Files = files
153155
contents = append(contents, ct)

pkg/arr/types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ type Movie struct {
1111
RelativePath string `json:"relativePath"`
1212
Path string `json:"path"`
1313
Id int `json:"id"`
14+
Size int64 `json:"size"`
1415
} `json:"movieFile"`
1516
Id int `json:"id"`
1617
}
@@ -26,6 +27,7 @@ type ContentFile struct {
2627
IsBroken bool `json:"isBroken"`
2728
SeasonNumber int `json:"seasonNumber"`
2829
Processed bool `json:"processed"`
30+
Size int64 `json:"size"`
2931
}
3032

3133
func (file *ContentFile) Delete() {
@@ -45,4 +47,5 @@ type seriesFile struct {
4547
SeasonNumber int `json:"seasonNumber"`
4648
Path string `json:"path"`
4749
Id int `json:"id"`
50+
Size int64 `json:"size"`
4851
}

0 commit comments

Comments
 (0)