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)
| 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. |
| 118 | func 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 | } |