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
# Skip the install step. Don't `go get` dependencies. Only build with the code in vendor/
install:
- apt-get install mediainfo # for go_mediainfo
install: true
# Anything in before_script that returns a nonzero exit code will
# 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/johntdyer/slackrus v0.0.0-20180518184837-f7aae3243a07
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/v2 v2.6.1-0.20200901175808-73382bb02128
github.com/lbryio/types v0.0.0-20191228214437-05a22073b4ec

View file

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