Skip to content

Commit

Permalink
version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Zhang committed Dec 24, 2013
1 parent eb98604 commit e9d3d8f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1.0.1 - 12/23/2013

* Fix duplicate segment download bug
* Use more precise TargetDuration translation

1.0.0 - 12/23/2013

* Initial release
2 changes: 1 addition & 1 deletion 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.0**
* Current version: **1.0.1**
* Author: Kevin Zhang
* License [GNU GPL version 3](http://www.gnu.org/licenses/gpl-3.0.txt)

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

const VERSION = "1.0.0"
const VERSION = "1.0.1"

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

Expand Down Expand Up @@ -99,10 +99,10 @@ func getPlaylist(urlStr string, duration time.Duration, useLocalTime bool, feed
log.Print(err)
continue
}
_, hit := cache.Get(msURI)
_, hit := cache.Get(msURI.String())
if !hit {
feed <- msURI.String()
cache.Add(msURI, nil)
cache.Add(msURI.String(), nil)
log.Printf("Queued %v\n", msURI)
if useLocalTime {
recTime = time.Now().Sub(startTime)
Expand All @@ -121,7 +121,7 @@ func getPlaylist(urlStr string, duration time.Duration, useLocalTime bool, feed
close(feed)
return
} else {
time.Sleep(time.Duration(int(mpl.TargetDuration)) * time.Second)
time.Sleep(time.Duration(int64(mpl.TargetDuration * 1000000000)))
}
} else {
log.Fatal("Not a valid media playlist")
Expand Down

0 comments on commit e9d3d8f

Please sign in to comment.