@@ -70,10 +70,18 @@ fn isVideo(str: []const u8) bool {
return std.mem.endsWith(u8, str, ".mp4");
}
fn isGif(str: []const u8) bool {
return std.mem.endsWith(u8, str, ".gif");
}
fn cmpStrVideo(_: void, lhs: []const u8, rhs: []const u8) bool {
return if (isVideo(lhs) and !isVideo(rhs))
true
else if (isVideo(rhs))
else if (!isVideo(lhs) and isVideo(rhs))
false
else if (isGif(lhs) and !isGif(rhs))
true
else if (!isGif(lhs) and isGif(rhs))
false
else
cmpStr({}, lhs, rhs);