mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-17 19:53:55 +02:00
14 lines
359 B
Python
14 lines
359 B
Python
from typing import Annotated
|
|
|
|
from fastapi import Depends
|
|
|
|
from media_manager.database import DbSessionDependency
|
|
from media_manager.torrent.service import TorrentService
|
|
|
|
|
|
def get_torrent_service(db: DbSessionDependency) -> TorrentService:
|
|
return TorrentService(db=db)
|
|
|
|
|
|
TorrentServiceDependency = Annotated[TorrentService, Depends(get_torrent_service)]
|