pull/702/head
Luke Pulverenti 10 years ago
commit d9c4775015

@ -133,10 +133,10 @@ namespace MediaBrowser.Api.Reports
/// <summary> Gets runtime date time. </summary>
/// <param name="runtime"> The runtime. </param>
/// <returns> The runtime date time. </returns>
protected DateTime? GetRuntimeDateTime(long? runtime)
protected double? GetRuntimeDateTime(long? runtime)
{
if (runtime.HasValue)
return new DateTime(runtime.Value);
return Math.Ceiling(new TimeSpan(runtime.Value).TotalMinutes);
return null;
}

@ -13,6 +13,7 @@ namespace MediaBrowser.Api.Reports
DateTime,
Int,
Image,
Object
Object,
Minutes
}
}

@ -87,6 +87,8 @@ namespace MediaBrowser.Api.Reports
return string.Format("{0:t}", value);
case ReportFieldType.DateTime:
return string.Format("{0:d}", value);
case ReportFieldType.Minutes:
return string.Format("{0}mn", value);
case ReportFieldType.Int:
return string.Format("", value);
default:

@ -403,7 +403,7 @@ namespace MediaBrowser.Api.Reports
case HeaderMetadata.Runtime:
column = (i, r) => this.GetRuntimeDateTime(i.RunTimeTicks);
reportHeader.HeaderFieldType = ReportFieldType.Time;
reportHeader.HeaderFieldType = ReportFieldType.Minutes;
reportHeader.SortField = "Runtime,SortName";
break;

Loading…
Cancel
Save