Emby/Jellyfin 调用外部本地播放器,并回传播放记录。适配 Plex。
< Feedback op embyToLocalPlayer
看日志应该是路径没设置好,但ini文件里我也填好播放器位置了
Python 3.10.11
E:\电脑软件\python\python.exe
press a number
1: run in console
2: run in background and add to startup folder
3: open startup folder
4: path translate helper
5: copy script path to clipboard
6: update to latest version
press a number 1
you have pressed one
09/21/23 14:17:23 ['Python path: E:\\电脑软件\\python\\python.exe']
09/21/23 14:17:23 ['ini path: E:\\电脑工具\\emby\\油猴插件\\embyToLocalPlayer\\embyToLocalPlayer_config.ini']
09/21/23 14:17:23 Windows-10-10.0.19045-SP0 Python-3.10.11
09/21/23 14:17:25 E:\电脑工具\emby\油猴插件\embyToLocalPlayer\embyToLocalPlayer.py
09/21/23 14:17:25 serving at 127.0.0.1:58000
127.0.0.1 - - [21/Sep/2023 14:17:56] "POST /embyToLocalPlayer/ HTTP/1.1" 200 -
09/21/23 14:17:56 server=emby mount_disk_mode=True
09/21/23 14:17:56 ["loca_mix_host_:8096 match: gui[except_host] ['localhost', '127.0.0.1', '192.168.', '192-168-', 'example.com:8096']"]
Exception in thread Thread-5 (start_play):
Traceback (most recent call last):
File "E:\电脑软件\python\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "E:\电脑软件\python\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\embyToLocalPlayer.py", line 89, in start_play
cmd = get_player_cmd(media_path=data['media_path'], file_path=file_path)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\tools.py", line 199, in get_player_cmd
exe = config['exe'][player]
File "E:\电脑软件\python\lib\configparser.py", line 1259, in __getitem__
raise KeyError(key)
KeyError: 'E:\\ruanjian\\mpv.net_CM\\mpvnet\\mpvnet.exe'
09/21/23 14:17:56 send 2 requests, update done, used time: 0.008001565933227539
09/21/23 14:17:56 version_filter: KeyError: some ep not IndexNumber
Exception in thread Thread-6 (list_episodes):
Traceback (most recent call last):
File "E:\电脑软件\python\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\tools.py", line 68, in run
self._return = self._target(*self._args, **self._kwargs)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 382, in list_episodes
episodes = [parse_item(i) for i in episodes]
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 382, in
episodes = [parse_item(i) for i in episodes]
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 356, in parse_item
data['ParentIndexNumber'] = item['ParentIndexNumber']
KeyError: 'ParentIndexNumber'
[emby]
# 选择播放器
player = mpv
改成这个。
你播放的这个剧集命名不正确吧,有没有正确识别季和第几集?
拿电影试一下
谢谢!现在能打开了。不过请问这个是不支持魔法吗?我发现把魔法关了之后播就正常了
支持的。看下代理日志,你是本机的,按理是走直连。
这是我开了魔法后,页面闪退的日志
Python 3.10.11
E:\电脑软件\python\python.exe
press a number
1: run in console
2: run in background and add to startup folder
3: open startup folder
4: path translate helper
5: copy script path to clipboard
6: update to latest version
press a number 1
you have pressed one
09/22/23 21:30:22 ['Python path: E:\\电脑软件\\python\\python.exe']
09/22/23 21:30:22 ['ini path: E:\\电脑工具\\emby\\油猴插件\\embyToLocalPlayer\\embyToLocalPlayer_config.ini']
09/22/23 21:30:22 Windows-10-10.0.19045-SP0 Python-3.10.11
system proxy: http://127.0.0.1:7891
system proxy: http://127.0.0.1:7891
09/22/23 21:30:24 E:\电脑工具\emby\油猴插件\embyToLocalPlayer\embyToLocalPlayer.py
09/22/23 21:30:24 serving at 127.0.0.1:58000
127.0.0.1 - - [22/Sep/2023 21:30:26] "POST /embyToLocalPlayer/ HTTP/1.1" 200 -
system proxy: http://127.0.0.1:7891
09/22/23 21:30:26 server=emby mount_disk_mode=False
09/22/23 21:30:26 ["loca_mix_host_:8096 match: gui[except_host] ['localhost', '127.0.0.1', '192.168.', '192-168-', 'example.com:8096']"]
09/22/23 21:30:26 ['E:\\ruanjian\\mpv.net_CM\\mpvnet\\mpvnet.exe', 'http://loca_mix_host_:8096/emby/videos/2809/stream.mkv?DeviceId=642c809d-e0c3-49dd-af1a-f77dffa115a2&MediaSourceId=8eca6920d7efe56de80dee8862e44ec4&Static=true&PlaySessionId=d6e7c401f8504c66bd1afc5bb9890e32&api_key=_hide_api_key_'] cmd
09/22/23 21:30:26 ["loca_mix_host_:8096 match: playlist[enable_host] ['localhost', '127.0.0.1', '192.168.', '192-168-', 'example.com:8096']"]
09/22/23 21:30:26 ['E:\\ruanjian\\mpv.net_CM\\mpvnet\\mpvnet.exe', 'http://loca_mix_host_:8096/emby/videos/2809/stream.mkv?DeviceId=642c809d-e0c3-49dd-af1a-f77dffa115a2&MediaSourceId=8eca6920d7efe56de80dee8862e44ec4&Static=true&PlaySessionId=d6e7c401f8504c66bd1afc5bb9890e32&api_key=_hide_api_key_', '--http-proxy=http://127.0.0.1:7891', '--force-media-title= 无职转生 ~到了异世界就拿出真本事~ NCED1.mkv', '--osd-playing-msg=无职转生 ~到了异世界就拿出真本事~ NCED1.mkv', '--start=0', '--input-ipc-server=\\\\.\\pipe\\pipe_nameA', '--fullscreen=yes']
09/22/23 21:30:26 send 2 requests, update done, used time: 0.013003349304199219
09/22/23 21:30:26 version_filter: KeyError: some ep not IndexNumber
Exception in thread Thread-6 (list_episodes):
Traceback (most recent call last):
File "E:\电脑软件\python\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\tools.py", line 68, in run
self._return = self._target(*self._args, **self._kwargs)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 382, in list_episodes
episodes = [parse_item(i) for i in episodes]
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 382, in
episodes = [parse_item(i) for i in episodes]
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 356, in parse_item
data['ParentIndexNumber'] = item['ParentIndexNumber']
KeyError: 'ParentIndexNumber'
09/22/23 21:30:27 version_filter: KeyError: some ep not IndexNumber
Exception in thread Thread-5 (start_play):
Traceback (most recent call last):
File "E:\电脑软件\python\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "E:\电脑软件\python\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\embyToLocalPlayer.py", line 106, in start_play
player_manager.playlist_add(eps_data=eps_data)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\players.py", line 57, in playlist_add
self.playlist_data = playlist_fun[self.player_name](data=data, eps_data=eps_data, **self.player_kwargs)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\players.py", line 207, in playlist_add_mpv
episodes = eps_data or list_episodes(data)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 382, in list_episodes
episodes = [parse_item(i) for i in episodes]
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 382, in
episodes = [parse_item(i) for i in episodes]
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 356, in parse_item
data['ParentIndexNumber'] = item['ParentIndexNumber']
KeyError: 'ParentIndexNumber'
你播放的这个剧集命名不正确吧,有没有正确识别季和第几集?
ini > dev > use_system_proxy > no
前面因为能打开所以就没有去改名字了,现在我重命名后依旧出现闪退情况
Python 3.10.11
E:\电脑软件\python\python.exe
press a number
1: run in console
2: run in background and add to startup folder
3: open startup folder
4: path translate helper
5: copy script path to clipboard
6: update to latest version
press a number 1
you have pressed one
09/22/23 22:22:06 ['Python path: E:\\电脑软件\\python\\python.exe']
09/22/23 22:22:06 ['ini path: E:\\电脑工具\\emby\\油猴插件\\embyToLocalPlayer\\embyToLocalPlayer_config.ini']
09/22/23 22:22:06 Windows-10-10.0.19045-SP0 Python-3.10.11
system proxy: http://127.0.0.1:7891
system proxy: http://127.0.0.1:7891
09/22/23 22:22:08 E:\电脑工具\emby\油猴插件\embyToLocalPlayer\embyToLocalPlayer.py
09/22/23 22:22:08 serving at 127.0.0.1:58000
127.0.0.1 - - [22/Sep/2023 22:22:11] "POST /embyToLocalPlayer/ HTTP/1.1" 200 -
system proxy: http://127.0.0.1:7891
09/22/23 22:22:11 server=emby mount_disk_mode=False
09/22/23 22:22:11 ["loca_mix_host_:8096 match: gui[except_host] ['localhost', '127.0.0.1', '192.168.', '192-168-', 'example.com:8096']"]
09/22/23 22:22:11 ['E:\\ruanjian\\mpv.net_CM\\mpvnet\\mpvnet.exe', 'http://loca_mix_host_:8096/emby/videos/3572/stream.mp4?DeviceId=642c809d-e0c3-49dd-af1a-f77dffa115a2&MediaSourceId=0d1b639b08e34d98e6ea39de652219e8&Static=true&PlaySessionId=b26e8973297243ea91c60bb53f33fb66&api_key=_hide_api_key_'] cmd
09/22/23 22:22:11 ["loca_mix_host_:8096 match: playlist[enable_host] ['localhost', '127.0.0.1', '192.168.', '192-168-', 'example.com:8096']"]
09/22/23 22:22:11 ['E:\\ruanjian\\mpv.net_CM\\mpvnet\\mpvnet.exe', 'http://loca_mix_host_:8096/emby/videos/3572/stream.mp4?DeviceId=642c809d-e0c3-49dd-af1a-f77dffa115a2&MediaSourceId=0d1b639b08e34d98e6ea39de652219e8&Static=true&PlaySessionId=b26e8973297243ea91c60bb53f33fb66&api_key=_hide_api_key_', '--http-proxy=http://127.0.0.1:7891', '--force-media-title=Akame ga Kill!01.mp4', '--osd-playing-msg=Akame ga Kill!01.mp4', '--start=0', '--input-ipc-server=\\\\.\\pipe\\pipe_nameA', '--fullscreen=yes']
09/22/23 22:22:11 send 2 requests, update done, used time: 0.009001016616821289
09/22/23 22:22:11 version_filter: KeyError: some ep not IndexNumber
Exception in thread Thread-6 (list_episodes):
Traceback (most recent call last):
File "E:\电脑软件\python\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\tools.py", line 68, in run
self._return = self._target(*self._args, **self._kwargs)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 382, in list_episodes
episodes = [parse_item(i) for i in episodes]
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 382, in
episodes = [parse_item(i) for i in episodes]
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 356, in parse_item
data['ParentIndexNumber'] = item['ParentIndexNumber']
KeyError: 'ParentIndexNumber'
09/22/23 22:22:12 version_filter: KeyError: some ep not IndexNumber
Exception in thread Thread-5 (start_play):
Traceback (most recent call last):
File "E:\电脑软件\python\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "E:\电脑软件\python\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\embyToLocalPlayer.py", line 106, in start_play
player_manager.playlist_add(eps_data=eps_data)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\players.py", line 57, in playlist_add
self.playlist_data = playlist_fun[self.player_name](data=data, eps_data=eps_data, **self.player_kwargs)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\players.py", line 207, in playlist_add_mpv
episodes = eps_data or list_episodes(data)
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 382, in list_episodes
episodes = [parse_item(i) for i in episodes]
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 382, in
episodes = [parse_item(i) for i in episodes]
File "E:\电脑工具\emby\油猴插件\embyToLocalPlayer\utils\net_tools.py", line 356, in parse_item
data['ParentIndexNumber'] = item['ParentIndexNumber']
KeyError: 'ParentIndexNumber'
重命名后要扫描媒体库。你这个问题在于emby上没第几季和第几集。
简单解决方法。ini配置里删掉播放列表的部分。这样子应该还是会报错,但不影响回传和播放。
更新了,重新下载zip试试看
我刚刚下载了最新的zip,然后按照动漫英文名➡动漫名+S1➡动漫名+剧集的流程重命名了一次。并且删除了播放列表的部分以及重启软件。依旧还是有问题,是我哪里还没弄好吗?
Python 3.10.11
E:\电脑软件\python\python.exe
press a number
1: run in console
2: run in background and add to startup folder
3: open startup folder
4: path translate helper
5: copy script path to clipboard
press a number 1
you have pressed one
09/24/23 21:19:36 ['Python path: E:\\电脑软件\\python\\python.exe']
09/24/23 21:19:36 ['ini path: E:\\电脑工具\\emby\\油猴插件\\embyToLocalPlayer\\embyToLocalPlayer_config.ini']
09/24/23 21:19:36 Windows-10-10.0.19045-SP0 Python-3.10.11
system proxy: http://127.0.0.1:7891
system proxy: http://127.0.0.1:7891
09/24/23 21:19:38 E:\电脑工具\emby\油猴插件\embyToLocalPlayer\embyToLocalPlayer.py
09/24/23 21:19:38 serving at 127.0.0.1:58000
127.0.0.1 - - [24/Sep/2023 21:19:40] "POST /embyToLocalPlayer/ HTTP/1.1" 200 -
system proxy: http://127.0.0.1:7891
09/24/23 21:19:40 server=emby mount_disk_mode=False
09/24/23 21:19:40 ["loca_mix_host_:8096 match: gui[except_host] ['localhost', '127.0.0.1', '192.168.', '192-168-', 'example.com:8096']"]
09/24/23 21:19:40 ['E:\\ruanjian\\mpv.net_CM\\mpvnet\\mpvnet.exe', 'http://loca_mix_host_:8096/emby/videos/4146/stream.mp4?DeviceId=642c809d-e0c3-49dd-af1a-f77dffa115a2&MediaSourceId=5a7e7396400071bf317026b007659acd&Static=true&PlaySessionId=a7df58930378481bb30ea1f3f1763822&api_key=_hide_api_key_'] cmd
09/24/23 21:19:40 ['loca_mix_host_:8096 not match: playlist[enable_host] []']
09/24/23 21:19:40 ['E:\\ruanjian\\mpv.net_CM\\mpvnet\\mpvnet.exe', 'http://loca_mix_host_:8096/emby/videos/4146/stream.mp4?DeviceId=642c809d-e0c3-49dd-af1a-f77dffa115a2&MediaSourceId=5a7e7396400071bf317026b007659acd&Static=true&PlaySessionId=a7df58930378481bb30ea1f3f1763822&api_key=_hide_api_key_', '--http-proxy=http://127.0.0.1:7891', '--force-media-title=OVERLORD 01.mp4', '--osd-playing-msg=OVERLORD 01.mp4', '--start=0', '--input-ipc-server=\\\\.\\pipe\\pipe_nameA', '--fullscreen=yes']
09/24/23 21:19:40 send 2 requests, update done, used time: 0.03500795364379883
..09/24/23 21:19:42 mpv exit, return stop sec
09/24/23 21:19:42 stop_sec None
如果你是打开播放器后手动秒关,可能会来不及获取播放时间。
如果是播放器自己闪退,换原版mpv试试看。
日志没报错,和命名没关系了。
好的,谢谢!我之后再换原版试试
检查 mpv 日志。
mpv.conf > log-file = <save path>
请问找不到兼容的流怎么解决?