Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest package versions #429

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 31 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,35 @@ on:
push:
branches:
- master
- main
jobs:
build-win64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python 3.9
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: git-for-windows/setup-git-for-windows-sdk@v1
python-version: 3.13
- name: Setup git SDK
uses: git-for-windows/setup-git-for-windows-sdk@v1
with:
flavor: minimal
- name: Download mpv
id: mpv
uses: nguyenngoclongdev/[email protected]
with:
repository: 'shinchiro/mpv-winbuild-cmake'
latest: true
fileName: 'mpv-dev-x86_64-v3*.7z'
- name: Install dependencies
run: |
curl -L https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20240513/mpv-dev-x86_64-20240513-git-61f72bd.7z > mpv.7z
7z x mpv.7z
7z x "${{ fromJson(steps.mpv.outputs.downloaded_files)[0] }}"
mv libmpv-2.dll mpv-2.dll
pip install wheel
pip install git+https://github.com/pythonnet/pythonnet@438bcdd3f0b2e2ee358b407cfc96e4385e5783fc
pip install .[all] pywebview==3.4 pywin32==304
pip install .[all] pythonnet pywebview pywin32
./gen_pkg.sh --skip-build
python ./get_pywebview_natives.py
shell: bash
- name: PyInstaller Bootloader
run: |
Expand All @@ -47,24 +54,30 @@ jobs:
build-win32:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python 3.9
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: git-for-windows/setup-git-for-windows-sdk@v1
python-version: 3.13
- name: Setup git SDK
uses: git-for-windows/setup-git-for-windows-sdk@v1
with:
flavor: minimal
- name: Download mpv
id: mpv
uses: nguyenngoclongdev/[email protected]
with:
repository: 'shinchiro/mpv-winbuild-cmake'
latest: true
fileName: 'mpv-dev-i686*.7z'
- name: Install dependencies
run: |
curl -L https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20240513/mpv-dev-i686-20240513-git-61f72bd.7z > mpv.7z
7z x mpv.7z
7z x "${{ fromJson(steps.mpv.outputs.downloaded_files)[0] }}"
mv libmpv-2.dll mpv-2.dll
pip install wheel
pip install git+https://github.com/pythonnet/pythonnet@438bcdd3f0b2e2ee358b407cfc96e4385e5783fc
pip install .[all] pywebview==3.4 pywin32==304
pip install .[all] pythonnet pywebview pywin32
./gen_pkg.sh --skip-build
python ./get_pywebview_natives.py
shell: bash
- name: PyInstaller Bootloader
run: |
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ starting development on a feature. If you PR a feature with required dependencie
optional ones.

