From a084330055ec1c537a1df9a1145094dbd9b83885 Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Mon, 5 Oct 2020 18:28:41 -0400 Subject: [PATCH] drop mediainfo requirement since travis cant install it --- .travis.yml | 3 +-- go.mod | 1 - publish/publish.go | 37 ++++++++++++++++++------------------- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index eef2128..ce80303 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/go.mod b/go.mod index f3ce4c6..c78bc15 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/publish/publish.go b/publish/publish.go index 13b643c..417978e 100644 --- a/publish/publish.go +++ b/publish/publish.go @@ -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 +//}