Greasy Fork is available in English.

embyToLocalPlayer

Emby/Jellyfin 调用外部本地播放器,并回传播放记录。适配 Plex。

< Feedback em embyToLocalPlayer

Avaliação: Bom - o script funciona

§
Publicado: 19/08/2023

Windows用户,ini文件已修改,python三种安装方式都尝试了,还是无法运行。点击bat会一闪而过,但实际没有运行,单独跑py文件也没跑起来,下面是完整日志

PS D:\Program Files\embyToLocalPlayer_2> python "D:\Program Files\embyToLocalPlayer_2\embyToLocalPlayer.py"
08/19/23 22:42 ['Python path: C:\\Users\\_hide_user_\\miniconda3\\python.exe']
08/19/23 22:42 ['ini path: D:\\Program Files\\embyToLocalPlayer_2\\embyToLocalPlayer_config.ini']
08/19/23 22:42 Windows-10-10.0.19045-SP0 Python-3.11.4
Traceback (most recent call last):
  File "D:\Program Files\embyToLocalPlayer_2\embyToLocalPlayer.py", line 127, in <module>
    kill_multi_process(name_re=f'(embyToLocalPlayer.py|autohotkey_tool|' +
  File "D:\Program Files\embyToLocalPlayer_2\utils\tools.py", line 100, in kill_multi_process
    pid_cmd = list_pid_and_cmd(name_re)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\embyToLocalPlayer_2\utils\windows_tool.py", line 21, in list_pid_and_cmd
    proc = subprocess.run(['powershell', '-Command', cmd], capture_output=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xin\miniconda3\Lib\subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xin\miniconda3\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\xin\miniconda3\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
kjtsuneAutor
§
Publicado: 19/08/2023
Editado: 19/08/2023

原因:cmd 环境里找不到 powershell。
测试方法:cmd 里,运行 powershell -command "Write-Host 'Hello, World!'" 是否显示 Hello, World
解决方法1:用户和系统的环境变量里,都添加 powershell 所在的文件夹。
解决方法2:ini文件里。kill_process_at_start = no。但若需要重启脚本的时候,要先手动任务管理器杀死旧脚本进程

§
Publicado: 20/08/2023

感谢,成功运行了

Publicar resposta

Faça o login para publicar uma resposta.