Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting input-ipc-server in mpv.conf breaks syncplay #654

Closed
soredake opened this issue Jan 1, 2024 · 2 comments
Closed

Setting input-ipc-server in mpv.conf breaks syncplay #654

soredake opened this issue Jan 1, 2024 · 2 comments

Comments

@soredake
Copy link
Contributor

soredake commented Jan 1, 2024

Describe the bug
When i add input-ipc-server=\\.\pipe\mpvsocket for trakt-scrobbler syncplay can no longer connect to mpv.net instance.

To Reproduce
Steps to reproduce the behavior:

  1. winget install Syncplay.Syncplay mpv.net
  2. Add input-ipc-server=\\.\pipe\mpvsocket to %APPDATA%\mpv.net\mpv.conf
  3. Set mpv.net path in syncplay c:\users\<user>\appdata\local\programs\mpv.net\mpvnet.exe
  4. Launch syncplay
  5. Error "MPV process retry limit reached."

Expected behavior
Syncplay should work and be able to connect to mpv.net instance even if input-ipc-server is set in conf file.

Screenshots
image

Version and platform:

  • OS: [e.g. Windows 10 64-bit or macOS 10.15]
  • Syncplay version and build type: [e.g. Syncplay 1.6.9 portable]
  • Media player and version: [e.g. VLC 3.0.16 32-bit]

Additional context

Unhandled Error
Traceback (most recent call last):
  File "syncplay\client.pyc", line 1710, in showErrorMessage
    
  File "syncplay\ui\gui.pyc", line 928, in showErrorMessage
    
  File "syncplay\vendor\qt5reactor.pyc", line 276, in iterate_qt
    
  File "syncplay\vendor\qt5reactor.pyc", line 363, in iterate
    
--- <exception caught here> ---
  File "twisted\internet\base.pyc", line 1063, in runUntilCurrent
    
  File "twisted\internet\defer.pyc", line 874, in callback
    
  File "twisted\internet\defer.pyc", line 969, in _startRunCallbacks
    
twisted.internet.defer.AlreadyCalledError: 
@soredake
Copy link
Contributor Author

soredake commented Jan 5, 2024

Bing chat helped me create this lua script as a workaround for this problem, so I can use both trakt-scrobbler and syncplay simultaneously:

-- Import the mpv functions
local mp = require 'mp'

-- Function to check the property and set the ipc server
local function check_property_and_set_ipc_server()
    -- Get the value of the 'osd-align-y' property
    local osd_align_y = mp.get_property("osd-align-y")

    -- Print a debug message
    print("osd-align-y is: " .. osd_align_y)

    -- Check if the property is not 'bottom'
    if osd_align_y ~= "bottom" then
        -- Set the 'input-ipc-server' property
        mp.set_property("input-ipc-server", "\\\\.\\pipe\\mpvsocket")

        -- Print a debug message
        print("Set input-ipc-server to \\\\.\\pipe\\mpvsocket")
    else
        -- Print a debug message
        print("osd-align-y is 'bottom', so input-ipc-server was not set")
    end
end

-- Wait for 10 seconds after player start, then call the function
mp.add_timeout(10, check_property_and_set_ipc_server)

-- Print a debug message
print("Script has started, waiting for 10 seconds...")

@Et0h
Copy link
Contributor

Et0h commented Feb 3, 2024

This should now be fixed by #669 as per #529.

@Et0h Et0h closed this as completed Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants