From 1b98b994b7e598f72bca84c103224d732acb1e84 Mon Sep 17 00:00:00 2001 From: Mukhtar Akere Date: Thu, 19 Jun 2025 18:23:38 +0100 Subject: [PATCH] Add size to arr ContentFile --- pkg/arr/content.go | 2 ++ pkg/arr/types.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/pkg/arr/content.go b/pkg/arr/content.go index dc4a45e..3bcc22e 100644 --- a/pkg/arr/content.go +++ b/pkg/arr/content.go @@ -105,6 +105,7 @@ func (a *Arr) GetMedia(mediaId string) ([]Content, error) { Id: d.Id, EpisodeId: eId, SeasonNumber: file.SeasonNumber, + Size: file.Size, }) } if len(files) == 0 { @@ -148,6 +149,7 @@ func GetMovies(a *Arr, tvId string) ([]Content, error) { FileId: movie.MovieFile.Id, Id: movie.Id, Path: movie.MovieFile.Path, + Size: movie.MovieFile.Size, }) ct.Files = files contents = append(contents, ct) diff --git a/pkg/arr/types.go b/pkg/arr/types.go index ea7457e..2c6f4c8 100644 --- a/pkg/arr/types.go +++ b/pkg/arr/types.go @@ -11,6 +11,7 @@ type Movie struct { RelativePath string `json:"relativePath"` Path string `json:"path"` Id int `json:"id"` + Size int64 `json:"size"` } `json:"movieFile"` Id int `json:"id"` } @@ -26,6 +27,7 @@ type ContentFile struct { IsBroken bool `json:"isBroken"` SeasonNumber int `json:"seasonNumber"` Processed bool `json:"processed"` + Size int64 `json:"size"` } func (file *ContentFile) Delete() { @@ -45,4 +47,5 @@ type seriesFile struct { SeasonNumber int `json:"seasonNumber"` Path string `json:"path"` Id int `json:"id"` + Size int64 `json:"size"` }