Skip to content

Commit dd74817

Browse files
committed
Not supplying at least one id for the files command will now list all.
1 parent 010dd9f commit dd74817

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cli/Program.fs

+4-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,10 @@ module Program =
350350
let listFiles libraryFile (config: Config.FilesConfig) =
351351
result {
352352
let! library = Library.fromFile libraryFile
353-
let! books = config.Ids |> List.traverseResultA (fun id -> Library.findById id library) |> Result.mapError (b0wter.FSharp.String.join "; ")
353+
let! books = if config.Ids.IsEmpty then
354+
library.Audiobooks |> Ok
355+
else
356+
config.Ids |> List.traverseResultA (fun id -> Library.findById id library) |> Result.mapError (b0wter.FSharp.String.join "; ")
354357

355358
let filter = match config.ListMissing with
356359
| false -> id

0 commit comments

Comments
 (0)