mirror of
https://github.com/hkalexling/Mango.git
synced 2026-05-01 00:00:55 -04:00
Revert "Support all image types (resolves #192)"
This reverts commit f67e4e6cb9.
This commit is contained in:
@@ -40,7 +40,8 @@ class Entry
|
||||
|
||||
file = ArchiveFile.new @zip_path
|
||||
@pages = file.entries.count do |e|
|
||||
filename_is_image e.filename
|
||||
SUPPORTED_IMG_TYPES.includes? \
|
||||
MIME.from_filename? e.filename
|
||||
end
|
||||
file.close
|
||||
end
|
||||
@@ -102,7 +103,8 @@ class Entry
|
||||
ArchiveFile.open @zip_path do |file|
|
||||
entries = file.entries
|
||||
.select { |e|
|
||||
filename_is_image e.filename
|
||||
SUPPORTED_IMG_TYPES.includes? \
|
||||
MIME.from_filename? e.filename
|
||||
}
|
||||
.sort! { |a, b|
|
||||
compare_numerically a.filename, b.filename
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
SUPPORTED_IMG_TYPES = ["image/jpeg", "image/png", "image/webp"]
|
||||
|
||||
enum SortMethod
|
||||
Auto
|
||||
Title
|
||||
|
||||
Reference in New Issue
Block a user