Skip to content

Commit

Permalink
Change default user agent; bump to 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Zhang committed Dec 25, 2013
1 parent 4a67774 commit ca4116c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.0.2 - 12/25/2013

* Bypass URL parsing for absolute media segment URLs

1.0.1 - 12/23/2013

* Fix duplicate segment download bug
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
gohls - HTTP Live Streaming (HLS) downloader written in Golang


* Current version: **1.0.1**
* Current version: **1.0.2**
* Author: Kevin Zhang
* License: [GNU GPL version 3](http://www.gnu.org/licenses/gpl-3.0.txt)

Expand All @@ -20,7 +20,7 @@ Currently, binaries are available for the following platforms:

* -l=false: Use local time to track duration instead of supplied metadata
* -t=0: Recording duration (0 == infinite)
* -ua="Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0": User-Agent for HTTP client
* -ua="user-agent": User-Agent for HTTP client

The recording duration should be specified as a Go-compatible [duration string](http://golang.org/pkg/time/#ParseDuration).

Expand Down
6 changes: 2 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ import "lru" // https://github.com/golang/groupcache/blob/master/lru/lru.go
import "strings"
import "github.com/grafov/m3u8"

const VERSION = "1.0.2beta"

const DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
const VERSION = "1.0.2"

var USER_AGENT string

Expand Down Expand Up @@ -140,7 +138,7 @@ func main() {

duration := flag.Duration("t", time.Duration(0), "Recording duration (0 == infinite)")
useLocalTime := flag.Bool("l", false, "Use local time to track duration instead of supplied metadata")
flag.StringVar(&USER_AGENT, "ua", DEFAULT_USER_AGENT, "User-Agent for HTTP client")
flag.StringVar(&USER_AGENT, "ua", fmt.Sprintf("gohls/%v", VERSION), "User-Agent for HTTP client")
flag.Parse()

os.Stderr.Write([]byte(fmt.Sprintf("gohls %v - HTTP Live Streaming (HLS) downloader\n", VERSION)))
Expand Down

0 comments on commit ca4116c

Please sign in to comment.