About this project

## Project Overview etlp (embyToLocalPlayer) is a local player bridge tool: clicking the original play button on an Emby / Jellyfin web page instead invokes a player installed on the local machine, and after the player exits normally, the playback progress is reported back to the media server. The README states it is compatible with Plex. ## Main Capabilities - Playback directly from the home page, triggered by clicking the original play button; version priority can be configured for multi-version videos. - Supports playlists (continuous playback), with the next episode keeping the same version. - Supports one-way marking as watched to bgm.tv / bangumi.tv, simkl.com, and trakt.tv. - Users with local mounts can jump to the folder corresponding to the path (the button is displayed above the file path on the web page). - Unsupported players can generally still be invoked, but progress will not be reported back. - Can play directly in the qBittorrent WebUI or jump to the mounted folder (requires a companion script). - Includes a pseudo-aggregated search script (embyEverywhere). ## Players That Support Progress Reporting mpv (including mpv.net and other mpv-core players), PotPlayer, MPC-HC, MPC-BE, VLC, IINA (macOS). The README recommends prioritizing mpv-based players when there are no special requirements. ## Installation and Running Methods 1. Install a userscript extension such as Tampermonkey or Violentmonkey in the browser and enable developer mode, install the corresponding userscript, then refresh the Emby page. 2. Download and extract the zip from the release page to an English path. Three options: - `etlp-mpv-py-embed-win32.zip` (Windows, with built-in mpv, no configuration changes needed); - `etlp-python-embed-win32.zip` (Windows, requires configuring the player path and selection in the ini); - `embyToLocalPlayer.zip` (Windows / Linux / macOS, requires installing Python yourself and modifying the configuration). 3. On Windows, double-click `embyToLocalPlayer_debug.bat`, press 1 to run in the foreground for testing, press 2 to create a background auto-start on boot. 4. On macOS / Linux, run via `etlp_run.command`, with examples given for login items, systemd services, and other auto-start methods. Python minimum supported version is 3.8; Windows minimum supported version is 10. ## Modes and Configuration Points - Switch via the userscript extension menu: enable/disable the script, and the disk-reading mode toggle. - Disk-reading mode converts server paths to local file addresses; path replacement rules must be filled in the ini; `dev > path_check = yes` can check whether files exist and handle NFC/NFD. - Persistent cache mode only looks at the configuration file and does not conflict with userscript settings. - Update methods: on Windows press 6 in the bat; on Linux/macOS run `python3 utils/update.py`, and compare `embyToLocalPlayer_diff.ini`. ## Common Issues and Limitations - The player must exit before progress reporting is triggered; the log showing `serving at 127.0.0.1:58000` indicates the service started successfully. - Emby's built-in subtitle/audio track selection is ineffective; external subtitles/audio tracks are effective, and built-in subtitles are left for the player to choose. - Playlists are enabled by default and are recommended not to be disabled; the web page's Play All / Shuffle / Playlist only supports movie and music video types. - PotPlayer may encounter issues such as render pin failure and `KeyError: 'stream.mkv'`; the README provides troubleshooting steps such as initialization settings, changing versions, and switching to disk-reading mode. - IINA needs to be set to exit after playback, otherwise progress reporting is affected; playlists are not supported in non-disk-reading mode. - On the Jellyfin home page, if the same file is played repeatedly within 10 seconds after playback ends, the playback time may be incorrect. - Plex domains may be subject to DNS pollution, requiring DNS changes or use of a proxy. ## Watch History Sync - bangumi.tv: requires creating an access token and filling it into the ini; one-way sync only, only supports regular series, not movies/specials, etc.; the README details the sequel recognition and release date matching strategy. - simkl: requires creating an app on the dev page, with Redirect uri `http://localhost:58000/simkl_auth`; after filling in client_id/secret, authorization is automatic. - trakt.tv: requires creating an app, with Redirect uri `http://localhost:58000/trakt_auth`; after filling in user_name/client_id/client_secret, authorize. - All three only sync after the player closes normally; clicking played on the web page does not trigger it. ## Hidden Features (README notes no support) Includes iso disc/bdmv playback (VLC recommended; iso does not support progress reporting), local redirection/replacement of playback addresses, strm LAN sync playback progress, mpv passing data to lua scripts, mpv automatic skipping of opening/ending, pre-reading the next episode, pre-reading Continue Watching, Telegram notifications for new episode updates, persistent cache (download-while-playing), DanDanPlay danmaku player support, and playlists based on Emby in Pot disk-reading mode, etc. ## Feedback Requirements The README emphasizes that before providing feedback, update to the latest version, test with the portable version containing mpv, test at least two videos, and provide logs and reproduction steps; feedback that does not follow the requirements will be ignored.