Update DB to save thumbnails

This commit is contained in:
Alex Ling
2020-10-23 12:29:20 +00:00
parent ad940f30d5
commit 968c2f4ad5
2 changed files with 36 additions and 3 deletions
+10
View File
@@ -57,6 +57,16 @@ struct Image
def initialize(@data, @mime, @filename, @size)
end
def self.from_db(res : DB::ResultSet)
img = Image.allocate
res.read String
img.data = res.read Bytes
img.filename = res.read String
img.mime = res.read String
img.size = res.read Int32
img
end
end
class TitleInfo