diff --git a/media_manager/auth/oauth.py b/media_manager/auth/oauth.py index a161039..db66358 100644 --- a/media_manager/auth/oauth.py +++ b/media_manager/auth/oauth.py @@ -1,13 +1,13 @@ from typing import Optional import jwt -from fastapi import APIRouter, Depends, HTTPException, Query, Request, status +from fastapi import APIRouter, Depends, HTTPException, Request, status from httpx_oauth.integrations.fastapi import OAuth2AuthorizeCallback from httpx_oauth.oauth2 import BaseOAuth2, OAuth2Token from pydantic import BaseModel -from fastapi_users import models, schemas -from fastapi_users.authentication import AuthenticationBackend, Authenticator, Strategy +from fastapi_users import models +from fastapi_users.authentication import AuthenticationBackend, Strategy from fastapi_users.exceptions import UserAlreadyExists from fastapi_users.jwt import SecretType, decode_jwt, generate_jwt from fastapi_users.manager import BaseUserManager, UserManagerDependency diff --git a/media_manager/auth/users.py b/media_manager/auth/users.py index c925f91..29fdb50 100644 --- a/media_manager/auth/users.py +++ b/media_manager/auth/users.py @@ -2,7 +2,6 @@ import os import uuid from typing import Optional -import httpx from fastapi import Depends, Request from fastapi_users import BaseUserManager, FastAPIUsers, UUIDIDMixin, models from fastapi_users.authentication import ( diff --git a/media_manager/tv/repository.py b/media_manager/tv/repository.py index 1a1ab65..245a37d 100644 --- a/media_manager/tv/repository.py +++ b/media_manager/tv/repository.py @@ -291,9 +291,7 @@ def get_season_request( return SeasonRequestSchema.model_validate(db.get(SeasonRequest, season_request_id)) -def get_show_by_season_id( - db: Session, season_id: SeasonId -) -> ShowSchema | None: +def get_show_by_season_id(db: Session, season_id: SeasonId) -> ShowSchema | None: """ Retrieve a show by one of its season's ID. diff --git a/pyproject.toml b/pyproject.toml index 226cadc..ec1830d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,4 +26,5 @@ dependencies = [ "typing-inspect>=0.9.0", "uvicorn>=0.34.2", "fastapi-utils>=0.8.0", + "apscheduler>=3.11.0", ] diff --git a/uv.lock b/uv.lock index 2a02129..b6ef704 100644 --- a/uv.lock +++ b/uv.lock @@ -24,6 +24,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a1/ee/48ca1a7c89ffec8b6a0c5d02b89c305671d5ffd8d3c94acf8b8c408575bb/anyio-4.9.0-py3-none-any.whl", hash = "sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c", size = 100916, upload-time = "2025-03-17T00:02:52.713Z" }, ] +[[package]] +name = "apscheduler" +version = "3.11.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "tzlocal" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/4e/00/6d6814ddc19be2df62c8c898c4df6b5b1914f3bd024b780028caa392d186/apscheduler-3.11.0.tar.gz", hash = "sha256:4c622d250b0955a65d5d0eb91c33e6d43fd879834bf541e0a18661ae60460133", size = 107347, upload-time = "2024-11-24T19:39:26.463Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d0/ae/9a053dd9229c0fde6b1f1f33f609ccff1ee79ddda364c756a924c6d8563b/APScheduler-3.11.0-py3-none-any.whl", hash = "sha256:fc134ca32e50f5eadcc4938e3a4545ab19131435e851abb40b34d63d5141c6da", size = 64004, upload-time = "2024-11-24T19:39:24.442Z" }, +] + [[package]] name = "argon2-cffi" version = "23.1.0" @@ -575,6 +587,7 @@ name = "mediamanager" version = "0.1.0" source = { virtual = "." } dependencies = [ + { name = "apscheduler" }, { name = "bencoder" }, { name = "cachetools" }, { name = "fastapi", extra = ["standard"] }, @@ -601,6 +614,7 @@ dependencies = [ [package.metadata] requires-dist = [ + { name = "apscheduler", specifier = ">=3.11.0" }, { name = "bencoder", specifier = ">=0.2.0" }, { name = "cachetools", specifier = ">=6.0.0" }, { name = "fastapi", extras = ["standard"], specifier = ">=0.115.12" }, @@ -1090,6 +1104,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/5c/23/c7abc0ca0a1526a0774eca151daeb8de62ec457e77262b66b359c3c7679e/tzdata-2025.2-py2.py3-none-any.whl", hash = "sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8", size = 347839, upload-time = "2025-03-23T13:54:41.845Z" }, ] +[[package]] +name = "tzlocal" +version = "5.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "tzdata", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz", hash = "sha256:cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd", size = 30761, upload-time = "2025-03-05T21:17:41.549Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/14/e2a54fabd4f08cd7af1c07030603c3356b74da07f7cc056e600436edfa17/tzlocal-5.3.1-py3-none-any.whl", hash = "sha256:eb1a66c3ef5847adf7a834f1be0800581b683b5608e74f86ecbcef8ab91bb85d", size = 18026, upload-time = "2025-03-05T21:17:39.857Z" }, +] + [[package]] name = "urllib3" version = "2.4.0"