Add size to arr ContentFile
This commit is contained in:
@@ -105,6 +105,7 @@ func (a *Arr) GetMedia(mediaId string) ([]Content, error) {
|
|||||||
Id: d.Id,
|
Id: d.Id,
|
||||||
EpisodeId: eId,
|
EpisodeId: eId,
|
||||||
SeasonNumber: file.SeasonNumber,
|
SeasonNumber: file.SeasonNumber,
|
||||||
|
Size: file.Size,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if len(files) == 0 {
|
if len(files) == 0 {
|
||||||
@@ -148,6 +149,7 @@ func GetMovies(a *Arr, tvId string) ([]Content, error) {
|
|||||||
FileId: movie.MovieFile.Id,
|
FileId: movie.MovieFile.Id,
|
||||||
Id: movie.Id,
|
Id: movie.Id,
|
||||||
Path: movie.MovieFile.Path,
|
Path: movie.MovieFile.Path,
|
||||||
|
Size: movie.MovieFile.Size,
|
||||||
})
|
})
|
||||||
ct.Files = files
|
ct.Files = files
|
||||||
contents = append(contents, ct)
|
contents = append(contents, ct)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ type Movie struct {
|
|||||||
RelativePath string `json:"relativePath"`
|
RelativePath string `json:"relativePath"`
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
Id int `json:"id"`
|
Id int `json:"id"`
|
||||||
|
Size int64 `json:"size"`
|
||||||
} `json:"movieFile"`
|
} `json:"movieFile"`
|
||||||
Id int `json:"id"`
|
Id int `json:"id"`
|
||||||
}
|
}
|
||||||
@@ -26,6 +27,7 @@ type ContentFile struct {
|
|||||||
IsBroken bool `json:"isBroken"`
|
IsBroken bool `json:"isBroken"`
|
||||||
SeasonNumber int `json:"seasonNumber"`
|
SeasonNumber int `json:"seasonNumber"`
|
||||||
Processed bool `json:"processed"`
|
Processed bool `json:"processed"`
|
||||||
|
Size int64 `json:"size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (file *ContentFile) Delete() {
|
func (file *ContentFile) Delete() {
|
||||||
@@ -45,4 +47,5 @@ type seriesFile struct {
|
|||||||
SeasonNumber int `json:"seasonNumber"`
|
SeasonNumber int `json:"seasonNumber"`
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
Id int `json:"id"`
|
Id int `json:"id"`
|
||||||
|
Size int64 `json:"size"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user