oignon: iodine: install
[julm/julm-nix.git] / home-manager / profiles / yt-dlp.nix
index 6dbe9164a101a8272b45ab1abe9550089c633ef9..68dc03b355433580bc733c99285fa9d96d3dd7ec 100644 (file)
@@ -1,21 +1,30 @@
 { pkgs, lib, config, ... }:
 {
-import = [
+imports = [
   ./aria2c.nix
 ];
-home.packages = [ pkgs.yt-dlp ];
+home.packages = [
+  # error: phantomjs 1.9.8 has been dropped due to lack of maintenance and security issues
+  #pkgs.phantomjs
+  pkgs.yt-dlp
+];
 xdg.configFile."yt-dlp/config".text = ''
-  --download-archive .downloaded
+  #--download-archive .downloaded
+  --embed-chapters
+  --embed-subs
+  --sub-langs all
   --format ${lib.concatStringsSep "/" [
-    "bestvideo[height=360][ext=mp4]+bestaudio"
-    "bestvideo[height<=480][ext=mp4]+bestaudio"
-    "best[height=360][ext=mp4]"
-    "best[height<=480][ext=mp4]"
-    "best[height=360]"
-    "best[height<=480]"
+    #"bestvideo[height=360][ext=mp4]+bestaudio"
+    "bestvideo[height=480][ext=mp4]+bestaudio"
+    #"best[height=360][ext=mp4]"
+    "best[height=480][ext=mp4]"
+    #"best[height=360]"
+    "best[height=480]"
     "best"
   ]}
-  --output %(upload_date>%Y-%m-%d)s - %(title)s.%(id)s.%(format_id)s.%(ext)s
+  --output "%(upload_date>%Y-%m-%d)s - %(title)s.%(id)s.%(format_id)s.%(ext)s"
   --prefer-free-formats
+  --sub-format ass/srt/best
+  --user-agent Mozilla/5.0
 '';
 }