add clean interruption

change how post requests are made
add better support for channel updates
This commit is contained in:
Niko Storni 2018-05-23 20:32:11 -04:00
parent 47a9b6e0d1
commit e29a4093ec

View file

@ -72,6 +72,16 @@ type Sync struct {
queue chan video
}
// IsInterrupted can be queried to discover if the sync process was interrupted manually
func (s *Sync) IsInterrupted() bool {
select {
case <-s.stop.Chan():
return true
default:
return false
}
}
func (s *Sync) FullCycle() error {
var err error
if os.Getenv("HOME") == "" {