DLSystem check for youtube-dl

This commit is contained in:
2022-07-02 00:36:36 +00:00
parent 270c29b8b2
commit c3e756e634
9 changed files with 48 additions and 11 deletions

View File

@@ -0,0 +1,16 @@
(load "../Lib.kiss")
(defNew []
// Check if youtube-dl is installed before doing anything
(let [&mut hasYTDL false]
(tryProcess "youtube-dl" [] ->error (when (contains error "You must provide at least one URL") (set hasYTDL true)))
(super
->[archive e]
(and ~hasYTDL (catsMatch e "(unless dlProcessed DLURL)"))
->[archive e &opt ui]
{
// (addFiles )
// (addTags archive e ["dlProcessed"])
})))