Permalink
Browse files

.

  • Loading branch information...
1 parent acd9be1 commit 41ff6f7d06e634bfbd34a445850a71c4365fd007 @Pauan Pauan committed Mar 5, 2012
Showing with 5 additions and 2 deletions.
  1. +2 −2 app/playlist/README.md
  2. +3 −0 app/playlist/playlist
View
@@ -73,8 +73,8 @@ use the `include` S-expression:
"qux")
The above will find the playlists that have titles of `"bar"` and `"qux"` and
-will then include them into the current playlist. If any of the included
-playlists do not exist, an error will be printed.
+will then include them into the current playlist. If you try to include a
+playlist that does not exist, an error will be printed.
The program will always correctly include files regardless of what order the
templates are loaded in, and it is even capable of detecting infinite loops:
View
@@ -57,6 +57,7 @@
nil)
+;; TODO: find a way to not need to redef this, using a function argument, maybe?
(redef boyer-multi-match1 (patterns inputs every)
(trues (fn (pat)
(car:keep (fn (in)
@@ -125,6 +126,7 @@
(include1 cdr.x)))))
(def include (x)
+ ;; % is Nu specific
;; grr, setting a hash key to nil deletes it,
;; so I have to use Racket's hash-ref! instead
((% hash-ref!) processed x (fn () (debug "processing playlist \"" x "\"")
@@ -151,6 +153,7 @@
(w/pretty:->xml
`(playlist version "1"
xmlns "http://xspf.org/ns/0/"
+ ;; cwd is Nu specific
xml:base ,cwd
(title ,title)
(trackList ,@(map (fn (x)

0 comments on commit 41ff6f7

Please sign in to comment.