Update tooling and fix build issues
- Migrate golangci-lint config to v2 format - Update GitHub Actions: checkout v3→v4, Go 1.24→1.25 - Update golangci-lint-action v6→v9 with golangci-lint v2.8 - Fix dlnaplayer.go: use RequestHandler interface for go-upnpcast - Fix go.mod replace directive version mismatch for fyne fork
This commit is contained in:
@@ -99,12 +99,12 @@ func NewDLNAPlayer(device *device.MediaRenderer) (*DLNAPlayer, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
avt.HTTPClient = cli
|
||||
avt.RequestHandler = httpClientHandler{cli}
|
||||
rc, err := device.RenderingControlClient()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rc.HTTPClient = cli
|
||||
rc.Requesthandler = cli
|
||||
|
||||
// ping to test connectivity
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
@@ -650,6 +650,15 @@ func (d *DLNAPlayer) _updateProxyURL(key, url string) {
|
||||
d.proxyURLs[len(d.proxyURLs)-1] = proxyMapEntry{key: key, url: url}
|
||||
}
|
||||
|
||||
// httpClientHandler wraps an http.Client to implement services.RequestHandler
|
||||
type httpClientHandler struct {
|
||||
client *http.Client
|
||||
}
|
||||
|
||||
func (h httpClientHandler) Do(req *http.Request) (*http.Response, error) {
|
||||
return h.client.Do(req)
|
||||
}
|
||||
|
||||
type retryLogger struct{}
|
||||
|
||||
func (retryLogger) Error(msg string, keysAndValues ...any) {
|
||||
|
||||
Reference in New Issue
Block a user