diff --git a/app/api/utils.ts b/app/api/utils.ts index 9fa41c7..da7c6fa 100644 --- a/app/api/utils.ts +++ b/app/api/utils.ts @@ -200,7 +200,7 @@ export function minutesToTime( if (h > 0) return hDisplay; if (m > 0) return mDisplay; } else { - return `${dDisplay}${h > 0 && ", " + hDisplay}${m > 0 && ", " + mDisplay}`; + return `${d > 0 ? dDisplay : ""}${h > 0 ? ", " + hDisplay : ""}${m > 0 ? ", " + mDisplay : ""}`; } } diff --git a/app/components/ReleaseInfo/ReleaseInfo.Info.tsx b/app/components/ReleaseInfo/ReleaseInfo.Info.tsx index 0f6e93e..04c0ce2 100644 --- a/app/components/ReleaseInfo/ReleaseInfo.Info.tsx +++ b/app/components/ReleaseInfo/ReleaseInfo.Info.tsx @@ -59,7 +59,7 @@ export const ReleaseInfoInfo = (props: { {props.episodes.released ? props.episodes.released : "?"} {"/"} {props.episodes.total ? props.episodes.total + " эп. " : "? эп. "} - {props.duration != 0 && `по ${minutesToTime(props.duration)}`} + {props.duration != 0 && `по ${minutesToTime(props.duration, "daysHours")}`}