Generate first feed pages, images

This commit is contained in:
Christoph Hagen
2024-12-04 08:10:45 +01:00
parent dc7b7a0e90
commit b3cc4a57db
25 changed files with 928 additions and 272 deletions

View File

@ -46,7 +46,7 @@ final class Importer {
let thumbnailUrl = folder.appending(path: "thumbnail.jpg", directoryHint: .notDirectory)
var thumbnail: FileOnDisk? = nil
if FileManager.default.fileExists(atPath: thumbnailUrl.path()) {
thumbnail = FileOnDisk(type: .image, url: thumbnailUrl, name: "\(name)-thumbnail.jpg")
thumbnail = FileOnDisk(type: .image(.jpg), url: thumbnailUrl, name: "\(name)-thumbnail.jpg")
add(resource: thumbnail!)
}
@ -104,7 +104,7 @@ final class Importer {
}
let type = FileType(fileExtension: fileExtension)
guard type != .resource else {
guard case .resource = type else {
self.ignoredFiles.append(url)
return nil
}