From 0e4da7e436c99a7a0c04d5f02dbe7de91d5091f3 Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Thu, 19 Sep 2024 12:30:01 -0400 Subject: [PATCH] sort by href --- cmd/ui/main.go | 2 +- cmd/ui/testdata/cam/4.mp4 | 1 - cmd/ui/testdata/cam/5.jpg | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) delete mode 120000 cmd/ui/testdata/cam/4.mp4 delete mode 120000 cmd/ui/testdata/cam/5.jpg diff --git a/cmd/ui/main.go b/cmd/ui/main.go index 3331511..e564c5f 100644 --- a/cmd/ui/main.go +++ b/cmd/ui/main.go @@ -89,7 +89,7 @@ func Run(ctx context.Context, args []string) error { series = append(series, v) } slices.SortFunc(series, func(a, b Series) int { - return -1 * strings.Compare(path.Base(a.Thumbnail), path.Base(b.Thumbnail)) + return -1 * strings.Compare(path.Base(a.HREF), path.Base(b.HREF)) }) if err := tmpl.Execute(w, map[string]any{ diff --git a/cmd/ui/testdata/cam/4.mp4 b/cmd/ui/testdata/cam/4.mp4 deleted file mode 120000 index c4f2d8c..0000000 --- a/cmd/ui/testdata/cam/4.mp4 +++ /dev/null @@ -1 +0,0 @@ -LAdN7KVw-Ig.mp4 \ No newline at end of file diff --git a/cmd/ui/testdata/cam/5.jpg b/cmd/ui/testdata/cam/5.jpg deleted file mode 120000 index 80deb5a..0000000 --- a/cmd/ui/testdata/cam/5.jpg +++ /dev/null @@ -1 +0,0 @@ -LAdN7KVw-Ig.jpg \ No newline at end of file