Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kjtsune committed Oct 4, 2023
1 parent 1e392c7 commit 2a489ee
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 36 deletions.
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* 网页闪一下是自动关闭兼容流提示。
* 播放器要退出触发回传进度。
* 碰到问题先参考下方相关 FAQ。
* **碰到问题先参考下方相关 FAQ**

> Windows
Expand All @@ -55,19 +55,20 @@

> macOS
macOS 可能无法开机自启

1. 刚才保存的文件夹 > 右击 > 新建位于文件夹的终端窗口 `chmod +x *.command` 回车。
2. 双击 `emby_script_run.command`, 若无报错,可播放测试。
3. 开机自启(无窗口运行):
1. 使用Homebrew安装screen。
`brew install screen`
如果你没有安装 Homebrew,请先安装 Homebrew。
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```
1.
* 方案一:直接进入下一步,但估计只适用于 Monterey 12 及之前的老版本系统。
* 方案二:使用 Homebrew 安装 screen。
`brew install screen`
如果你没有安装 Homebrew,请先安装 Homebrew。
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```
2. 启动台 > 自动操作 > 文件 > 新建 > 应用程序 > 运行 Shell 脚本 >
把 `emby_script_run_background.command` 文件拖入 > 点击运行后测试播放 > 文件 > 存储 > 取名并保存到应用程序。
把 `emby_script_run.command`(方案一)| `emby_script_run_via_screen.command`(方案二) 文件拖入 >
点击运行后测试播放 > 文件 > 存储 > 取名并保存到应用程序。
3. 启动台 > 刚才的应用 > 双击后台运行后再次播放测试。
4. 系统偏好设置 > 用户与群组 > 登录项 > 添加刚才的应用。
5. 如果 Monterey 12.6.6 状态栏有齿轮,把文件拖入的操作替换成写以下内容,注意更改cd目录为你保存的目录。
Expand All @@ -83,6 +84,9 @@ macOS 可能无法开机自启
### FAQ
**如果排版有问题,请到 GitHub 查看。**
https://github.com/kjtsune/embyToLocalPlayer#faq
<details>
<summary>通用 FAQ</summary>
Expand Down Expand Up @@ -143,26 +147,26 @@ macOS 可能无法开机自启
* vlc:
* mpc: be: 播放列表条目超过10个可能会卡住,hc 没这问题。
* pot: 若日志显示`KeyError: 'stream.mkv'`,看下方 FAQ。
pot: 下一集无法添加 http 外挂字幕。
pot: 采用连播模式解决:播放列表下一集无法添加 http 外挂字幕。
* macOS
* mpv:
* iina: 仅读盘模式支持并可回传
* vlc: 下一集无法添加 http 外挂字幕。
* vlc: 采用连播模式解决:播放列表下一集无法添加 http 外挂字幕。
* Linux
* mpv:
* vlc: 下一集无法添加 http 外挂字幕。
* vlc: 采用连播模式解决:播放列表下一集无法添加 http 外挂字幕。
</details>
### 观看记录存储服务相关
<details>
<summary>观看记录存储服务相关</summary>
### 观看记录存储服务相关
> 通用 FAQ
* Clash for Windows 用户:
Expand Down Expand Up @@ -219,11 +223,11 @@ macOS 可能无法开机自启
</details>
### 播放器相关:
<details>
<summary>播放器相关</summary>
### 播放器相关:
> mpv
* 日志正常调用却无法播放:
Expand Down Expand Up @@ -272,11 +276,11 @@ macOS 可能无法开机自启
</details>
### 其他:
<details>
<summary>其他</summary>
### 其他:
> Jellyfin 相关
* 首页播放结束后,10秒内重复播放**同文件**,本地播放器收到的播放时间会有误。
Expand Down
12 changes: 6 additions & 6 deletions emby_script_run_background.command → emby_script_run_via_screen.command
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ echo run in "$script_folder"
cd "$script_folder" || (echo cd faild && exit)

#后台运行
screenName="jellyfin"
screen_name="etlp"

if [ $(screen -ls | grep -c $screenName) -ne 0 ]; then
screen -S $screenName -X quit
if [ $(screen -ls | grep -c $screen_name) -ne 0 ]; then
screen -S $screen_name -X quit
fi

screen -dmS $screenName
screen -x $screenName -p 0 -X stuff "python3 embyToLocalPlayer.py"
screen -x $screenName -p 0 -X stuff $'\n'
screen -dmS $screen_name
screen -x $screen_name -p 0 -X stuff "python3 embyToLocalPlayer.py"
screen -x $screen_name -p 0 -X stuff $'\n'
29 changes: 18 additions & 11 deletions user_script/embyToLocalPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// @name:zh-CN embyToLocalPlayer
// @name:en embyToLocalPlayer
// @namespace https://github.com/kjtsune/embyToLocalPlayer
// @version 1.1.9.2
// @description 需要 Python。Emby 调用外部本地播放器,并回传播放记录。适配 Jellyfin Plex。
// @description:zh-CN 需要 Python。Emby 调用外部本地播放器,并回传播放记录。适配 Jellyfin Plex。
// @description:en Require Python. Play in an external player. Update watch history to emby server. Support Jellyfin Plex.
// @version 1.1.10
// @description 需要 Python。Emby/Jellyfin 调用外部本地播放器,并回传播放记录。适配 Plex。
// @description:zh-CN 需要 Python。Emby/Jellyfin 调用外部本地播放器,并回传播放记录。适配 Plex。
// @description:en Require Python. Play in an external player. Update watch history to Emby/Jellyfin server. Support Plex.
// @author Kjtsune
// @match *://*/web/index.html*
// @match *://*/*/web/index.html*
Expand All @@ -21,19 +21,26 @@
// ==/UserScript==
'use strict';
/*
2023-10-04:
1. pot 和 vlc(Linux/macOS) 网络外挂字幕时,使用连播代替播放列表。`.ini` > playlist
2. 高版本 macOS 自启方案。@Eatsolx
* 版本间累积更新:
* 增加:bangumi.tv bgm.tv 单向同步支持。见 FAQ。
* Jellyfin: 适配 基础 URL。
* 可一键更新。见 FAQ。
* 可保存日志。ini > dev > log_file。
* Trakt:未启用播放列表时同步失效。
* Trakt:自启时误弹认证窗口。
* 播放列表:文件命名不规范时失效。
* 减少回传次数。**油猴脚本也需要更新**
* 播放网络流时:pot 播放列表:降低添加条目速度,减少异常。
* 播放网络流时:mpc 切换进度时 api 无响应,导致提前回传。
2023-09-04:
1. Trakt 播放记录单向同步。(详见 FAQ)
2. 剧集多版本:下一集匹配失败则禁用播放列表。
* 版本间累积更新:
* 自动选择视频版本(限emby,配置文件有新增条目 [dev])
* 油猴:非管理员可显示文件名。
2023-08-09:
1. 代理配置热更新。
* 版本间累积更新:
* 内封字幕无中文,且未选中字幕时(或无字幕时),尝试加载外挂字幕。(配置文件有新增条目 [dev] )
* 播放列表:下一集保持相同版本。(限emby,配置文件有新增条目)
* mpc 修复多版本播放回传失败。
*/

let config = {
Expand Down

0 comments on commit 2a489ee

Please sign in to comment.