Added an AutoDownloadService

This commit is contained in:
2024-04-23 22:46:49 -05:00
parent 91199bcf0c
commit 17ed663823
4 changed files with 178 additions and 8 deletions

View File

@@ -86,7 +86,6 @@ export default class QBittorrentService extends Service {
getClientInfo: {
rest: "GET /getClientInfo",
handler: async (ctx: Context<{}>) => {
console.log(this.meta.app);
await this.broker.call("qbittorrent.loginWithStoredCredentials", {});
return {
buildInfo: await this.meta.app.buildInfo(),
@@ -212,6 +211,20 @@ export default class QBittorrentService extends Service {
}
},
},
determineDownloadApps: {
rest: "",
handler: async () => {
// 1. Parse the incoming search query
// to make sure that it is well-formed
// At the very least, it should have name, year, number
// 2. Choose between download mediums based on user-preference?
// possible choices are: DC++, Torrent
// 3. Perform the search on those media with the aforementioned search query
// 4. Choose a subset of relevant search results,
// and score them
// 5. Download the highest-scoring, relevant result
},
},
},
methods: {},
async started() {