diff --git a/src/library.cr b/src/library.cr index 176772a..1a3b117 100644 --- a/src/library.cr +++ b/src/library.cr @@ -167,6 +167,7 @@ class Library .select { |path| File.directory? File.join @dir, path } .map { |path| Title.new File.join @dir, path } .select { |title| !title.entries.empty? } + .sort { |a, b| a.title <=> b.title } @logger.debug "Scan completed" @logger.debug "Scanned library: \n#{self.to_pretty_json}" end