Skip to content

Commit

Permalink
Clean up source a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ckcr4lyf committed Dec 25, 2024
1 parent 47da4f5 commit ec948a3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
2 changes: 2 additions & 0 deletions build/src/qbittorrent/auth.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions build/src/racing/add.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/qbittorrent/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export const loginV2 = async (qbittorrentSettings: QBITTORRENT_SETTINGS): Promis
}

const api = new QbittorrentApi(qbittorrentSettings.url, response.headers['set-cookie'][0]);

// Need to get the version so we can choose which endpoints to use
// See: https://github.com/ckcr4lyf/qbit-race/issues/52
const version = await api.getAndSetVersion();
logger.info(`Detected qBitorrent version as: ${version}`);
return api;
Expand Down
7 changes: 0 additions & 7 deletions src/racing/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ export const addTorrentToRace = async (api: QbittorrentApi, settings: Settings,
const logger = getLoggerV3();
logger.debug(`Called with path: ${path}, category: ${category}`);

// Get API version
const version = await api.getAndSetVersion();
console.log(version);
console.log(version >= 'v5');
// console.log(version < 'v4');
// process.exit(-1);

// Read the torrent file and get info
let torrentFile: Buffer;

Expand Down

0 comments on commit ec948a3

Please sign in to comment.