Sort titles in library by name by default

This commit is contained in:
Alex Ling 2020-02-22 18:15:40 +00:00
parent 0fa95959a7
commit 5ec35f3af6

View File

@ -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