1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-27 23:06:29 -04:00

Use episode runtime for size limits when available

Closes #3482
This commit is contained in:
Mark McDowall
2023-03-03 15:17:59 -08:00
parent a42f97229a
commit f22998aef3
13 changed files with 144 additions and 50 deletions
@@ -0,0 +1,21 @@
function formatRuntime(runtime: number) {
if (!runtime) {
return '';
}
const hours = Math.floor(runtime / 60);
const minutes = runtime % 60;
const result = [];
if (hours) {
result.push(`${hours}h`);
}
if (minutes) {
result.push(`${minutes}m`);
}
return result.join(' ');
}
export default formatRuntime;