fix: adjust stream timeout and filename spacing
This commit is contained in:
@@ -169,7 +169,10 @@ func (c *Client) GetMediaStream(ctx context.Context, media *Media, songID string
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resp, err := c.Session.HttpClient.Do(req)
|
||||
streamingClient := *c.Session.HttpClient
|
||||
streamingClient.Timeout = 0
|
||||
|
||||
resp, err := streamingClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ func (s *Song) GetFileName(resourceType string, song *Song, media *Media) string
|
||||
}
|
||||
trackNumber := ""
|
||||
if resourceType == "album" {
|
||||
trackNumber = song.TrackNumber + "."
|
||||
trackNumber = song.TrackNumber + ". "
|
||||
}
|
||||
|
||||
fileName := fmt.Sprintf("%s %s - %s.%s", trackNumber, s.Artist, s.GetTitle(), ext)
|
||||
fileName := fmt.Sprintf("%s%s - %s.%s", trackNumber, s.Artist, s.GetTitle(), ext)
|
||||
fileName, _ = filenamify.Filenamify(fileName, filenamify.Options{})
|
||||
|
||||
return fileName
|
||||
|
||||
Reference in New Issue
Block a user