mirror of
https://github.com/Radarr/Radarr
synced 2025-12-06 08:28:50 +01:00
Add SizeOnDisk and HasFile to MovieResource
This commit is contained in:
parent
6292ff76b0
commit
0ae8952b38
1 changed files with 6 additions and 3 deletions
|
|
@ -50,13 +50,12 @@ public MovieResource()
|
||||||
public string YouTubeTrailerId { get; set; }
|
public string YouTubeTrailerId { get; set; }
|
||||||
public string Studio { get; set; }
|
public string Studio { get; set; }
|
||||||
|
|
||||||
|
public bool HasFile { get; set; }
|
||||||
|
|
||||||
// View & Edit
|
// View & Edit
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
public int QualityProfileId { get; set; }
|
public int QualityProfileId { get; set; }
|
||||||
|
|
||||||
// Compatibility
|
|
||||||
public bool HasFile { get; set; }
|
|
||||||
|
|
||||||
// Editing Only
|
// Editing Only
|
||||||
public bool Monitored { get; set; }
|
public bool Monitored { get; set; }
|
||||||
public MovieStatusType MinimumAvailability { get; set; }
|
public MovieStatusType MinimumAvailability { get; set; }
|
||||||
|
|
@ -91,6 +90,8 @@ public static MovieResource ToResource(this Movie model, int availDelay, MovieTr
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var size = model.MovieFile?.Size ?? 0;
|
||||||
|
|
||||||
var movieFile = model.MovieFile?.ToResource(model, upgradableSpecification, formatCalculationService);
|
var movieFile = model.MovieFile?.ToResource(model, upgradableSpecification, formatCalculationService);
|
||||||
|
|
||||||
var translatedTitle = movieTranslation?.Title ?? model.Title;
|
var translatedTitle = movieTranslation?.Title ?? model.Title;
|
||||||
|
|
@ -109,7 +110,9 @@ public static MovieResource ToResource(this Movie model, int availDelay, MovieTr
|
||||||
InCinemas = model.MovieMetadata.Value.InCinemas,
|
InCinemas = model.MovieMetadata.Value.InCinemas,
|
||||||
PhysicalRelease = model.MovieMetadata.Value.PhysicalRelease,
|
PhysicalRelease = model.MovieMetadata.Value.PhysicalRelease,
|
||||||
DigitalRelease = model.MovieMetadata.Value.DigitalRelease,
|
DigitalRelease = model.MovieMetadata.Value.DigitalRelease,
|
||||||
|
HasFile = model.HasFile,
|
||||||
|
|
||||||
|
SizeOnDisk = size,
|
||||||
Status = model.MovieMetadata.Value.Status,
|
Status = model.MovieMetadata.Value.Status,
|
||||||
Overview = translatedOverview,
|
Overview = translatedOverview,
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue