Skip to content

Commit

Permalink
Add support for setlists
Browse files Browse the repository at this point in the history
  • Loading branch information
jheinen committed Apr 16, 2023
1 parent b2a6a12 commit 8d4db87
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dialog.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module dialog
include("console.jl")
include("keys.jl")

using DelimitedFiles

using .console
using .keys

Expand All @@ -27,6 +29,10 @@ function openfiledialog(path)
global first, current, scrolled
if isfile(joinpath(path, "index.txt"))
songs = readindex(joinpath(path, "index.txt"))
if isfile(joinpath(path, "set.txt"))
set = readdlm(joinpath(path, "set.txt"), ',', Int)
songs = songs[set]
end
else
files = filter(x->endswith(lowercase(x), ".mid"), readdir(path))
songs = zip(files, files) |> collect
Expand Down

0 comments on commit 8d4db87

Please sign in to comment.