Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
poying committed Mar 2, 2015
1 parent 05bb49d commit 391ec29
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 11 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var progName = filepath.Base(os.Args[0])
func main() {
app := cli.NewApp()
app.Name = progName
app.Version = "0.0.0"
app.Version = Version
cli.AppHelpTemplate = appHelpTemplate
app.Action = action

Expand All @@ -31,6 +31,10 @@ func main() {
Value: ".",
Usage: "檔案存放位置",
},
cli.BoolFlag{
Name: "hd",
Usage: "高畫質",
},
}

app.Run(os.Args)
Expand Down Expand Up @@ -60,8 +64,13 @@ func action(c *cli.Context) {

task := downloader.Task(course)

quality := necourse.SD
if c.Bool("hd") {
quality = necourse.HD
}

downloader.Download(task, &Options{
Quality: necourse.SD,
Quality: quality,
OutputDir: outputDir,
})

Expand Down
3 changes: 3 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package main

const Version = "0.0.1"

0 comments on commit 391ec29

Please sign in to comment.