diff --git a/Sources/App/CapServer.swift b/Sources/App/CapServer.swift index 893249b..f981246 100644 --- a/Sources/App/CapServer.swift +++ b/Sources/App/CapServer.swift @@ -181,7 +181,7 @@ final class CapServer: ServerOwner { return } var sorted: [(id: Int, url: URL)] = images.compactMap { - guard let id = Int($0.deletingPathExtension().lastPathComponent) else { + guard let id = Int($0.deletingPathExtension().lastPathComponent.components(separatedBy: "-").last!) else { return nil } return (id, $0)