Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Commit

Permalink
use of the cdn url to download beatmaps and releasing 1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Alaanor committed Jan 5, 2020
1 parent ce60d0e commit d3e6f1d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Changelog

## v1.1.4 (05/01/2020)
**Quick change:**
- Changed the way beatlist download beatmap on the background to help the beatsaver server.

An quite huge update should come soon (I hope I can do it within 2-4 weeks) with a lot of fixes and improvements. :)

## v1.1.3 (02/12/2019)
**Bug fixes:**
- Fixed the search bar for online beatmap. Oops.
- Fixed the search bar for online beatmap. Oops.

## v1.1.2 (24/11/2019)
**Features:**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "beatlist",
"description": "App to create playlist for BeatSaber",
"version": "1.1.3",
"version": "1.1.4",
"homepage": "https://github.com/Alaanor/beatlist",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/BeatSaverAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class BeatSaverAPI {
}

public static getDownloadUrlFor(beatmap: ISongOnline) {
return WEBSITE_BASE_URL + beatmap.downloadURL;
return WEBSITE_BASE_URL + (beatmap.directDownload || beatmap.downloadURL);
}

public http: AxiosInstance;
Expand Down
1 change: 1 addition & 0 deletions src/lib/data/ISongOnline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export default interface ISongOnline extends ISongInfo {
description: string;
uploaded: Date;
downloadURL: string;
directDownload: string;
coverURL: string;
}
3 changes: 3 additions & 0 deletions src/lib/data/SongOnline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default class SongOnline extends Song implements ISongOnline {
public downloadURL: string;
public stats: IStats;
public uploaded: Date;
public directDownload: string;

constructor(song: ISongOnline) {
super(song);
Expand All @@ -32,6 +33,7 @@ export default class SongOnline extends Song implements ISongOnline {
this.downloadURL = song.downloadURL;
this.stats = song.stats;
this.uploaded = song.uploaded;
this.directDownload = song.directDownload;
}

public async getImage(): Promise<string> {
Expand All @@ -53,4 +55,5 @@ export default class SongOnline extends Song implements ISongOnline {

await localBeatMap.deleteIt();
}

}

0 comments on commit d3e6f1d

Please sign in to comment.