diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..6dc687e --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: maxdorninger +buy_me_a_coffee: maxdorninger \ No newline at end of file diff --git a/.gitignore b/.gitignore index 66a1752..3c7f005 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ tv/* log.txt res/* media_manager/indexer/indexers/prowlarr.http +*.egg-info +.env web/cache/ @@ -35,3 +37,9 @@ web/!.env.test # Vite web/vite.config.js.timestamp-* web/vite.config.ts.timestamp-* + +# pycache +__pycache__ + +# Postgres +/postgres \ No newline at end of file diff --git a/README.md b/README.md index ec695b8..b7dda5b 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,9 @@ other services. - [x] improve reliability of scheduled tasks - [x] add notification system - [x] add sequence diagrams to the documentation +- [ ] provide example configuration files +- [ ] make media sorting algorithm configurable +- [ ] add usenet support - [ ] add in-depth documentation on the architecture of the codebase - [ ] make indexer module multithreaded - [ ] add support for deluge and transmission @@ -81,6 +84,38 @@ See the [open issues](hhttps://maxdorninger.github.io/MediaManager/issues) for a ![Screenshot 2025-06-28 222908](https://github.com/user-attachments/assets/193e1afd-dabb-42a2-ab28-59f2784371c7) +## Developer Quick Start + +```bash + pip install uv + uv venv + # Activate the virtual environment + uv pip install -e . +``` +```bash +docker compose up db -d +``` + +```bash +uv run alembic upgrade head +``` + +### Get the frontend up and running + +```bash +cd /web && npm install +``` + +### Now start the backend and frontend +```bash +fastapi dev /media_manager/main.py --reload --host +``` + +```bash +cd /web && npm run dev +``` + + ## License diff --git a/alembic/versions/93fb07842385_initial_migration.py b/alembic/versions/93fb07842385_initial_migration.py index 94299ee..02050a8 100644 --- a/alembic/versions/93fb07842385_initial_migration.py +++ b/alembic/versions/93fb07842385_initial_migration.py @@ -22,7 +22,6 @@ depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: """Upgrade schema.""" # ### commands auto generated by Alembic - please adjust! ### - # Create user table op.create_table( "user", @@ -250,7 +249,6 @@ def upgrade() -> None: # ### end Alembic commands ### - def downgrade() -> None: """Downgrade schema.""" # ### commands auto generated by Alembic - please adjust! ### diff --git a/media_manager/config.py b/media_manager/config.py index 5064b33..28c49cf 100644 --- a/media_manager/config.py +++ b/media_manager/config.py @@ -5,11 +5,12 @@ from pydantic_settings import BaseSettings class BasicConfig(BaseSettings): - image_directory: Path = "/data/images" - tv_directory: Path = "/data/tv" - movie_directory: Path = "/data/movies" - torrent_directory: Path = "/data/torrents" - usenet_directory: Path = "/data/usenet" + image_directory: Path = Path(__file__).parent.parent / "data" / "images" + tv_directory: Path = Path(__file__).parent.parent / "data" / "tv" + movie_directory: Path = Path(__file__).parent.parent / "data" / "movies" + torrent_directory: Path = Path(__file__).parent.parent / "data" / "torrents" + usenet_directory: Path = Path(__file__).parent.parent / "data" / "usenet" + FRONTEND_URL: AnyHttpUrl = "http://localhost:3000/" CORS_URLS: list[str] = [] DEVELOPMENT: bool = False diff --git a/pyproject.toml b/pyproject.toml index f52b296..bfe6e88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,3 +33,7 @@ dependencies = [ "pillow-avif-plugin>=1.5.2", "sabnzbd-api>=0.1.2", ] + +[tool.setuptools.packages.find] +include = ["media_manager*"] +exclude = ["web*", "Writerside*", "metadata_relay*", "tests*"]