Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
roogue committed Aug 29, 2023
1 parent 30673fa commit fe599da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/core/DownloadManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ export class DownloadManager extends EventEmitter implements DownloadManager {
}

// The primary method for downloading beatmaps
public async bulkDownload(): Promise<void> {
public bulkDownload(): void {
// Add every download task to queue
Manager.collection.beatMapSets.forEach((beatMapSet) => {
this.queue.add(async () => await this._downloadFile(beatMapSet));
void this.queue.add(async () => await this._downloadFile(beatMapSet));
});

// Emit if the download has been done
Expand Down
2 changes: 1 addition & 1 deletion src/core/Monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default class Monitor extends Manager {
): string {
const messageComponent = new Message(message, variable);

return this.prompt(messageComponent + " ", defaultValue);
return this.prompt(messageComponent.toString() + " ", defaultValue);
}

// When called, the monitor will proceed to the next task
Expand Down
5 changes: 3 additions & 2 deletions src/core/Requestor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class Requestor {
const url =
(options.alternative
? Constant.OsuMirrorAltApiUrl
: Constant.OsuMirrorApiUrl) + id;
: Constant.OsuMirrorApiUrl) + id.toString();

const res = await fetch(url, { method: "GET" });

Expand All @@ -87,7 +87,8 @@ export class Requestor {
): Promise<Json> {
const { v2, cursor } = options;
// Use different endpoint for different version of api request
const url = Constant.OsuCollectorApiUrl + id + (v2 ? "/beatmapsV2" : "");
const url =
Constant.OsuCollectorApiUrl + id.toString() + (v2 ? "/beatmapsV2" : "");

const query: FetchCollectionQuery = // Query is needed for V2 collection
v2
Expand Down
2 changes: 1 addition & 1 deletion src/core/Worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export default class Worker extends Manager {
this.monitor.update();
});

await downloadManager.bulkDownload();
downloadManager.bulkDownload();
} catch (e) {
throw new OcdlError("MANAGE_DOWNLOAD_FAILED", e);
}
Expand Down

0 comments on commit fe599da

Please sign in to comment.