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
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ func (s *Song) GetFileName(resourceType string, song *Song, media *Media) string
|
|||||||
}
|
}
|
||||||
trackNumber := ""
|
trackNumber := ""
|
||||||
if resourceType == "album" {
|
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{})
|
fileName, _ = filenamify.Filenamify(fileName, filenamify.Options{})
|
||||||
|
|
||||||
return fileName
|
return fileName
|
||||||
|
|||||||
Reference in New Issue
Block a user