-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update recent ProcessStop functionality #2
- Loading branch information
1 parent
8b1b9c7
commit dc680fa
Showing
2 changed files
with
3 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,7 +141,8 @@ func (s *HTTPserver) callbackHandler(tv *soapcalls.TVPayload, screen Screen) htt | |
return | ||
} | ||
|
||
if processStop && newstate == "STOPPED" { | ||
if !processStop && newstate == "STOPPED" { | ||
tv.SetProcessStopTrue(uuid) | ||
fmt.Fprintf(w, "OK\n") | ||
return | ||
} | ||
|
@@ -153,12 +154,11 @@ func (s *HTTPserver) callbackHandler(tv *soapcalls.TVPayload, screen Screen) htt | |
|
||
switch newstate { | ||
case "PLAYING": | ||
tv.SetProcessStopFalse(uuid) | ||
screen.EmitMsg("Playing") | ||
tv.SetProcessStopTrue(uuid) | ||
case "PAUSED_PLAYBACK": | ||
screen.EmitMsg("Paused") | ||
case "STOPPED": | ||
tv.SetProcessStopTrue(uuid) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
alexballas
Author
Owner
|
||
screen.EmitMsg("Stopped") | ||
_ = tv.UnsubscribeSoapCall(uuid) | ||
screen.Fini() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
you'll have probably an unhandled case (like using a remote controller to stop) by not doing this