jellyfin / jellyfin-mpv-shim

MPV Cast Client for Jellyfin
Other
1.61k stars 93 forks source link

incorrect mpv_ext_path affects player_name in config.json #111

Open antoniozh opened 4 years ago

antoniozh commented 4 years ago

Describe the bug

When "mpv_ext_path" is entered incorrectly, the "player_name" field will be ignored.

To Reproduce Steps to reproduce the behavior:

  1. Go to config.json
  2. Enter an invalid path for mpv_ext and set a custom player_name
  3. Go to Jellyfin
  4. See incorrect player_name

Expected behavior The player name being passed correctly

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Error Messages Please provide logs, as they are often needed for me to understand and quickly troubleshoot the issue. You can read instructions for how to do so here: https://github.com/iwalton3/jellyfin-mpv-shim/wiki/Sending-Logs

iwalton3 commented 4 years ago

I re-did the config logic to use significantly stricter data validation and error handling in the current git master. Please attempt to re-produce the bug with this version: jellyfin-mpv-desktop_1.8.0_installer.exe

If you still have the issue, please provide logs with that version.

antoniozh commented 4 years ago

Hi, the issue was not fixed, also my symbol bar icon disappeared and direct_paths do not work when ext_path is incorrect

iwalton3 commented 4 years ago

So the problem is if the JSON file itself is bad, instead of just a parameter, the entire config file is ignored and it uses defaults. It is also not possible to know this happened on Windows, as all of the means of being notified are not initialized before the config is read.

I may be switching to a config format more comparable to MPV’s config, but I haven’t considered exactly how it would work. That config would be more tolerant of syntax errors and support comments.

man0000 commented 3 years ago

Hi,

I haven't been able to configure the external player too. Could it be due to this issue?. I have modified this :

"mpv_ext": true, "mpv_ext_path": D:\programs\players\jellyfin\mpv-shim\jellyfin-mpv-shim.exe, "mpv_ext_start": true, "player_name": "mpv",

mpv starts ignoring all changes and shows my PC name in the PLAY ON menu.

Could you, please, let me know what am i doing wrong?.

MANY THANKS...

iwalton3 commented 3 years ago

Replace:

 "mpv_ext_path": D:\programs\players\jellyfin\mpv-shim\jellyfin-mpv-shim.exe,

with:

 "mpv_ext_path": "D:\\programs\\players\\jellyfin\\mpv-shim\\jellyfin-mpv-shim.exe",

I have added a warning in the logs to make it more obvious when JSON decodes fail, which will be in the next release.

man0000 commented 3 years ago

Hi,

Replace done and now I get a [Fatal error detected] window with message 'Failed to execute script run' and shim icon is triplicated in the windows tray.

THANKS...