Skip to content

Commit

Permalink
metadata tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
porjo committed Apr 13, 2024
1 parent def6f58 commit e371b87
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ func getYTProgress(v string) *Progress {

func getOpusFileSize(ctx context.Context, info Info, outCh chan<- Msg, errCh chan error, filename, webPath string) {
var startTime time.Time
//ffprobeRan := false
streamURLSent := false
for {
select {
case <-ctx.Done():
Expand All @@ -599,22 +599,12 @@ func getOpusFileSize(ctx context.Context, info Info, outCh chan<- Msg, errCh cha
continue
}

// wait until we have some data before running ffprobe
//if !ffprobeRan && opusFI.Size() > 10000 {
if opusFI.Size() > 10000 {
/*
ff, err := runFFprobe(ctx, FFprobeCmd, filename, time.Second*10)
if err != nil {
// FIXME this blocks as nobody is reading
errCh <- err
return
}
ffprobeRan = true
info.Title, info.Artist, info.Description = titleArtistDescription(ff)
*/
// wait until we have some data before sending stream URL
if !streamURLSent && opusFI.Size() > 10000 {
info.DownloadURL = filepath.Join(webPath, "stream", "t", filepath.Base(filename))
m := Msg{Key: "link_stream", Value: info}
outCh <- m
streamURLSent = true
}

if startTime.IsZero() {
Expand Down

0 comments on commit e371b87

Please sign in to comment.