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..30c3339 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,41 @@ other services. docker compose up -d ``` +## 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 + +TODO: provide an env.example to copy + +```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 +``` + + + ### [View the docs for installation instructions and more](https://maxdorninger.github.io/MediaManager/configuration-overview.html#configuration-overview) diff --git a/alembic/versions/93fb07842385_initial_migration.py b/alembic/versions/93fb07842385_initial_migration.py index 1b15b05..9112441 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', sa.Column('id', sa.UUID(), nullable=False), @@ -189,7 +188,6 @@ def upgrade() -> None: # ### end Alembic commands ### - def downgrade() -> None: """Downgrade schema.""" # ### commands auto generated by Alembic - please adjust! ### @@ -209,4 +207,5 @@ def downgrade() -> None: op.drop_table('oauth_account') op.drop_index(op.f('ix_user_email'), table_name='user') op.drop_table('user') - # ### end Alembic commands ### \ No newline at end of file + # ### end Alembic commands ### + diff --git a/media_manager/config.py b/media_manager/config.py index 05f1913..ff67526 100644 --- a/media_manager/config.py +++ b/media_manager/config.py @@ -5,10 +5,10 @@ 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" + 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" FRONTEND_URL: AnyHttpUrl = "http://localhost:3000/" CORS_URLS: list[str] = [] DEVELOPMENT: bool = False diff --git a/pyproject.toml b/pyproject.toml index aabf1f0..e3ee60d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,3 +32,7 @@ dependencies = [ "pillow>=11.2.1", "pillow-avif-plugin>=1.5.2", ] + +[tool.setuptools.packages.find] +include = ["media_manager*"] +exclude = ["web*", "Writerside*", "metadata_relay*", "tests*"]