bemusic / bemuse

⬤▗▚▚▚ Web-based online rhythm action game. Based on HTML5 technologies, React, Redux and Pixi.js.
https://bemuse.ninja/
GNU Affero General Public License v3.0
1.15k stars 147 forks source link

Implement song folder deletion detection to make the automated test passing #702

Open dtinth opened 3 years ago

dtinth commented 3 years ago

Background

The recently-announced feature preview, Custom songs folder, is missing the ability to detect deleted songs.

There’s already an automated test for this functionality, but the test is disabled, because the functionality has not been implemented yet.

https://github.com/bemusic/bemuse/blob/bc77b6ed6d6b5c7a43d0958704a1aacbf7f83740/bemuse/src/custom-folder/index.spec.ts#L75-L89

Please help implement this feature, so that when a song for there is deleted, the game can detect it.

Task

Learn about this functionality

  1. Download a BMS package an extract it to your computer. For an example BMS package that you can use, try downloading this package, which contains 6 songs: http://9domu46i.com/yuruyuru/phase14.html

  2. Go to https://bemuse.ninja/?mode=playground&playground=custom-folder

  3. Click Set custom songs folder and select the extracted folder.

  4. Click Scan to scan the folder. After it is done you should see: “Number of songs in the database: 6”

  5. Delete one of the song folders and click Scan again. The number should decrease, but right now it doesn’t, because that is no code to detect deletion of the folder yet. Please implement this.

How to test this feature

  1. Run the development server. See README file.

  2. Go to http://localhost:8080/?mode=test&grep=custom-folder to run the tests.

Hacktoberfest

If you would like to work on this task, please write a comment stating your intent. We will then assign the issue to you. To ensure continuity, the issue will be unassigned after 3 days of inactivity — so please keep us updated.

fResult commented 3 years ago

I intend to implement this feature

dtinth commented 3 years ago

@fResult Yours now, thank you for taking this issue! 🙏