danoniplus 42.1.0 → 42.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/js/danoni_main.js +18 -9
  2. package/package.json +1 -1
package/js/danoni_main.js CHANGED
@@ -4,12 +4,12 @@
4
4
  *
5
5
  * Source by tickle
6
6
  * Created : 2018/10/08
7
- * Revised : 2025/06/07
7
+ * Revised : 2025/06/08
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 42.1.0`;
12
- const g_revisedDate = `2025/06/07`;
11
+ const g_version = `Ver 42.1.1`;
12
+ const g_revisedDate = `2025/06/08`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -3016,13 +3016,22 @@ const getMusicUrl = _scoreId =>
3016
3016
  * @returns {string}
3017
3017
  */
3018
3018
  const getFullMusicUrl = (_musicUrl = ``) => {
3019
- let url = `${g_rootPath}../${g_headerObj.musicFolder}/${_musicUrl}`;
3020
- if (_musicUrl.indexOf(C_MRK_CURRENT_DIRECTORY) !== -1) {
3021
- url = _musicUrl.split(C_MRK_CURRENT_DIRECTORY)[1];
3022
- } else if (g_headerObj.musicFolder.indexOf(C_MRK_CURRENT_DIRECTORY) !== -1) {
3023
- url = `${g_headerObj.musicFolder.split(C_MRK_CURRENT_DIRECTORY)[1]}/${_musicUrl}`;
3019
+ let baseMusicUrl = _musicUrl;
3020
+ let baseDir = `../${g_headerObj.musicFolder}/`;
3021
+
3022
+ if (_musicUrl.includes(C_MRK_CURRENT_DIRECTORY)) {
3023
+ // musicUrl, musicFolder両方にカレントパス指定がある場合は、musicUrlの値を優先
3024
+
3025
+ } else if (g_headerObj.musicFolder.includes(C_MRK_CURRENT_DIRECTORY)) {
3026
+ // musicFolderにカレントパス指定がある場合は、ファイル名にmusicFolderの値も含める
3027
+ baseMusicUrl = `${g_headerObj.musicFolder}/${_musicUrl}`;
3028
+ }
3029
+ if (g_headerObj.musicFolder.includes(C_MRK_CURRENT_DIRECTORY)) {
3030
+ // musicFolderにカレントパス指定がある場合は、ディレクトリは指定しない
3031
+ baseDir = ``;
3024
3032
  }
3025
- return url;
3033
+ const [musicFile, musicPath] = getFilePath(baseMusicUrl, baseDir);
3034
+ return `${musicPath}${musicFile}`;
3026
3035
  }
3027
3036
 
3028
3037
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "42.1.0",
3
+ "version": "42.1.1",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {