Skip to content

Commit 1f0aad9

Browse files
committed
base.scm(flatten-track): Rename procedure.
1 parent 934f7f7 commit 1f0aad9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

guile/spotiqueue/base.scm

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,17 @@
7171
(define-key queue-panel-map (kbd 'Delete) queue:delete-selected-tracks)
7272
(define-key queue-panel-map (kbd 'ForwardDelete) queue:delete-selected-tracks)
7373

74-
(define (flatten-track track)
75-
(cond ((track? track) (track-uri track))
76-
((string? track) track)
74+
(define (just-the-uri-please item)
75+
(cond ((track? item) (track-uri item))
76+
((string? item) item)
7777
(else #nil)))
7878

7979
;; It's easier to ensure we're dealing with URIs only in Guile land.
8080
(define (queue:set-tracks tracks)
81-
(queue:_set-tracks (map flatten-track tracks)))
81+
(queue:_set-tracks (map just-the-uri-please tracks)))
8282

83-
;; This is stolen from https://www.programming-idioms.org/idiom/10/shuffle-a-list/2021/scheme, i wasn't feeling creative.
83+
;; This is stolen from https://www.programming-idioms.org/idiom/10/shuffle-a-list/2021/scheme, i
84+
;; wasn't feeling creative.
8485
(define (shuffle-list list)
8586
(cond ((and (list? list)
8687
(positive? (length list)))

0 commit comments

Comments
 (0)