aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--music/patch.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/music/patch.go b/music/patch.go
index aba20ec..7b3302d 100644
--- a/music/patch.go
+++ b/music/patch.go
@@ -4,7 +4,6 @@ import (
4 "encoding/xml" 4 "encoding/xml"
5 "fmt" 5 "fmt"
6 "io" 6 "io"
7 "io/ioutil"
8 "net/url" 7 "net/url"
9 "strings" 8 "strings"
10 9
@@ -26,7 +25,7 @@ func Stream2(s *subsonic.Client, id string, parameters map[string]string) (io.Re
26 contentType := response.Header.Get("Content-Type") 25 contentType := response.Header.Get("Content-Type")
27 if strings.HasPrefix(contentType, "text/xml") || strings.HasPrefix(contentType, "application/xml") { 26 if strings.HasPrefix(contentType, "text/xml") || strings.HasPrefix(contentType, "application/xml") {
28 // An error was returned 27 // An error was returned
29 responseBody, err := ioutil.ReadAll(response.Body) 28 responseBody, err := io.ReadAll(response.Body)
30 if err != nil { 29 if err != nil {
31 return nil, err 30 return nil, err
32 } 31 }
@@ -56,7 +55,7 @@ func Download2(s *subsonic.Client, id string) (io.ReadCloser, error) {
56 contentType := response.Header.Get("Content-Type") 55 contentType := response.Header.Get("Content-Type")
57 if strings.HasPrefix(contentType, "text/xml") || strings.HasPrefix(contentType, "application/xml") { 56 if strings.HasPrefix(contentType, "text/xml") || strings.HasPrefix(contentType, "application/xml") {
58 // An error was returned 57 // An error was returned
59 responseBody, err := ioutil.ReadAll(response.Body) 58 responseBody, err := io.ReadAll(response.Body)
60 if err != nil { 59 if err != nil {
61 return nil, err 60 return nil, err
62 } 61 }