emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hyperdrive 5291373a40 02/20: Change: (h//fill-listing-entr


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 5291373a40 02/20: Change: (h//fill-listing-entries) Fill blocks, blocks-downloaded
Date: Tue, 6 Aug 2024 01:00:33 -0400 (EDT)

branch: elpa/hyperdrive
commit 5291373a40cc55e1c3c60bae5386eaea6fbffc23
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Change: (h//fill-listing-entries) Fill blocks, blocks-downloaded
---
 hyperdrive-lib.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 5b0419f690..83704d2d25 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -740,15 +740,21 @@ LISTING should be an alist based on the JSON retrieved 
in, e.g.,
 `hyperdrive-dir-handler'.  Fills existent version ranges for each
 entry as a side-effect."
   (mapcar
-   (pcase-lambda ((map seq key value))
+   (pcase-lambda ((map seq key value blockLengthDownloaded))
      (let* ((mtime (map-elt (map-elt value 'metadata) 'mtime))
             (size (map-elt (map-elt value 'blob) 'byteLength))
+            (block-length (map-elt (map-elt value 'blob) 'blockLength))
             (entry (he/create
                     :hyperdrive hyperdrive :path key :version version)))
        (when mtime ; mtime is milliseconds since epoch
          (setf (he/mtime entry) (seconds-to-time (/ mtime 1000.0))))
        (when size
          (setf (he/size entry) size))
+       (when block-length
+         (setf (map-elt (he/etc entry) 'block-length) block-length))
+       (when blockLengthDownloaded
+         (setf (map-elt (he/etc entry) 'block-length-downloaded)
+               blockLengthDownloaded))
        (when seq
          ;; seq is the hyperdrive version *before* the entry was added/modified
          (hyperdrive-update-existent-version-range entry (1+ seq)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]