drop mediainfo requirement since travis cant install it

This commit is contained in:
Alex Grintsvayg 2020-10-05 18:28:41 -04:00
parent ea80ed6506
commit a084330055
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5
3 changed files with 19 additions and 22 deletions

View file

@ -17,8 +17,7 @@ notifications:
email: false email: false
# Skip the install step. Don't `go get` dependencies. Only build with the code in vendor/ # Skip the install step. Don't `go get` dependencies. Only build with the code in vendor/
install: install: true
- apt-get install mediainfo # for go_mediainfo
# Anything in before_script that returns a nonzero exit code will # Anything in before_script that returns a nonzero exit code will
# flunk the build and immediately stop. It's sorta like having # flunk the build and immediately stop. It's sorta like having

1
go.mod
View file

@ -20,7 +20,6 @@ require (
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
github.com/johntdyer/slackrus v0.0.0-20180518184837-f7aae3243a07 github.com/johntdyer/slackrus v0.0.0-20180518184837-f7aae3243a07
github.com/lbryio/chainquery v1.9.0 github.com/lbryio/chainquery v1.9.0
github.com/lbryio/go_mediainfo v0.0.0-20200109212001-4c7318fd92ad
github.com/lbryio/lbry.go v1.1.2 github.com/lbryio/lbry.go v1.1.2
github.com/lbryio/lbry.go/v2 v2.6.1-0.20200901175808-73382bb02128 github.com/lbryio/lbry.go/v2 v2.6.1-0.20200901175808-73382bb02128
github.com/lbryio/types v0.0.0-20191228214437-05a22073b4ec github.com/lbryio/types v0.0.0-20191228214437-05a22073b4ec

View file

@ -10,7 +10,6 @@ import (
"github.com/lbryio/reflector.go/reflector" "github.com/lbryio/reflector.go/reflector"
mediainfo "github.com/lbryio/go_mediainfo"
"github.com/lbryio/lbry.go/v2/extras/errors" "github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/lbryio/lbry.go/v2/lbrycrd" "github.com/lbryio/lbry.go/v2/lbrycrd"
"github.com/lbryio/lbry.go/v2/stream" "github.com/lbryio/lbry.go/v2/stream"
@ -251,11 +250,11 @@ func makeClaimAndStream(path string, details Details) (*pb.Claim, stream.Stream,
switch category { switch category {
case "video": case "video":
t, err := streamVideoMetadata(path) //t, err := streamVideoMetadata(path)
if err != nil { //if err != nil {
return nil, nil, err // return nil, nil, err
} //}
streamPB.Type = t streamPB.Type = &pb.Stream_Video{}
case "audio": case "audio":
streamPB.Type = &pb.Stream_Audio{} streamPB.Type = &pb.Stream_Audio{}
case "image": case "image":
@ -289,16 +288,16 @@ func getClaimPayoutScript(name string, value []byte, address btcutil.Address) ([
Script() Script()
} }
func streamVideoMetadata(path string) (*pb.Stream_Video, error) { //func streamVideoMetadata(path string) (*pb.Stream_Video, error) {
mi, err := mediainfo.GetMediaInfo(path) // mi, err := mediainfo.GetMediaInfo(path)
if err != nil { // if err != nil {
return nil, err // return nil, err
} // }
return &pb.Stream_Video{ // return &pb.Stream_Video{
Video: &pb.Video{ // Video: &pb.Video{
Duration: uint32(mi.General.Duration / 1000), // Duration: uint32(mi.General.Duration / 1000),
Height: uint32(mi.Video.Height), // Height: uint32(mi.Video.Height),
Width: uint32(mi.Video.Width), // Width: uint32(mi.Video.Width),
}, // },
}, nil // }, nil
} //}