Reset file info for administrating changes, to prevent audio manager processing files twice that are essentially unchanged.
This commit is contained in:
+3
-4
@@ -192,8 +192,7 @@
|
|||||||
(if (convert-flac-to-rate path base-rate)
|
(if (convert-flac-to-rate path base-rate)
|
||||||
(begin
|
(begin
|
||||||
(hash-set! info 'khz base-rate)
|
(hash-set! info 'khz base-rate)
|
||||||
(hash-set! info 'size (file-size path))
|
(reset-file-admin-info path info)
|
||||||
(hash-set! info 'mtime (file-or-directory-modify-seconds path))
|
|
||||||
)
|
)
|
||||||
(begin
|
(begin
|
||||||
(err-am " Cannot convert!")
|
(err-am " Cannot convert!")
|
||||||
@@ -225,8 +224,7 @@
|
|||||||
(tags-picture! tags cover)
|
(tags-picture! tags cover)
|
||||||
(tags-save! tags))
|
(tags-save! tags))
|
||||||
#:mode 'read-write))
|
#:mode 'read-write))
|
||||||
(hash-set! info 'size (file-size path))
|
(reset-file-admin-info path info)
|
||||||
(hash-set! info 'mtime (file-or-directory-modify-seconds path))
|
|
||||||
(info-am " Picture set")
|
(info-am " Picture set")
|
||||||
(set! pictures-set (+ pictures-set 1))
|
(set! pictures-set (+ pictures-set 1))
|
||||||
)
|
)
|
||||||
@@ -273,6 +271,7 @@
|
|||||||
(if (convert-to-opus path opus-file ini)
|
(if (convert-to-opus path opus-file ini)
|
||||||
(begin
|
(begin
|
||||||
(set! converted-files (+ converted-files 1))
|
(set! converted-files (+ converted-files 1))
|
||||||
|
(reset-file-admin-info path info)
|
||||||
(info-am " Converted ~a, job-nr = ~a" converted-files jobnr)
|
(info-am " Converted ~a, job-nr = ~a" converted-files jobnr)
|
||||||
)
|
)
|
||||||
(begin
|
(begin
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
(provide make-file-walker
|
(provide make-file-walker
|
||||||
make-file-admin
|
make-file-admin
|
||||||
|
reset-file-admin-info
|
||||||
fw-add-step
|
fw-add-step
|
||||||
os-path
|
os-path
|
||||||
)
|
)
|
||||||
@@ -102,6 +103,13 @@
|
|||||||
)
|
)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
(define (reset-file-admin-info path info)
|
||||||
|
(when (eq? (hash-ref info 'type #f) 'file)
|
||||||
|
(hash-set! info 'size (file-size path))
|
||||||
|
(hash-set! info 'mtime (file-or-directory-modify-seconds path))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
(define (make-file-admin base-path db-store #:filename-cleaner [fc-f (λ (f) f)])
|
(define (make-file-admin base-path db-store #:filename-cleaner [fc-f (λ (f) f)])
|
||||||
|
|
||||||
(define (file-info-equal? i1 i2)
|
(define (file-info-equal? i1 i2)
|
||||||
|
|||||||
Reference in New Issue
Block a user