diff --git a/downloader/downloader.go b/downloader/downloader.go index 00d6868..1fe120e 100644 --- a/downloader/downloader.go +++ b/downloader/downloader.go @@ -285,7 +285,8 @@ func runCmd(cmd *exec.Cmd, stopChan stop.Chan) ([]string, error) { return nil, errors.Err("interrupted by user") case err := <-done: if err != nil { - return nil, errors.Prefix("yt-dlp "+strings.Join(cmd.Args, " ")+" ["+string(errorLog)+"]", err) + //return nil, errors.Prefix("yt-dlp "+strings.Join(cmd.Args, " ")+" ["+string(errorLog)+"]", err) + return nil, errors.Prefix(string(errorLog), err) } return strings.Split(strings.Replace(string(outLog), "\r\n", "\n", -1), "\n"), nil } diff --git a/downloader/downloader_test.go b/downloader/downloader_test.go index a6bcd6b..21bd9de 100644 --- a/downloader/downloader_test.go +++ b/downloader/downloader_test.go @@ -26,13 +26,10 @@ func TestGetVideoInformation(t *testing.T) { s := stop.New() ip, err := ip_manager.GetIPPool(s) assert.NoError(t, err) - video, err := GetVideoInformation("zT_c6YhkXow", s.Ch(), ip) - if err != nil { - logrus.Error(err) - } - if video != nil { - logrus.Info(video.ID) - } + video, err := GetVideoInformation("kDGOHNpRjzc", s.Ch(), ip) + assert.NoError(t, err) + assert.NotNil(t, video) + logrus.Info(video.ID) } func Test_getUploadTime(t *testing.T) { diff --git a/shared/shared.go b/shared/shared.go index c50f947..5911bbd 100644 --- a/shared/shared.go +++ b/shared/shared.go @@ -78,6 +78,7 @@ var ErrorsNoRetry = []string{ "giving up after 0 fragment retries", "Sorry about that", "This video is not available", + "Video unavailable", "requested format not available", "interrupted by user", "Sign in to confirm your age", @@ -117,6 +118,7 @@ var NeverRetryFailures = []string{ "Playback on other websites has been disabled by the video owner", "uploader has not made this video available in your country", "This video has been removed by the uploader", + "Video unavailable", } type SyncFlags struct {