aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-02-07 08:44:14 +0200
committerThanos Apollo <[email protected]>2024-02-07 08:44:14 +0200
commit0679fa6529bd82ffbb0d2186dea374bafd8df84b (patch)
treebb7dd82c5481eb65297679e9428abe9bdcaaa0d6
parent754dc9407ba2d6a62abfd154c5d245105e47b94e (diff)
Add yeetube-get-filter-code
Return for sorty-by value based on yeetube-filter-code-alist
-rw-r--r--yeetube.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/yeetube.el b/yeetube.el
index c9e456a..d4330aa 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -269,6 +269,11 @@ This is used to download thumbnails from `yeetube-content', within
("Date" . "CAISAhAB")
("Views" . "CAMSAhAB")
("Rating" . "CAESAhAB")))
+
+(defun yeetube-get-filter-code (sort-by)
+ "Get filter code for sorting search results."
+ (cdr (assoc sort-by yeetube-filter-code-alist)))
+
;;;###autoload
(defun yeetube-search (query)
"Search for QUERY."