From 3cba11f1df5fcdd49036e4ee99c604dbb081373d Mon Sep 17 00:00:00 2001 From: Abdussamet Kocak Date: Tue, 11 Aug 2026 09:50:55 +0200 Subject: [PATCH] feat(snot): Add gridvid support, update Alfred integrations --- snot/snot.html | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/snot/snot.html b/snot/snot.html index 6766e74..a59bfe2 100644 --- a/snot/snot.html +++ b/snot/snot.html @@ -208,6 +208,7 @@
Play all with mpv + Play all in a grid
@@ -236,7 +237,7 @@ }, sort: { by: null, dir: "asc" }, buildAlfredURL(url) { - return `alfred://runtrigger/piracy/direct_link/?argument=${encodeURIComponent(url)}`; + return `alfred://runtrigger/dev.abdus.alfred.media/video/?argument=${encodeURIComponent(url)}`; }, toggleSort(field) { if (this.sort.by === field) { @@ -320,7 +321,7 @@ await this.search(); } }, - get playlistLink() { + get playableURLs() { const playable = this.visibleResults.some((item) => item.file_path.startsWith("/mnt/box/files")); if (!playable) { return null; @@ -329,9 +330,26 @@ .filter((item) => item.file_path.startsWith("/mnt/box/files")) .map((item) => item.download_url) .sort(() => Math.random() - 0.5); - const playlistArg = encodeURIComponent(urls.join("\n")); - return `alfred://runtrigger/dev.abdus.labs/mpv_playlist/?argument=${playlistArg}`; + return urls; }, + get playlistLink() { + const urls = this.playableURLs; + if (!urls) { + return null; + } + const playlistArg = encodeURIComponent(urls.join("\n")); + return `alfred://runtrigger/dev.abdus.alfred.media/mpv/?argument=${playlistArg}`; + }, + + get gridLink() { + const urls = this.playableURLs; + if (!urls) { + return null; + } + const playlistArg = encodeURIComponent(urls.join("\n")); + return `alfred://runtrigger/dev.abdus.alfred.media/gridvid/?argument=${playlistArg}`; + }, + async search() { const response = await fetch("/search", { method: "POST",