@remote-app/qbittorrent-client 0.23.2 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -196,6 +196,20 @@ var QBittorrentClient = class {
196
196
  body.set("name", name);
197
197
  await this.post("/api/v2/torrents/rename", body);
198
198
  }
199
+ async renameFile(hash, oldPath, newPath) {
200
+ const body = new URLSearchParams();
201
+ body.set("hash", hash);
202
+ body.set("oldPath", oldPath);
203
+ body.set("newPath", newPath);
204
+ await this.post("/api/v2/torrents/renameFile", body);
205
+ }
206
+ async renameFolder(hash, oldPath, newPath) {
207
+ const body = new URLSearchParams();
208
+ body.set("hash", hash);
209
+ body.set("oldPath", oldPath);
210
+ body.set("newPath", newPath);
211
+ await this.post("/api/v2/torrents/renameFolder", body);
212
+ }
199
213
  async filePrio(hash, fileIds, priority) {
200
214
  const body = new URLSearchParams();
201
215
  body.set("hash", hash);
package/dist/index.d.cts CHANGED
@@ -30,6 +30,8 @@ declare class QBittorrentClient {
30
30
  setShareLimits(hashes: string[], ratioLimit: number, seedingTimeLimit: number, inactiveSeedingTimeLimit: number): Promise<void>;
31
31
  setLocation(hashes: string[], location: string): Promise<void>;
32
32
  rename(hash: string, name: string): Promise<void>;
33
+ renameFile(hash: string, oldPath: string, newPath: string): Promise<void>;
34
+ renameFolder(hash: string, oldPath: string, newPath: string): Promise<void>;
33
35
  filePrio(hash: string, fileIds: number[], priority: number): Promise<void>;
34
36
  topPrio(hashes: string[]): Promise<void>;
35
37
  increasePrio(hashes: string[]): Promise<void>;
package/dist/index.d.mts CHANGED
@@ -30,6 +30,8 @@ declare class QBittorrentClient {
30
30
  setShareLimits(hashes: string[], ratioLimit: number, seedingTimeLimit: number, inactiveSeedingTimeLimit: number): Promise<void>;
31
31
  setLocation(hashes: string[], location: string): Promise<void>;
32
32
  rename(hash: string, name: string): Promise<void>;
33
+ renameFile(hash: string, oldPath: string, newPath: string): Promise<void>;
34
+ renameFolder(hash: string, oldPath: string, newPath: string): Promise<void>;
33
35
  filePrio(hash: string, fileIds: number[], priority: number): Promise<void>;
34
36
  topPrio(hashes: string[]): Promise<void>;
35
37
  increasePrio(hashes: string[]): Promise<void>;
package/dist/index.mjs CHANGED
@@ -194,6 +194,20 @@ var QBittorrentClient = class {
194
194
  body.set("name", name);
195
195
  await this.post("/api/v2/torrents/rename", body);
196
196
  }
197
+ async renameFile(hash, oldPath, newPath) {
198
+ const body = new URLSearchParams();
199
+ body.set("hash", hash);
200
+ body.set("oldPath", oldPath);
201
+ body.set("newPath", newPath);
202
+ await this.post("/api/v2/torrents/renameFile", body);
203
+ }
204
+ async renameFolder(hash, oldPath, newPath) {
205
+ const body = new URLSearchParams();
206
+ body.set("hash", hash);
207
+ body.set("oldPath", oldPath);
208
+ body.set("newPath", newPath);
209
+ await this.post("/api/v2/torrents/renameFolder", body);
210
+ }
197
211
  async filePrio(hash, fileIds, priority) {
198
212
  const body = new URLSearchParams();
199
213
  body.set("hash", hash);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remote-app/qbittorrent-client",
3
- "version": "0.23.2",
3
+ "version": "0.25.0",
4
4
  "description": "qBittorrent WebUI API client",
5
5
  "keywords": [
6
6
  "qbittorrent",