iamkroot / trakt-scrobbler

Scrobbler for trakt.tv that supports VLC, Plex, MPC-HC, and MPV.
https://github.com/iamkroot/trakt-scrobbler/wiki
GNU General Public License v2.0
464 stars 30 forks source link

[BUG] trakt-scrobbler stops working with mpv pipes after getting 'All pipe instances are busy.' error #299

Closed soredake closed 5 months ago

soredake commented 6 months ago

Describe the bug

trakt-scrobbler stops working with mpv pipes after getting 'All pipe instances are busy.' error. I need to restart trakt-scrobbler to make it work again after this error.

Desktop (please complete the following information):

To Reproduce

Steps to reproduce the behavior:

  1. Install latest mpv-git and syncplay
  2. Configure mpv-git in syncplay
  3. Configure trakt-scrobbler (allowed paths and socket)
  4. Add --input-ipc-server=\\.\pipe\mpvSyncplaySocket to player arguments in syncplay
  5. Join some room
  6. Use syncplay
  7. Sooner or later this error will appear, rendering trakt-scrobbler unable to use mpv sockets until restarted

Log file

Click to see log contents

``` 2024-05-22 17:02:44,722 - DEBUG - syncplay@mpv - mpv - Pipe closed. 2024-05-22 17:02:44,824 - ERROR - syncplay@mpv - __init__ - Unhandled exception Traceback (most recent call last): File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner self.run() File "C:\Users\user\AppData\Local\pipx\pipx\venvs\trakt-scrobbler\Lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 80, in run self.conn_loop() File "C:\Users\user\AppData\Local\pipx\pipx\venvs\trakt-scrobbler\Lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 302, in conn_loop self.file_handle = win32file.CreateFile( ^^^^^^^^^^^^^^^^^^^^^ pywintypes.error: (231, 'CreateFile', 'Âñå êîïèè êàíàëà çàíÿòû.') ```

iamkroot commented 5 months ago

I've pushed a fix just now. Try- Install from branch:

  1. Stop the scrobbler with trakts stop
  2. Run pipx install --force --pip-args='--force-reinstall' git+https://github.com/iamkroot/trakt-scrobbler.git@master
  3. Start scrobbler with trakts start