Browse Source

Remove logging breaking progress bar

master
PrivateGER 3 years ago
parent
commit
7affd6ca21
No known key found for this signature in database GPG Key ID: B9918E382ED08059
  1. 2
      .gitlab-ci.yml
  2. 3
      DirectoryIndexers/DirectoryIndexer.go

2
.gitlab-ci.yml

@ -12,7 +12,7 @@ stages:
compile:
stage: build
script:
- go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/ytdlp-archive-viewer .
- go build -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/ytdlp-archive-viewer .
artifacts:
paths:
- ytdlp-archive-viewer

3
DirectoryIndexers/DirectoryIndexer.go

@ -119,8 +119,6 @@ func filenameToID(filename string) string {
matches := regexp2FindAllString(r, filename)
if len(matches) == 0 {
fmt.Println("Got video without square-bracket ID format. Falling back to youtube-dl 11-char string matching (!THIS MAY CAUSE ISSUES!):", filename)
r = regexp2.MustCompile("-[A-Za-z0-9_-]{11}", regexp2.RegexOptions(0))
matches = regexp2FindAllString(r, filename)
if len(matches) == 0 {
@ -130,7 +128,6 @@ func filenameToID(filename string) string {
// strips first dash away from the result (yes, I know this is DIRTY.
matches = []string{matches[len(matches)-1]}
matches[0] = matches[0][1:]
fmt.Println("Recovered ID:", matches[0])
}
return matches[len(matches)-1] // last element = the id between square brackets
}

Loading…
Cancel
Save