I'm trying to announce Artist and Tack Name when song change.
For some reason I get "Running script LRCurrentSongAnounsment.vb :method not found"
Here is the script:
Sub Main(ZoneName as string)
What I'm doing wrong?
For some reason I get "Running script LRCurrentSongAnounsment.vb :method not found"
Here is the script:
Sub Main(ZoneName as string)
Dim MusicApi
Try
End SubTry
Dim pi As Object
pi = hs.Plugin("SONOSCONTROLLER")
If pi Is Nothing Then
MusicApi = pi.GetMusicAPI(ZoneName )
hs.Speak( MusicApi.CurrentArtist )
hs.Speak( MusicApi.CurrentTrack )
Catch ex As Exceptionpi = hs.Plugin("SONOSCONTROLLER")
If pi Is Nothing Then
hs.writelog("Script", "empty")
Exit sub
End IfExit sub
MusicApi = pi.GetMusicAPI(ZoneName )
hs.Speak( MusicApi.CurrentArtist )
hs.Speak( MusicApi.CurrentTrack )
hs.writelog("Script", "Music API not found")
Exit sub
End TryExit sub
What I'm doing wrong?
Comment