Update media-library logging and return value
This commit is contained in:
parent
4fcc130c9c
commit
86af891b0c
|
@ -27,19 +27,17 @@
|
|||
(*media-library*))
|
||||
|
||||
(define (create-media-library)
|
||||
(write-log! "Creating media library.")
|
||||
(make-media-library (make-eq-hashtable)
|
||||
(make-eq-hashtable)))
|
||||
|
||||
(define (add-image! media-library image-symbol image)
|
||||
(write-log! "Adding image: " image-symbol)
|
||||
(hashtable-set! (media-images media-library) image-symbol image))
|
||||
|
||||
(define (add-images! media-library images)
|
||||
(write-log! "Adding images: " images)
|
||||
(for-each (lambda (val)
|
||||
(add-image! media-library (car val) (cdr val)))
|
||||
images))
|
||||
|
||||
(define (get-image media-library image-symbol)
|
||||
(hashtable-ref (media-images media-library) image-symbol #f))
|
||||
"Gets the image in the library, or 'image-not-found if the image does not exists."
|
||||
(hashtable-ref (media-images media-library) image-symbol 'image-not-found))
|
||||
|
|
Loading…
Reference in a new issue