Files
media-player-server/pyproject.toml
T
alexei.dolgolyov d798fedf55
Lint & Test / test (push) Successful in 20s
Lint & Test / linux-smoke (push) Failing after 34s
feat(icon): redesign app icon as "Beacon" and ship multi-resolution ICO
- Replace generic Spotify-green circle with a refined "Beacon" design:
  squircle + deep-teal diagonal gradient (#0B3D3B → #1A6B5E) + warm
  parchment play triangle (#F5F1E8) with drop shadow, top sheen, and
  ghosted echo-chevrons hinting at broadcast/stream
- Grow icon.ico from a single 16×16 frame (208 B) to a 10-frame
  multi-resolution ICO (16/20/24/32/40/48/64/96/128/256, ~37 KB) so
  Windows no longer upscales 16×16 into mush for the installer chrome,
  Start Menu, desktop shortcuts, Alt+Tab, and File Explorer tiles
- Add scripts/generate-icon.py: SVG is the source of truth; resvg-py
  rasterizes every ICO size; Pillow packs the multi-resolution ICO
- Update tray.py to pick a 64×64 frame from the new ICO and update its
  procedural fallback to the same Beacon palette so a missing ICO no
  longer regresses the tray to the old Spotify-green circle
- Add resvg-py to [dev] deps (build-time only)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 17:18:58 +03:00

106 lines
3.2 KiB
TOML

[project]
name = "media-server"
version = "0.3.1"
description = "REST API server for controlling system-wide media playback"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.10"
authors = [
{ name = "Alexei Dolgolyov" }
]
keywords = ["media", "player", "api", "home-assistant", "fastapi"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Framework :: FastAPI",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Home Automation",
]
dependencies = [
"fastapi>=0.109.0",
"uvicorn[standard]>=0.27.0",
"pydantic>=2.0",
"pydantic-settings>=2.0",
"pyyaml>=6.0",
"mutagen>=1.47.0",
"pillow>=10.0.0",
"soundcard>=0.4.0",
"numpy>=1.24.0,<2.0",
# screen-brightness-control + monitorcontrol are cross-platform
# (Windows / Linux i2c-dev). Kept in base deps so a plain
# `pip install media-server` yields a working /api/display on any
# platform that has the underlying hardware support.
"screen-brightness-control>=0.20.0",
"monitorcontrol>=3.0.0",
]
[project.optional-dependencies]
windows = [
"winsdk>=1.0.0b10",
"pywin32>=306; sys_platform == 'win32'",
"comtypes>=1.2.0; sys_platform == 'win32'",
"pycaw>=20230407; sys_platform == 'win32'",
"wmi>=1.5.1; sys_platform == 'win32'",
"pystray>=0.19.0",
]
linux = [
# MPRIS / D-Bus media control. Requires libdbus-1-dev, libglib2.0-dev,
# and pkg-config installed on the host before pip install.
"dbus-python>=1.3.2; sys_platform == 'linux'",
"PyGObject>=3.46; sys_platform == 'linux'",
# X11 foreground-window probe (Wayland sessions degrade gracefully).
"python-xlib>=0.33; sys_platform == 'linux'",
]
macos = [
# PyObjC for the foreground-window + active-app probes.
"pyobjc-framework-Cocoa>=10.0; sys_platform == 'darwin'",
"pyobjc-framework-Quartz>=10.0; sys_platform == 'darwin'",
]
dev = [
"pytest>=7.0",
"pytest-asyncio>=0.21",
"httpx>=0.24",
"ruff>=0.4.0",
# SVG -> PNG rasterizer used by scripts/generate-icon.py to (re)build
# media_server/static/icons/icon.ico from icon.svg. Build-time only.
"resvg-py>=0.3.2",
]
[project.urls]
Homepage = "https://git.dolgolyov-family.by/alexei.dolgolyov/media-player-server"
Repository = "https://git.dolgolyov-family.by/alexei.dolgolyov/media-player-server"
Issues = "https://git.dolgolyov-family.by/alexei.dolgolyov/media-player-server/issues"
[project.scripts]
media-server = "media_server.main:main"
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["media_server*"]
[tool.ruff]
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "I", "W"]
[tool.ruff.lint.per-file-ignores]
# AppleScript string literals contain long lines that cannot be broken
"media_server/services/macos_media.py" = ["E501"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"