Skip to content

Commit 9198dc8

Browse files
committed
Roku: Update IP if exists
1 parent 04fb250 commit 9198dc8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modRoku.vb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Public Module modRoku
1919
modDatabase.Execute("INSERT INTO DEVICES (Name, Type, Model, Location, Address) VALUES('" & strFriendlyName & " Roku', 'Roku', '" & strModel & "', '" & strFriendlyName & "', '" & strAddress & "')")
2020
Return "Device added"
2121
Else
22-
Return "Device already exists"
22+
modDatabase.Execute("UPDATE DEVICES SET Address = """ & strAddress & """ WHERE Type = ""Roku"" AND Model = """ & strModel & """")
23+
Return "Device already exists, updating address"
2324
End If
2425
End Function
2526

0 commit comments

Comments
 (0)