Current Dependencies:
- `python-mpv` - Provides `libmpv1` playback backend.
- `python-mpv` - Provides `libmpv` playback backend.
- `python-mpv-jsonipc` - Provides `mpv` playback backend. (First-Party)
- `jellyfin-apiclient-python` - Provides API client to Jellyfin. (First-Party)
- `pywin32` - Allows window management on Windows. (Optional)
Expand Down Expand Up @@ -68,7 +68,7 @@ Current Dependencies:
- `rich_presence.py` - Module which implements Discord Rich Presence integration.
- `svp_integration.py` - Implements SVP API and menu functionality for controlling SVP.
- `syncplay.py` - Implements the SyncPlay time syncing events and algorithms.
- Note that time syncing with the server is [part of the api client](https://github.com/iwalton3/jellyfin-apiclient-python/blob/master/jellyfin_apiclient_python/timesync_manager.py).
- Note that time syncing with the server is [part of the api client](https://github.com/jellyfin/jellyfin-apiclient-python/blob/master/jellyfin_apiclient_python/timesync_manager.py).
- `timeline.py` - Thread to trigger playback events to the Jellyfin server.
- Note: `player.py` is where the actual response is created.
- `update_check.py` - Implements update checking, notifications, and the menu option to open the release page.
Expand Down
443 changes: 232 additions & 211 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build-win-32.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off
rd /s /q __pycache__ dist build
set PATH=%PATH%;%CD%
pyinstaller -w --add-binary "mpv-2.dll;." --add-data "jellyfin_mpv_shim\mouse.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\trickplay-osc.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\thumbfast.lua;jellyfin_mpv_shim" --hidden-import pystray._win32 --add-data "jellyfin_mpv_shim\default_shader_pack;jellyfin_mpv_shim\default_shader_pack" --add-data "jellyfin_mpv_shim\messages;jellyfin_mpv_shim\messages" --add-data "jellyfin_mpv_shim\systray.png;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\display_mirror\index.html;jellyfin_mpv_shim\display_mirror" --add-data "jellyfin_mpv_shim\display_mirror\jellyfin.css;jellyfin_mpv_shim\display_mirror" --add-binary "Microsoft.Toolkit.Forms.UI.Controls.WebView.dll;." --icon jellyfin.ico run.py
pyinstaller -w --add-binary "mpv-2.dll;." --add-data "jellyfin_mpv_shim\mouse.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\trickplay-osc.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\thumbfast.lua;jellyfin_mpv_shim" --hidden-import pystray._win32 --add-data "jellyfin_mpv_shim\default_shader_pack;jellyfin_mpv_shim\default_shader_pack" --add-data "jellyfin_mpv_shim\messages;jellyfin_mpv_shim\messages" --add-data "jellyfin_mpv_shim\systray.png;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\display_mirror\index.html;jellyfin_mpv_shim\display_mirror" --add-data "jellyfin_mpv_shim\display_mirror\jellyfin.css;jellyfin_mpv_shim\display_mirror" --icon jellyfin.ico run.py
if %errorlevel% neq 0 exit /b %errorlevel%
del dist\run\run.exe.manifest
copy hidpi.manifest dist\run\run.exe.manifest
Expand Down
2 changes: 1 addition & 1 deletion build-win-dbg.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
rd /s /q __pycache__ build
rd /s /q dist\run
set PATH=%PATH%;%CD%
pyinstaller -c --add-binary "mpv-2.dll;." --add-data "jellyfin_mpv_shim\mouse.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\systray.png;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\default_shader_pack;jellyfin_mpv_shim\default_shader_pack" --add-data "jellyfin_mpv_shim\messages;jellyfin_mpv_shim\messages" --add-data "jellyfin_mpv_shim\display_mirror\index.html;jellyfin_mpv_shim\display_mirror" --add-data "jellyfin_mpv_shim\display_mirror\jellyfin.css;jellyfin_mpv_shim\display_mirror" --add-binary "Microsoft.Toolkit.Forms.UI.Controls.WebView.dll;." --icon jellyfin.ico run.py
pyinstaller -c --add-binary "mpv-2.dll;." --add-data "jellyfin_mpv_shim\mouse.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\systray.png;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\default_shader_pack;jellyfin_mpv_shim\default_shader_pack" --add-data "jellyfin_mpv_shim\messages;jellyfin_mpv_shim\messages" --add-data "jellyfin_mpv_shim\display_mirror\index.html;jellyfin_mpv_shim\display_mirror" --add-data "jellyfin_mpv_shim\display_mirror\jellyfin.css;jellyfin_mpv_shim\display_mirror" --icon jellyfin.ico run.py
2 changes: 1 addition & 1 deletion build-win.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off
rd /s /q __pycache__ dist build
set PATH=%PATH%;%CD%
pyinstaller -w --add-binary "mpv-2.dll;." --add-data "jellyfin_mpv_shim\systray.png;jellyfin_mpv_shim" --hidden-import pystray._win32 --add-data "jellyfin_mpv_shim\mouse.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\trickplay-osc.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\thumbfast.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\default_shader_pack;jellyfin_mpv_shim\default_shader_pack" --add-data "jellyfin_mpv_shim\messages;jellyfin_mpv_shim\messages" --add-data "jellyfin_mpv_shim\display_mirror\index.html;jellyfin_mpv_shim\display_mirror" --add-data "jellyfin_mpv_shim\display_mirror\jellyfin.css;jellyfin_mpv_shim\display_mirror" --add-binary "Microsoft.Toolkit.Forms.UI.Controls.WebView.dll;." --icon jellyfin.ico run.py
pyinstaller -w --add-binary "mpv-2.dll;." --add-data "jellyfin_mpv_shim\systray.png;jellyfin_mpv_shim" --hidden-import pystray._win32 --add-data "jellyfin_mpv_shim\mouse.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\trickplay-osc.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\thumbfast.lua;jellyfin_mpv_shim" --add-data "jellyfin_mpv_shim\default_shader_pack;jellyfin_mpv_shim\default_shader_pack" --add-data "jellyfin_mpv_shim\messages;jellyfin_mpv_shim\messages" --add-data "jellyfin_mpv_shim\display_mirror\index.html;jellyfin_mpv_shim\display_mirror" --add-data "jellyfin_mpv_shim\display_mirror\jellyfin.css;jellyfin_mpv_shim\display_mirror" --icon jellyfin.ico run.py
if %errorlevel% neq 0 exit /b %errorlevel%
del dist\run\run.exe.manifest
copy hidpi.manifest dist\run\run.exe.manifest
Expand Down
15 changes: 0 additions & 15 deletions get_pywebview_natives.py

This file was deleted.

4 changes: 2 additions & 2 deletions jellyfin_mpv_shim/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
# noinspection PyPackageRequirements
import mpv

log.info("Using libmpv1 playback backend.")
log.info("Using libmpv playback backend.")
except OSError:
log.warning("Could not find libmpv1.")
log.warning("Could not find libmpv.")
python_mpv_available = False

if settings.mpv_ext or not python_mpv_available:
Expand Down
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Newer revisions of python-mpv require mpv-1.dll in the PATH.
# Newer revisions of python-mpv require mpv-2.dll in the PATH.
import os
import sys
import multiprocessing
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

if sys.platform.startswith("win32"):
win_extra = ["pywin32", "clr-loader==0.1.7", "pythonnet==3.0.0a2"]
win_extra = ["pywin32", "clr-loader", "pythonnet"]
extras["all"] += win_extra
extras["mirror"] += win_extra

Expand Down Expand Up @@ -60,9 +60,9 @@
"Operating System :: OS Independent",
],
extras_require=extras,
python_requires=">=3.6",
python_requires=">=3.7",
install_requires=[
"python-mpv",
"mpv @ git+https://github.com/jaseg/python-mpv.git@main",
"jellyfin-apiclient-python>=1.9.2",
"python-mpv-jsonipc>=1.2.0",
"requests",
Expand Down