Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
Prefer non-DASH formats
Browse files Browse the repository at this point in the history
  • Loading branch information
pukkandan committed Sep 22, 2020
1 parent d7fb940 commit c991fc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Key | Description
------------ | -------------
**log**| Whether to log the command to [ydl.ahk.log](https://github.com/pukkandan/YDL/blob/master/ydl.ahk.log) (`1`=Log, `0`=Don't log).
**meta**| Whether to embed metadata (`1`=Embed, `0`=Don't embed).
**dash**| Whether to download DASH formats (`1`=Embed, `0`=Don't embed).
**name**| [Naming pattern](https://github.com/ytdl-org/youtube-dl#output-template) to use when no profile is given.
**opts**| These [options](https://github.com/ytdl-org/youtube-dl#options) will be additionally passed to `youtube-dl`. Only the options given in **\[Options\]/opts** may override these.

Expand Down
3 changes: 2 additions & 1 deletion ydl.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ global Path := getOpt("path", A_WorkingDir "\Download")
, Res := getOpt("res", "720")
, Log := getOpt("log", True, "Hidden")
, Meta := getOpt("meta", True, "Hidden")
, Dash := getOpt("dash", False, "Hidden")
, Name := RegexReplace(getOpt("name", "%ydl_home%/%(uploader)s - %(title)s [%(id)s] (%(resolution)s).%(ext)s", "Hidden"), "(?<!%)%\(", "%%(")
, Def := getOpt("opts",, "Hidden")
, URL := ""
Expand Down Expand Up @@ -79,7 +80,7 @@ Download(){
return

urls := "-- """ RegexReplace(url,"S)\s+", """ """) """"
getAud := Res="audio"? "-x -f bestaudio" :""
getAud := Res="audio"? "-x -f bestaudio" : Dash?"": "-f (bestvideo+bestaudio/best)[protocol!=http_dash_segments]/(bestvideo+bestaudio/best)"
prof := Prof="<None>"? "--output """ Name """" : "--config-location """ Prof ".conf"""
metaStr := Meta? "--add-metadata" :""

Expand Down

0 comments on commit c991fc3

Please sign in to comment.