Add mp3 support + command line option to limit tracks + general redesign for more modularity

This commit is contained in:
r4
2021-06-21 20:37:22 +02:00
parent 42a2034341
commit 5dab3c4e96
6 changed files with 331 additions and 165 deletions

View File

@@ -23,6 +23,7 @@ func (r WaitReader) Read(p []byte) (int, error) {
// Reattempt to read the unread bytes until we can fill `p` completely
// (or an error occurs).
nNew, err := r.r.Read(p[n:len(p)])
// Add new number of read bytes.
n += nNew
if err != nil {
return n, err