erdnaxeli / castblock

Automatically skip sponsor segments and ads in YouTube videos playing on Chromecast.
MIT License
183 stars 20 forks source link

SocketError while connection to go-chromecast #11

Closed erdnaxeli closed 3 years ago

erdnaxeli commented 3 years ago
$ docker run --rm --network host erdnaxeli/castblock
2021-05-07T16:04:34.339234Z   INFO - castblock.chromecast: Found go-chromecast at /usr/bin/go-chromecast.
2021-05-07T16:04:34.340046Z   INFO - castblock.chromecast: Starting the go-chromecast server.
Unhandled exception: Error connecting to '127.0.0.1:8011': Connection refused (Socket::ConnectError)
  from usr/share/crystal/src/socket/addrinfo.cr:73:15 in 'io'
  from usr/share/crystal/src/http/client.cr:664:19 in 'exec_internal_single'
  from usr/share/crystal/src/http/client.cr:586:16 in 'exec'
  from src/src/chromecast.cr:26:5 in 'watch_new_devices'
  from src/src/blocker.cr:15:0 in 'run'
  from src/src/castblock.cr:26:7 in 'run'
  from src/src/castblock.cr:42:7 in 'run'
  from src/src/castblock.cr:47:1 in '__crystal_main'
  from usr/share/crystal/src/crystal/main.cr:39:9 in 'main'
  from __libc_start_main

It seems that sometimes we are to quick for go-chromecast. It should wait and retry.