MCPcopy Create free account
hub / github.com/dinofizz/diskplayer / diskplayerId

Function diskplayerId

diskplayer.go:118–126  ·  view source on GitHub ↗

diskplayerId returns the Spotify ID for the Spotify client whose name is provided in the parameter list, or a nil pointer if no matching device is found.

(ds *[]spotify.PlayerDevice, n string)

Source from the content-addressed store, hash-verified

116// diskplayerId returns the Spotify ID for the Spotify client whose name is provided in the parameter list,
117// or a nil pointer if no matching device is found.
118func diskplayerId(ds *[]spotify.PlayerDevice, n string) spotify.ID {
119 for _, d := range *ds {
120 if d.Name == n {
121 return d.ID
122 }
123 }
124
125 return ""
126}

Callers 2

PlayUriFunction · 0.85
PauseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected