Compare commits
4 Commits
19646bc112
...
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
| a6cb420eef | |||
| 99cd808ca8 | |||
| ffd881a48e | |||
| c8beac47cf |
13
CLAUDE.md
13
CLAUDE.md
@@ -34,7 +34,18 @@ The API token is generated on first run and displayed in the console output.
|
|||||||
|
|
||||||
Default port: `8765`
|
Default port: `8765`
|
||||||
|
|
||||||
|
## Versioning
|
||||||
|
|
||||||
|
Version is tracked in two files that must be kept in sync:
|
||||||
|
|
||||||
|
- `pyproject.toml` - `[project].version`
|
||||||
|
- `media_server/__init__.py` - `__version__`
|
||||||
|
|
||||||
|
When releasing a new version, update both files with the same version string.
|
||||||
|
|
||||||
|
**Important:** After making any changes, always ask the user if the version needs to be incremented.
|
||||||
|
|
||||||
## Git Rules
|
## Git Rules
|
||||||
|
|
||||||
- Always ask for user approval before committing changes to git.
|
- **ALWAYS ask for user approval before committing and pushing changes.**
|
||||||
- When pushing, always push to all remotes: `git push origin master && git push github master`
|
- When pushing, always push to all remotes: `git push origin master && git push github master`
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import uvicorn
|
|||||||
from fastapi import FastAPI
|
from fastapi import FastAPI
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
from fastapi.middleware.cors import CORSMiddleware
|
||||||
|
|
||||||
|
from . import __version__
|
||||||
from .config import settings, generate_default_config, get_config_dir
|
from .config import settings, generate_default_config, get_config_dir
|
||||||
from .routes import health_router, media_router, scripts_router
|
from .routes import health_router, media_router, scripts_router
|
||||||
from .services import get_media_controller
|
from .services import get_media_controller
|
||||||
@@ -49,7 +50,7 @@ def create_app() -> FastAPI:
|
|||||||
app = FastAPI(
|
app = FastAPI(
|
||||||
title="Media Server",
|
title="Media Server",
|
||||||
description="REST API for controlling system media playback",
|
description="REST API for controlling system media playback",
|
||||||
version="1.0.0",
|
version=__version__,
|
||||||
lifespan=lifespan,
|
lifespan=lifespan,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
61
pyproject.toml
Normal file
61
pyproject.toml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
[project]
|
||||||
|
name = "media-server"
|
||||||
|
version = "1.0.0"
|
||||||
|
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",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
windows = [
|
||||||
|
"winsdk>=1.0.0b10",
|
||||||
|
"pywin32>=306",
|
||||||
|
"comtypes>=1.2.0",
|
||||||
|
"pycaw>=20230407",
|
||||||
|
]
|
||||||
|
dev = [
|
||||||
|
"pytest>=7.0",
|
||||||
|
"pytest-asyncio>=0.21",
|
||||||
|
"httpx>=0.24",
|
||||||
|
]
|
||||||
|
|
||||||
|
[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*"]
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Core dependencies
|
|
||||||
fastapi>=0.109.0
|
|
||||||
uvicorn[standard]>=0.27.0
|
|
||||||
pydantic>=2.0
|
|
||||||
pydantic-settings>=2.0
|
|
||||||
pyyaml>=6.0
|
|
||||||
|
|
||||||
# Windows media control (install on Windows only)
|
|
||||||
# pip install winsdk pywin32 pycaw comtypes
|
|
||||||
winsdk>=1.0.0b10; sys_platform == "win32"
|
|
||||||
pywin32>=306; sys_platform == "win32"
|
|
||||||
comtypes>=1.2.0; sys_platform == "win32"
|
|
||||||
pycaw>=20230407; sys_platform == "win32"
|
|
||||||
|
|
||||||
# Linux media control (install on Linux only)
|
|
||||||
# pip install dbus-python PyGObject
|
|
||||||
# Note: dbus-python requires system dependencies:
|
|
||||||
# sudo apt-get install libdbus-1-dev libglib2.0-dev python3-gi
|
|
||||||
# dbus-python>=1.3.2; sys_platform == "linux"
|
|
||||||
# PyGObject>=3.46.0; sys_platform == "linux"
|
|
||||||
|
|
||||||
# macOS media control
|
|
||||||
# No additional dependencies needed - uses osascript (AppleScript)
|
|
||||||
|
|
||||||
# Android media control (via Termux)
|
|
||||||
# Requires Termux and Termux:API apps from F-Droid
|
|
||||||
# In Termux: pkg install python termux-api
|
|
||||||
# No additional pip packages needed
|
|
||||||
Reference in New Issue
Block a user