add clean interruption
change how post requests are made add better support for channel updates
This commit is contained in:
parent
47a9b6e0d1
commit
e29a4093ec
1 changed files with 10 additions and 0 deletions
10
ytsync.go
10
ytsync.go
|
@ -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") == "" {
|
||||
|
|
Loading…
Reference in a new issue