forked from Ninjalama/streamyfin_mirror
fix: add back speed to normal downloads
This commit is contained in:
@@ -82,8 +82,15 @@ export const ActiveDownloads: React.FC<Props> = ({ ...props }) => {
|
||||
<View>
|
||||
<Text className="font-semibold">{p.item.Name}</Text>
|
||||
<Text className="text-xs opacity-50">{p.item.Type}</Text>
|
||||
<View className="flex flex-row items-center space-x-2 mt-1 text-purple-600">
|
||||
<Text className="text-xs">{p.progress.toFixed(0)}%</Text>
|
||||
<View className="flex flex-row items-center space-x-4">
|
||||
<View className="flex flex-row items-center space-x-2 mt-1 text-purple-600">
|
||||
<Text className="text-xs">{p.progress.toFixed(0)}%</Text>
|
||||
</View>
|
||||
{p.speed && (
|
||||
<View className="flex flex-row items-center space-x-2 mt-1 text-purple-600">
|
||||
<Text className="text-xs">{p.speed.toFixed(2)}%</Text>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
<View className="flex flex-row items-center space-x-2 mt-1 text-purple-600">
|
||||
<Text className="text-xs capitalize">{p.state}</Text>
|
||||
|
||||
@@ -65,6 +65,7 @@ export const useRemuxHlsToMp4 = (item: BaseItemDto) => {
|
||||
const fps = item.MediaStreams?.[0]?.RealFrameRate || 25;
|
||||
const totalFrames = videoLength * fps;
|
||||
const processedFrames = statistics.getVideoFrameNumber();
|
||||
const speed = statistics.getSpeed();
|
||||
|
||||
const percentage =
|
||||
totalFrames > 0
|
||||
@@ -74,6 +75,7 @@ export const useRemuxHlsToMp4 = (item: BaseItemDto) => {
|
||||
if (!item.Id) throw new Error("Item is undefined");
|
||||
updateProcess(item.Id, {
|
||||
progress: percentage,
|
||||
speed: Math.max(speed, 0),
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ export type ProcessItem = {
|
||||
item: Partial<BaseItemDto>;
|
||||
progress: number;
|
||||
size?: number;
|
||||
speed?: number;
|
||||
state:
|
||||
| "optimizing"
|
||||
| "downloading"
|
||||
|
||||
Reference in New Issue
Block a user