commit 7bcf5714d461c7377e77babd93ec3b128e4e86de Author: Kris Lamoureux Date: Fri May 12 20:51:23 2023 -0400 Setup Docker image and connection for testing diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1e894d0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.11.3 +WORKDIR /app +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt +COPY . . +CMD ["python", "./main.py"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..749c3bc --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# qbittorrent-manager + +Utilizing the python-qbittorrent library, the goal is to streamline and automate +various tasks such as reconciling data with torrents, managing torrent lifecycles, +and maintaining optimal seeding ratios. Built with Docker compatibility in mind. \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..8c72052 --- /dev/null +++ b/main.py @@ -0,0 +1,10 @@ +from qbittorrent import Client + +qb = Client('http://host.docker.internal:8080') + +qb.login('admin', 'adminadmin') + +torrents = qb.torrents() + +for torrent in torrents: + print(torrent['name']) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1ab3894 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +python-qbittorrent==0.4.3