# Persist DownloadedItem size when downloading or when reading file for the first time

This commit is contained in:
herrrta
2024-12-01 17:42:19 -05:00
parent 0f547deb39
commit 7b52528d72
4 changed files with 61 additions and 18 deletions

View File

@@ -128,7 +128,8 @@ export const useRemuxHlsToMp4 = () => {
}s`
);
if (!item) throw new Error("Item is undefined");
await saveDownloadedItemInfo(item);
const stat = await session.getLastReceivedStatistics();
await saveDownloadedItemInfo(item, stat.getSize());
toast.success("Download completed");
await queryClient.invalidateQueries({
queryKey: ["downloadedItems"],