To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit a1385d16 authored by Christof Gerber's avatar Christof Gerber
Browse files

youtube cmd log level Info -> Debug. gitlab-ci: add .yml file. Set badges. Document requirements

parent a3e33c62
Pipeline #35014 failed with stages
in 4 minutes and 8 seconds
......@@ -63,7 +63,7 @@ func (e ErrYoutubeDL) Error() string {
func runYoutubeDL(args []string) (output []byte, err error) {
cmd := exec.Command("youtube-dl", args...)
log.Info(args)
log.Debug(args)
output, err = cmd.CombinedOutput()
log.Trace(string(output))
if err != nil {
......@@ -289,9 +289,9 @@ func GetVideoURL(id string) (video *url.URL, audio *url.URL, err error) {
}
// run command
//log.Println(args)
cmd := exec.Command("youtube-dl", args...)
out, err := cmd.Output()
log.Info(string(out))
if err != nil {
return nil, nil, err
}
......
......@@ -2,7 +2,6 @@ package youtubedl
import (
"fmt"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"os"
"path/filepath"
......@@ -110,8 +109,6 @@ func TestAutomaticCaptionDownload(t *testing.T) {
}
func TestGetSubtitle(t *testing.T) {
log.SetFormatter(&log.JSONFormatter{})
log.SetLevel(log.InfoLevel)
sub, err := GetSubtitle(false, "OsFEV35tWsg", "en")
assert.Equal(t, nil, err)
assert.Equal(t, "Philosophers, dramatists, theologians", sub.Items[0].String())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment