osu-play 1.0.7 → 1.2.0
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.
- package/README.md +93 -39
- package/dist/cli.cjs +1579 -0
- package/dist/cli.cjs.map +25 -0
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +1569 -0
- package/dist/cli.js.map +25 -0
- package/dist/core/cli/main.d.ts +20 -0
- package/dist/core/lazer/compat.d.ts +24 -0
- package/dist/core/lazer/mod.d.ts +10 -0
- package/dist/core/lazer/schema/beatmap.d.ts +35 -0
- package/dist/core/lazer/schema/beatmapMetadata.d.ts +16 -0
- package/dist/core/lazer/schema/beatmapSet.d.ts +18 -0
- package/{src/realm/schema/mod.ts → dist/core/lazer/schema/mod.d.ts} +0 -1
- package/dist/core/lazer/schema/realmFile.d.ts +6 -0
- package/dist/core/lazer/schema/realmNamedFileUsage.d.ts +9 -0
- package/dist/core/lazer/schema/realmUser.d.ts +9 -0
- package/dist/core/player/mod.d.ts +3 -0
- package/dist/core/player/mpv.d.ts +37 -0
- package/dist/core/player/session.d.ts +45 -0
- package/dist/core/player/types.d.ts +46 -0
- package/dist/core/playlist/mod.d.ts +28 -0
- package/dist/core/tui/player-screen.d.ts +26 -0
- package/dist/core/utils/mod.d.ts +16 -0
- package/dist/index.cjs +529 -0
- package/dist/index.cjs.map +21 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +512 -0
- package/dist/index.js.map +21 -0
- package/package.json +54 -25
- package/bin/osu-play.js +0 -7
- package/index.ts +0 -1
- package/src/cli/main.ts +0 -156
- package/src/mod.ts +0 -2
- package/src/realm/mod.ts +0 -54
- package/src/realm/schema/beatmap.ts +0 -85
- package/src/realm/schema/beatmapMetadata.ts +0 -33
- package/src/realm/schema/beatmapSet.ts +0 -36
- package/src/realm/schema/realmFile.ts +0 -15
- package/src/realm/schema/realmNamedFileUsage.ts +0 -19
- package/src/realm/schema/realmUser.ts +0 -21
- package/src/utils/mod.ts +0 -77
- package/tsconfig.json +0 -109
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
19
|
+
var __toCommonJS = (from) => {
|
|
20
|
+
var entry = __moduleCache.get(from), desc;
|
|
21
|
+
if (entry)
|
|
22
|
+
return entry;
|
|
23
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
24
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
26
|
+
get: () => from[key],
|
|
27
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
28
|
+
}));
|
|
29
|
+
__moduleCache.set(from, entry);
|
|
30
|
+
return entry;
|
|
31
|
+
};
|
|
32
|
+
var __export = (target, all) => {
|
|
33
|
+
for (var name in all)
|
|
34
|
+
__defProp(target, name, {
|
|
35
|
+
get: all[name],
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
set: (newValue) => all[name] = () => newValue
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
42
|
+
|
|
43
|
+
// src/core/lazer/compat.ts
|
|
44
|
+
function describeRequirement(requirement) {
|
|
45
|
+
if (requirement.type === "object" || requirement.type === "list") {
|
|
46
|
+
return `${requirement.type}:${requirement.objectType ?? "unknown"}`;
|
|
47
|
+
}
|
|
48
|
+
return requirement.type ?? "unknown";
|
|
49
|
+
}
|
|
50
|
+
function describeProperty(property) {
|
|
51
|
+
if (!property?.type) {
|
|
52
|
+
return "missing";
|
|
53
|
+
}
|
|
54
|
+
if (property.type === "object" || property.type === "list") {
|
|
55
|
+
return `${property.type}:${property.objectType ?? "unknown"}`;
|
|
56
|
+
}
|
|
57
|
+
return property.type;
|
|
58
|
+
}
|
|
59
|
+
function inspectLazerSchemaEntries(schemaEntries, version) {
|
|
60
|
+
const schemaByName = new Map(schemaEntries.map((entry) => [entry.name, entry]));
|
|
61
|
+
const missingObjects = [];
|
|
62
|
+
const issues = [];
|
|
63
|
+
for (const [objectName, requirements] of Object.entries(REQUIRED_PLAYLIST_SCHEMA)) {
|
|
64
|
+
const schemaEntry = schemaByName.get(objectName);
|
|
65
|
+
if (!schemaEntry) {
|
|
66
|
+
missingObjects.push(objectName);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
for (const [propertyName, requirement] of Object.entries(requirements)) {
|
|
70
|
+
const property = schemaEntry.properties[propertyName];
|
|
71
|
+
const typeMatches = !requirement.type || property?.type === requirement.type;
|
|
72
|
+
const objectTypeMatches = !requirement.objectType || property?.objectType === requirement.objectType;
|
|
73
|
+
if (!typeMatches || !objectTypeMatches) {
|
|
74
|
+
issues.push({
|
|
75
|
+
objectName,
|
|
76
|
+
propertyName,
|
|
77
|
+
expected: describeRequirement(requirement),
|
|
78
|
+
actual: describeProperty(property)
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
compatible: missingObjects.length === 0 && issues.length === 0,
|
|
85
|
+
version,
|
|
86
|
+
missingObjects,
|
|
87
|
+
issues
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function formatLazerSchemaCompatibilityError(report) {
|
|
91
|
+
const details = [
|
|
92
|
+
`Detected osu!lazer schema version ${report.version}, but the playlist reader is missing fields it needs.`
|
|
93
|
+
];
|
|
94
|
+
if (report.missingObjects.length > 0) {
|
|
95
|
+
details.push(`Missing objects: ${report.missingObjects.join(", ")}`);
|
|
96
|
+
}
|
|
97
|
+
if (report.issues.length > 0) {
|
|
98
|
+
details.push(`Mismatched properties: ${report.issues.map((issue) => `${issue.objectName}.${issue.propertyName} expected ${issue.expected}, got ${issue.actual}`).join("; ")}`);
|
|
99
|
+
}
|
|
100
|
+
details.push("This app now reflects the live lazer schema and only depends on a small playlist-safe subset, so version bumps are fine until those required fields change.");
|
|
101
|
+
return details.join(`
|
|
102
|
+
`);
|
|
103
|
+
}
|
|
104
|
+
var LAST_STATIC_LAZER_SCHEMA_VERSION = 46, REQUIRED_PLAYLIST_SCHEMA;
|
|
105
|
+
var init_compat = __esm(() => {
|
|
106
|
+
REQUIRED_PLAYLIST_SCHEMA = {
|
|
107
|
+
BeatmapSet: {
|
|
108
|
+
Beatmaps: { type: "list", objectType: "Beatmap" },
|
|
109
|
+
Files: { type: "list", objectType: "RealmNamedFileUsage" }
|
|
110
|
+
},
|
|
111
|
+
Beatmap: {
|
|
112
|
+
Metadata: { type: "object", objectType: "BeatmapMetadata" }
|
|
113
|
+
},
|
|
114
|
+
BeatmapMetadata: {
|
|
115
|
+
AudioFile: { type: "string" },
|
|
116
|
+
Title: { type: "string" },
|
|
117
|
+
Artist: { type: "string" },
|
|
118
|
+
TitleUnicode: { type: "string" },
|
|
119
|
+
ArtistUnicode: { type: "string" }
|
|
120
|
+
},
|
|
121
|
+
RealmNamedFileUsage: {
|
|
122
|
+
File: { type: "object", objectType: "File" },
|
|
123
|
+
Filename: { type: "string" }
|
|
124
|
+
},
|
|
125
|
+
File: {
|
|
126
|
+
Hash: { type: "string" }
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// src/core/lazer/schema/beatmap.ts
|
|
132
|
+
var import_realm, Beatmap;
|
|
133
|
+
var init_beatmap = __esm(() => {
|
|
134
|
+
import_realm = __toESM(require("realm"));
|
|
135
|
+
Beatmap = class Beatmap extends import_realm.default.Object {
|
|
136
|
+
ID;
|
|
137
|
+
DifficultyName;
|
|
138
|
+
Metadata;
|
|
139
|
+
BeatmapSet;
|
|
140
|
+
Status;
|
|
141
|
+
OnlineID;
|
|
142
|
+
Length;
|
|
143
|
+
BPM;
|
|
144
|
+
Hash;
|
|
145
|
+
StarRating;
|
|
146
|
+
MD5Hash;
|
|
147
|
+
OnlineMD5Hash;
|
|
148
|
+
LastLocalUpdate;
|
|
149
|
+
LastOnlineUpdate;
|
|
150
|
+
Hidden;
|
|
151
|
+
AudioLeadIn;
|
|
152
|
+
StackLeniency;
|
|
153
|
+
SpecialStyle;
|
|
154
|
+
LetterboxInBreaks;
|
|
155
|
+
WidescreenStoryboard;
|
|
156
|
+
EpilepsyWarning;
|
|
157
|
+
SamplesMatchPlaybackRate;
|
|
158
|
+
LastPlayed;
|
|
159
|
+
DistanceSpacing;
|
|
160
|
+
BeatDivisor;
|
|
161
|
+
GridSize;
|
|
162
|
+
TimelineZoom;
|
|
163
|
+
EditorTimestamp;
|
|
164
|
+
CountdownOffset;
|
|
165
|
+
static schema = {
|
|
166
|
+
name: "Beatmap",
|
|
167
|
+
primaryKey: "ID",
|
|
168
|
+
properties: {
|
|
169
|
+
ID: { type: "uuid", default: "" },
|
|
170
|
+
DifficultyName: { type: "string", default: "", optional: true },
|
|
171
|
+
Metadata: {
|
|
172
|
+
type: "object",
|
|
173
|
+
objectType: "BeatmapMetadata",
|
|
174
|
+
default: null
|
|
175
|
+
},
|
|
176
|
+
BeatmapSet: { type: "object", objectType: "BeatmapSet", default: null },
|
|
177
|
+
Status: { type: "int", default: -3 },
|
|
178
|
+
OnlineID: { type: "int", default: -1 },
|
|
179
|
+
Length: { type: "double", default: 0 },
|
|
180
|
+
BPM: { type: "double", default: 0 },
|
|
181
|
+
Hash: { type: "string", default: "", optional: true },
|
|
182
|
+
StarRating: { type: "double", default: -1 },
|
|
183
|
+
MD5Hash: { type: "string", default: "", optional: true },
|
|
184
|
+
OnlineMD5Hash: { type: "string", default: "", optional: true },
|
|
185
|
+
LastLocalUpdate: { type: "date", optional: true },
|
|
186
|
+
LastOnlineUpdate: { type: "date", optional: true },
|
|
187
|
+
Hidden: { type: "bool", default: false },
|
|
188
|
+
AudioLeadIn: { type: "double", default: 0 },
|
|
189
|
+
StackLeniency: { type: "float", default: 0.7 },
|
|
190
|
+
SpecialStyle: { type: "bool", default: false },
|
|
191
|
+
LetterboxInBreaks: { type: "bool", default: false },
|
|
192
|
+
WidescreenStoryboard: { type: "bool", default: false },
|
|
193
|
+
EpilepsyWarning: { type: "bool", default: false },
|
|
194
|
+
SamplesMatchPlaybackRate: { type: "bool", default: false },
|
|
195
|
+
LastPlayed: { type: "date", optional: true },
|
|
196
|
+
DistanceSpacing: { type: "double", default: 0 },
|
|
197
|
+
BeatDivisor: { type: "int", default: 0 },
|
|
198
|
+
GridSize: { type: "int", default: 0 },
|
|
199
|
+
TimelineZoom: { type: "double", default: 0 },
|
|
200
|
+
EditorTimestamp: { type: "double", optional: true },
|
|
201
|
+
CountdownOffset: { type: "int", default: 0 }
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// src/core/lazer/schema/beatmapMetadata.ts
|
|
208
|
+
var import_realm2, BeatmapMetadata;
|
|
209
|
+
var init_beatmapMetadata = __esm(() => {
|
|
210
|
+
import_realm2 = __toESM(require("realm"));
|
|
211
|
+
BeatmapMetadata = class BeatmapMetadata extends import_realm2.default.Object {
|
|
212
|
+
Title;
|
|
213
|
+
TitleUnicode;
|
|
214
|
+
Artist;
|
|
215
|
+
ArtistUnicode;
|
|
216
|
+
Author;
|
|
217
|
+
Source;
|
|
218
|
+
Tags;
|
|
219
|
+
PreviewTime;
|
|
220
|
+
AudioFile;
|
|
221
|
+
BackgroundFile;
|
|
222
|
+
static schema = {
|
|
223
|
+
name: "BeatmapMetadata",
|
|
224
|
+
properties: {
|
|
225
|
+
Title: { type: "string", default: "", optional: true },
|
|
226
|
+
TitleUnicode: { type: "string", default: "", optional: true },
|
|
227
|
+
Artist: { type: "string", default: "", optional: true },
|
|
228
|
+
ArtistUnicode: { type: "string", default: "", optional: true },
|
|
229
|
+
Author: { type: "object", objectType: "RealmUser", default: null },
|
|
230
|
+
Source: { type: "string", default: "", optional: true },
|
|
231
|
+
Tags: { type: "string", default: "", optional: true },
|
|
232
|
+
PreviewTime: { type: "int", default: 0 },
|
|
233
|
+
AudioFile: { type: "string", default: "", optional: true },
|
|
234
|
+
BackgroundFile: { type: "string", default: "", optional: true }
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
// src/core/lazer/schema/beatmapSet.ts
|
|
241
|
+
var import_realm3, BeatmapSet;
|
|
242
|
+
var init_beatmapSet = __esm(() => {
|
|
243
|
+
import_realm3 = __toESM(require("realm"));
|
|
244
|
+
BeatmapSet = class BeatmapSet extends import_realm3.default.Object {
|
|
245
|
+
ID;
|
|
246
|
+
OnlineID;
|
|
247
|
+
DateAdded;
|
|
248
|
+
DateSubmitted;
|
|
249
|
+
DateRanked;
|
|
250
|
+
Beatmaps;
|
|
251
|
+
Files;
|
|
252
|
+
Status;
|
|
253
|
+
DeletePending;
|
|
254
|
+
Hash;
|
|
255
|
+
Protected;
|
|
256
|
+
static schema = {
|
|
257
|
+
name: "BeatmapSet",
|
|
258
|
+
primaryKey: "ID",
|
|
259
|
+
properties: {
|
|
260
|
+
ID: { type: "uuid", default: "" },
|
|
261
|
+
OnlineID: { type: "int", default: -1 },
|
|
262
|
+
DateAdded: { type: "date" },
|
|
263
|
+
DateSubmitted: { type: "date", optional: true },
|
|
264
|
+
DateRanked: { type: "date", optional: true },
|
|
265
|
+
Beatmaps: { type: "list", objectType: "Beatmap", default: [] },
|
|
266
|
+
Files: { type: "list", objectType: "RealmNamedFileUsage", default: [] },
|
|
267
|
+
Status: { type: "int", default: -3 },
|
|
268
|
+
DeletePending: { type: "bool", default: false },
|
|
269
|
+
Hash: { type: "string", default: "", optional: true },
|
|
270
|
+
Protected: { type: "bool", default: false }
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
// src/core/lazer/schema/realmFile.ts
|
|
277
|
+
var import_realm4, RealmFile;
|
|
278
|
+
var init_realmFile = __esm(() => {
|
|
279
|
+
import_realm4 = __toESM(require("realm"));
|
|
280
|
+
RealmFile = class RealmFile extends import_realm4.default.Object {
|
|
281
|
+
Hash;
|
|
282
|
+
static schema = {
|
|
283
|
+
name: "File",
|
|
284
|
+
primaryKey: "Hash",
|
|
285
|
+
properties: {
|
|
286
|
+
Hash: { type: "string", default: "", optional: true }
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
// src/core/lazer/schema/realmUser.ts
|
|
293
|
+
var import_realm5, RealmUser;
|
|
294
|
+
var init_realmUser = __esm(() => {
|
|
295
|
+
import_realm5 = __toESM(require("realm"));
|
|
296
|
+
RealmUser = class RealmUser extends import_realm5.default.Object {
|
|
297
|
+
OnlineID;
|
|
298
|
+
Username;
|
|
299
|
+
CountryCode;
|
|
300
|
+
static embedded = true;
|
|
301
|
+
static schema = {
|
|
302
|
+
name: "RealmUser",
|
|
303
|
+
embedded: true,
|
|
304
|
+
properties: {
|
|
305
|
+
OnlineID: { type: "int", default: 1 },
|
|
306
|
+
Username: { type: "string", default: "", optional: true },
|
|
307
|
+
CountryCode: { type: "string", optional: true }
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
// src/core/lazer/schema/realmNamedFileUsage.ts
|
|
314
|
+
var import_realm6, RealmNamedFileUsage;
|
|
315
|
+
var init_realmNamedFileUsage = __esm(() => {
|
|
316
|
+
import_realm6 = __toESM(require("realm"));
|
|
317
|
+
RealmNamedFileUsage = class RealmNamedFileUsage extends import_realm6.default.Object {
|
|
318
|
+
File;
|
|
319
|
+
Filename;
|
|
320
|
+
static embedded = true;
|
|
321
|
+
static schema = {
|
|
322
|
+
name: "RealmNamedFileUsage",
|
|
323
|
+
embedded: true,
|
|
324
|
+
properties: {
|
|
325
|
+
File: "File",
|
|
326
|
+
Filename: { type: "string", optional: true }
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
// src/core/lazer/schema/mod.ts
|
|
333
|
+
var init_mod = __esm(() => {
|
|
334
|
+
init_beatmap();
|
|
335
|
+
init_beatmapMetadata();
|
|
336
|
+
init_beatmapSet();
|
|
337
|
+
init_realmFile();
|
|
338
|
+
init_realmUser();
|
|
339
|
+
init_realmNamedFileUsage();
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
// src/core/utils/mod.ts
|
|
343
|
+
function getDataDir() {
|
|
344
|
+
switch (process.platform) {
|
|
345
|
+
case "linux":
|
|
346
|
+
case "openbsd":
|
|
347
|
+
case "freebsd": {
|
|
348
|
+
const xdg = process.env.XDG_DATA_HOME;
|
|
349
|
+
if (xdg)
|
|
350
|
+
return xdg;
|
|
351
|
+
const home = process.env.HOME;
|
|
352
|
+
if (home)
|
|
353
|
+
return import_node_path.default.join(home, ".local", "share");
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
356
|
+
case "darwin": {
|
|
357
|
+
const home = process.env.HOME;
|
|
358
|
+
if (home)
|
|
359
|
+
return import_node_path.default.join(home, "Library", "Application Support");
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
case "win32":
|
|
363
|
+
return process.env.LOCALAPPDATA ?? undefined;
|
|
364
|
+
}
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
function getConfigDir() {
|
|
368
|
+
switch (process.platform) {
|
|
369
|
+
case "openbsd":
|
|
370
|
+
case "freebsd":
|
|
371
|
+
case "linux": {
|
|
372
|
+
const xdg = process.env.XDG_CONFIG_HOME;
|
|
373
|
+
if (xdg)
|
|
374
|
+
return xdg;
|
|
375
|
+
const home = process.env.HOME;
|
|
376
|
+
if (home)
|
|
377
|
+
return import_node_path.default.join(home, ".config");
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
case "darwin": {
|
|
381
|
+
const home = process.env.HOME;
|
|
382
|
+
if (home)
|
|
383
|
+
return import_node_path.default.join(home, "Library", "Preferences");
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
386
|
+
case "win32":
|
|
387
|
+
return process.env.APPDATA ?? undefined;
|
|
388
|
+
}
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
function getDefaultOsuDataDir() {
|
|
392
|
+
return import_node_path.default.join(getDataDir() ?? ".", "osu");
|
|
393
|
+
}
|
|
394
|
+
function getDefaultConfigPath(appName = "osu-play") {
|
|
395
|
+
return import_node_path.default.join(getConfigDir() ?? ".", appName);
|
|
396
|
+
}
|
|
397
|
+
function hashedFilePath(hash, osuDataDir = getDefaultOsuDataDir()) {
|
|
398
|
+
return import_node_path.default.join(osuDataDir, "files", hash.slice(0, 1), hash.slice(0, 2), hash);
|
|
399
|
+
}
|
|
400
|
+
function getRealmDBPath(legacyAppConfigDirOrOptions = {}, maybeOptions = {}) {
|
|
401
|
+
const options = typeof legacyAppConfigDirOrOptions === "string" ? maybeOptions : legacyAppConfigDirOrOptions;
|
|
402
|
+
const osuDataDir = options.osuDataDir ?? getDefaultOsuDataDir();
|
|
403
|
+
const osuDBPath = import_node_path.default.join(osuDataDir, "client.realm");
|
|
404
|
+
if (!import_node_fs.existsSync(osuDBPath)) {
|
|
405
|
+
console.log(`[getRealmDBPath]: ${osuDBPath} not found`);
|
|
406
|
+
return null;
|
|
407
|
+
}
|
|
408
|
+
return osuDBPath;
|
|
409
|
+
}
|
|
410
|
+
var import_node_path, import_node_fs;
|
|
411
|
+
var init_mod2 = __esm(() => {
|
|
412
|
+
import_node_path = __toESM(require("node:path"));
|
|
413
|
+
import_node_fs = require("node:fs");
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
// src/core/lazer/mod.ts
|
|
417
|
+
var exports_mod = {};
|
|
418
|
+
__export(exports_mod, {
|
|
419
|
+
inspectLazerSchemaEntries: () => inspectLazerSchemaEntries,
|
|
420
|
+
inspectLazerSchema: () => inspectLazerSchema,
|
|
421
|
+
hashedFilePath: () => hashedFilePath,
|
|
422
|
+
getNamedFileHash: () => getNamedFileHash,
|
|
423
|
+
getLazerDB: () => getLazerDB,
|
|
424
|
+
getBeatmapSets: () => getBeatmapSets,
|
|
425
|
+
formatLazerSchemaCompatibilityError: () => formatLazerSchemaCompatibilityError,
|
|
426
|
+
RealmUser: () => RealmUser,
|
|
427
|
+
RealmNamedFileUsage: () => RealmNamedFileUsage,
|
|
428
|
+
RealmFile: () => RealmFile,
|
|
429
|
+
LAST_STATIC_LAZER_SCHEMA_VERSION: () => LAST_STATIC_LAZER_SCHEMA_VERSION,
|
|
430
|
+
BeatmapSet: () => BeatmapSet,
|
|
431
|
+
BeatmapMetadata: () => BeatmapMetadata,
|
|
432
|
+
Beatmap: () => Beatmap
|
|
433
|
+
});
|
|
434
|
+
function inspectLazerSchema(realm) {
|
|
435
|
+
return inspectLazerSchemaEntries(realm.schema, import_realm7.default.schemaVersion(realm.path));
|
|
436
|
+
}
|
|
437
|
+
function getBeatmapSets(realm) {
|
|
438
|
+
return realm.objects("BeatmapSet");
|
|
439
|
+
}
|
|
440
|
+
var import_realm7, getLazerDB = async (realmDBPath) => {
|
|
441
|
+
return import_realm7.default.open({
|
|
442
|
+
path: realmDBPath,
|
|
443
|
+
readOnly: true
|
|
444
|
+
});
|
|
445
|
+
}, getNamedFileHash = (fileName, beatmapSet) => {
|
|
446
|
+
const files = beatmapSet.Files;
|
|
447
|
+
for (const file of files) {
|
|
448
|
+
if (file.Filename == fileName)
|
|
449
|
+
return file.File.Hash;
|
|
450
|
+
}
|
|
451
|
+
return;
|
|
452
|
+
};
|
|
453
|
+
var init_mod3 = __esm(() => {
|
|
454
|
+
init_compat();
|
|
455
|
+
init_mod();
|
|
456
|
+
init_compat();
|
|
457
|
+
init_mod2();
|
|
458
|
+
import_realm7 = __toESM(require("realm"));
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
// src/index.ts
|
|
462
|
+
var exports_src = {};
|
|
463
|
+
__export(exports_src, {
|
|
464
|
+
inspectLazerSchemaEntries: () => inspectLazerSchemaEntries,
|
|
465
|
+
inspectLazerSchema: () => inspectLazerSchema,
|
|
466
|
+
hashedFilePath: () => hashedFilePath,
|
|
467
|
+
getRealmDBPath: () => getRealmDBPath,
|
|
468
|
+
getNamedFileHash: () => getNamedFileHash,
|
|
469
|
+
getLazerDB: () => getLazerDB,
|
|
470
|
+
getDefaultOsuDataDir: () => getDefaultOsuDataDir,
|
|
471
|
+
getDefaultConfigPath: () => getDefaultConfigPath,
|
|
472
|
+
getDataDir: () => getDataDir,
|
|
473
|
+
getConfigDir: () => getConfigDir,
|
|
474
|
+
getBeatmapSets: () => getBeatmapSets,
|
|
475
|
+
formatTrackTitle: () => formatTrackTitle,
|
|
476
|
+
formatLazerSchemaCompatibilityError: () => formatLazerSchemaCompatibilityError,
|
|
477
|
+
buildPlaylist: () => buildPlaylist,
|
|
478
|
+
RealmUser: () => RealmUser,
|
|
479
|
+
RealmNamedFileUsage: () => RealmNamedFileUsage,
|
|
480
|
+
RealmFile: () => RealmFile,
|
|
481
|
+
LAST_STATIC_LAZER_SCHEMA_VERSION: () => LAST_STATIC_LAZER_SCHEMA_VERSION,
|
|
482
|
+
BeatmapSet: () => BeatmapSet,
|
|
483
|
+
BeatmapMetadata: () => BeatmapMetadata,
|
|
484
|
+
Beatmap: () => Beatmap
|
|
485
|
+
});
|
|
486
|
+
module.exports = __toCommonJS(exports_src);
|
|
487
|
+
init_mod3();
|
|
488
|
+
init_mod();
|
|
489
|
+
init_mod2();
|
|
490
|
+
|
|
491
|
+
// src/core/playlist/mod.ts
|
|
492
|
+
init_mod2();
|
|
493
|
+
function uniqueParts(parts) {
|
|
494
|
+
return [...new Set(parts.map((part) => part?.trim()).filter(Boolean))];
|
|
495
|
+
}
|
|
496
|
+
function formatTrackTitle(metadata) {
|
|
497
|
+
const title = uniqueParts([metadata.Title, metadata.TitleUnicode]).join(" / ");
|
|
498
|
+
const artist = uniqueParts([metadata.Artist, metadata.ArtistUnicode]).join(" / ");
|
|
499
|
+
return `${title || "Unknown Title"} - ${artist || "Unknown Artist"}`;
|
|
500
|
+
}
|
|
501
|
+
function getNamedFileHash2(fileName, beatmapSet) {
|
|
502
|
+
for (const file of beatmapSet.Files) {
|
|
503
|
+
if (file.Filename === fileName && file.File?.Hash) {
|
|
504
|
+
return file.File.Hash;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
function buildPlaylist(beatmapSets, osuDataDir) {
|
|
510
|
+
const seenHashes = new Set;
|
|
511
|
+
const playlist = [];
|
|
512
|
+
for (const beatmapSet of beatmapSets) {
|
|
513
|
+
for (const beatmap of beatmapSet.Beatmaps) {
|
|
514
|
+
const hash = getNamedFileHash2(beatmap.Metadata.AudioFile ?? "", beatmapSet);
|
|
515
|
+
if (!hash || seenHashes.has(hash)) {
|
|
516
|
+
continue;
|
|
517
|
+
}
|
|
518
|
+
seenHashes.add(hash);
|
|
519
|
+
playlist.push({
|
|
520
|
+
hash,
|
|
521
|
+
path: hashedFilePath(hash, osuDataDir),
|
|
522
|
+
title: formatTrackTitle(beatmap.Metadata)
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return playlist;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
//# debugId=263D026F06C2211C64756E2164756E21
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/core/lazer/compat.ts", "../src/core/lazer/schema/beatmap.ts", "../src/core/lazer/schema/beatmapMetadata.ts", "../src/core/lazer/schema/beatmapSet.ts", "../src/core/lazer/schema/realmFile.ts", "../src/core/lazer/schema/realmUser.ts", "../src/core/lazer/schema/realmNamedFileUsage.ts", "../src/core/lazer/schema/mod.ts", "../src/core/utils/mod.ts", "../src/core/lazer/mod.ts", "../src/index.ts", "../src/core/playlist/mod.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"type SchemaPropertyLike = {\n type?: string;\n objectType?: string;\n};\n\ntype SchemaEntryLike = {\n name: string;\n properties: Record<string, SchemaPropertyLike>;\n};\n\ntype RequiredSchemaShape = Record<\n string,\n Record<string, { type?: string; objectType?: string }>\n>;\n\nexport type LazerSchemaCompatibilityIssue = {\n objectName: string;\n propertyName: string;\n expected: string;\n actual: string;\n};\n\nexport type LazerSchemaCompatibilityReport = {\n compatible: boolean;\n version: number;\n missingObjects: string[];\n issues: LazerSchemaCompatibilityIssue[];\n};\n\nexport const LAST_STATIC_LAZER_SCHEMA_VERSION = 46;\n\nconst REQUIRED_PLAYLIST_SCHEMA: RequiredSchemaShape = {\n BeatmapSet: {\n Beatmaps: { type: \"list\", objectType: \"Beatmap\" },\n Files: { type: \"list\", objectType: \"RealmNamedFileUsage\" },\n },\n Beatmap: {\n Metadata: { type: \"object\", objectType: \"BeatmapMetadata\" },\n },\n BeatmapMetadata: {\n AudioFile: { type: \"string\" },\n Title: { type: \"string\" },\n Artist: { type: \"string\" },\n TitleUnicode: { type: \"string\" },\n ArtistUnicode: { type: \"string\" },\n },\n RealmNamedFileUsage: {\n File: { type: \"object\", objectType: \"File\" },\n Filename: { type: \"string\" },\n },\n File: {\n Hash: { type: \"string\" },\n },\n};\n\nfunction describeRequirement(requirement: { type?: string; objectType?: string }) {\n if (requirement.type === \"object\" || requirement.type === \"list\") {\n return `${requirement.type}:${requirement.objectType ?? \"unknown\"}`;\n }\n\n return requirement.type ?? \"unknown\";\n}\n\nfunction describeProperty(property: SchemaPropertyLike | undefined) {\n if (!property?.type) {\n return \"missing\";\n }\n\n if (property.type === \"object\" || property.type === \"list\") {\n return `${property.type}:${property.objectType ?? \"unknown\"}`;\n }\n\n return property.type;\n}\n\nexport function inspectLazerSchemaEntries(\n schemaEntries: SchemaEntryLike[],\n version: number,\n): LazerSchemaCompatibilityReport {\n const schemaByName = new Map(schemaEntries.map((entry) => [entry.name, entry]));\n const missingObjects: string[] = [];\n const issues: LazerSchemaCompatibilityIssue[] = [];\n\n for (const [objectName, requirements] of Object.entries(REQUIRED_PLAYLIST_SCHEMA)) {\n const schemaEntry = schemaByName.get(objectName);\n if (!schemaEntry) {\n missingObjects.push(objectName);\n continue;\n }\n\n for (const [propertyName, requirement] of Object.entries(requirements)) {\n const property = schemaEntry.properties[propertyName];\n const typeMatches = !requirement.type || property?.type === requirement.type;\n const objectTypeMatches =\n !requirement.objectType || property?.objectType === requirement.objectType;\n\n if (!typeMatches || !objectTypeMatches) {\n issues.push({\n objectName,\n propertyName,\n expected: describeRequirement(requirement),\n actual: describeProperty(property),\n });\n }\n }\n }\n\n return {\n compatible: missingObjects.length === 0 && issues.length === 0,\n version,\n missingObjects,\n issues,\n };\n}\n\nexport function formatLazerSchemaCompatibilityError(\n report: LazerSchemaCompatibilityReport,\n) {\n const details = [\n `Detected osu!lazer schema version ${report.version}, but the playlist reader is missing fields it needs.`,\n ];\n\n if (report.missingObjects.length > 0) {\n details.push(`Missing objects: ${report.missingObjects.join(\", \")}`);\n }\n\n if (report.issues.length > 0) {\n details.push(\n `Mismatched properties: ${report.issues\n .map(\n (issue) =>\n `${issue.objectName}.${issue.propertyName} expected ${issue.expected}, got ${issue.actual}`,\n )\n .join(\"; \")}`,\n );\n }\n\n details.push(\n \"This app now reflects the live lazer schema and only depends on a small playlist-safe subset, so version bumps are fine until those required fields change.\",\n );\n\n return details.join(\"\\n\");\n}\n",
|
|
6
|
+
"import Realm from \"realm\";\nimport type { ObjectSchema } from \"realm\";\nimport { BeatmapMetadata } from \"./beatmapMetadata.js\";\n\nexport class Beatmap extends Realm.Object<Beatmap> {\n ID!: string;\n DifficultyName?: string;\n Metadata!: BeatmapMetadata;\n BeatmapSet!: any;\n Status!: number;\n OnlineID!: number;\n Length!: number;\n BPM!: number;\n Hash?: string;\n StarRating!: number;\n MD5Hash?: string;\n OnlineMD5Hash?: string;\n LastLocalUpdate?: Date;\n LastOnlineUpdate?: Date;\n Hidden!: boolean;\n AudioLeadIn!: number;\n StackLeniency!: number;\n SpecialStyle!: boolean;\n LetterboxInBreaks!: boolean;\n WidescreenStoryboard!: boolean;\n EpilepsyWarning!: boolean;\n SamplesMatchPlaybackRate!: boolean;\n LastPlayed?: Date;\n DistanceSpacing!: number;\n BeatDivisor!: number;\n GridSize!: number;\n TimelineZoom!: number;\n EditorTimestamp?: number;\n CountdownOffset!: number;\n\n static schema: ObjectSchema = {\n name: \"Beatmap\",\n primaryKey: \"ID\",\n properties: {\n ID: { type: \"uuid\", default: \"\" },\n DifficultyName: { type: \"string\", default: \"\", optional: true },\n Metadata: {\n type: \"object\",\n objectType: \"BeatmapMetadata\",\n default: null,\n },\n BeatmapSet: { type: \"object\", objectType: \"BeatmapSet\", default: null },\n Status: { type: \"int\", default: -3 },\n OnlineID: { type: \"int\", default: -1 },\n Length: { type: \"double\", default: 0 },\n BPM: { type: \"double\", default: 0 },\n Hash: { type: \"string\", default: \"\", optional: true },\n StarRating: { type: \"double\", default: -1 },\n MD5Hash: { type: \"string\", default: \"\", optional: true },\n OnlineMD5Hash: { type: \"string\", default: \"\", optional: true },\n LastLocalUpdate: { type: \"date\", optional: true },\n LastOnlineUpdate: { type: \"date\", optional: true },\n Hidden: { type: \"bool\", default: false },\n AudioLeadIn: { type: \"double\", default: 0 },\n StackLeniency: { type: \"float\", default: 0.7 },\n SpecialStyle: { type: \"bool\", default: false },\n LetterboxInBreaks: { type: \"bool\", default: false },\n WidescreenStoryboard: { type: \"bool\", default: false },\n EpilepsyWarning: { type: \"bool\", default: false },\n SamplesMatchPlaybackRate: { type: \"bool\", default: false },\n LastPlayed: { type: \"date\", optional: true },\n DistanceSpacing: { type: \"double\", default: 0 },\n BeatDivisor: { type: \"int\", default: 0 },\n GridSize: { type: \"int\", default: 0 },\n TimelineZoom: { type: \"double\", default: 0 },\n EditorTimestamp: { type: \"double\", optional: true },\n CountdownOffset: { type: \"int\", default: 0 },\n },\n };\n}\n",
|
|
7
|
+
"import Realm from \"realm\";\nimport type { ObjectSchema } from \"realm\";\nimport { RealmUser } from \"./realmUser.js\";\n\nexport class BeatmapMetadata extends Realm.Object<BeatmapMetadata> {\n Title?: string;\n TitleUnicode?: string;\n Artist?: string;\n ArtistUnicode?: string;\n Author?: RealmUser;\n Source?: string;\n Tags?: string;\n PreviewTime?: number;\n AudioFile?: string;\n BackgroundFile?: string;\n\n static schema: ObjectSchema = {\n name: \"BeatmapMetadata\",\n properties: {\n Title: { type: \"string\", default: \"\", optional: true },\n TitleUnicode: { type: \"string\", default: \"\", optional: true },\n Artist: { type: \"string\", default: \"\", optional: true },\n ArtistUnicode: { type: \"string\", default: \"\", optional: true },\n Author: { type: \"object\", objectType: \"RealmUser\", default: null },\n Source: { type: \"string\", default: \"\", optional: true },\n Tags: { type: \"string\", default: \"\", optional: true },\n PreviewTime: { type: \"int\", default: 0 },\n AudioFile: { type: \"string\", default: \"\", optional: true },\n BackgroundFile: { type: \"string\", default: \"\", optional: true },\n },\n };\n}\n",
|
|
8
|
+
"import Realm from \"realm\";\nimport type { ObjectSchema } from \"realm\";\nimport { Beatmap } from \"./beatmap.js\";\nimport { RealmNamedFileUsage } from \"./realmNamedFileUsage.js\";\n\nexport class BeatmapSet extends Realm.Object<BeatmapSet> {\n ID!: string;\n OnlineID!: number;\n DateAdded!: Date;\n DateSubmitted?: Date;\n DateRanked?: Date;\n Beatmaps!: Realm.List<Beatmap>;\n Files!: Realm.List<RealmNamedFileUsage>;\n Status!: number;\n DeletePending!: boolean;\n Hash?: string;\n Protected!: boolean;\n\n static schema: ObjectSchema = {\n name: \"BeatmapSet\",\n primaryKey: \"ID\",\n properties: {\n ID: { type: \"uuid\", default: \"\" },\n OnlineID: { type: \"int\", default: -1 },\n DateAdded: { type: \"date\" },\n DateSubmitted: { type: \"date\", optional: true },\n DateRanked: { type: \"date\", optional: true },\n Beatmaps: { type: \"list\", objectType: \"Beatmap\", default: [] },\n Files: { type: \"list\", objectType: \"RealmNamedFileUsage\", default: [] },\n Status: { type: \"int\", default: -3 },\n DeletePending: { type: \"bool\", default: false },\n Hash: { type: \"string\", default: \"\", optional: true },\n Protected: { type: \"bool\", default: false },\n },\n };\n}\n",
|
|
9
|
+
"import Realm from \"realm\";\nimport type { ObjectSchema } from \"realm\";\n\nexport class RealmFile extends Realm.Object<RealmFile> {\n Hash?: string;\n\n static schema: ObjectSchema = {\n name: \"File\",\n primaryKey: \"Hash\",\n properties: {\n Hash: { type: \"string\", default: \"\", optional: true },\n },\n };\n}\n\n",
|
|
10
|
+
"import Realm from \"realm\";\nimport type { ObjectSchema } from \"realm\";\n\nexport class RealmUser extends Realm.Object<RealmUser> {\n OnlineID!: number;\n Username?: string;\n CountryCode?: string;\n\n static embedded = true;\n\n static schema: ObjectSchema = {\n name: \"RealmUser\",\n embedded: true,\n properties: {\n OnlineID: { type: \"int\", default: 1 },\n Username: { type: \"string\", default: \"\", optional: true },\n CountryCode: { type: \"string\", optional: true },\n },\n };\n}\n\n",
|
|
11
|
+
"import Realm from \"realm\";\nimport type { ObjectSchema } from \"realm\";\nimport { RealmFile } from \"./realmFile.js\";\n\nexport class RealmNamedFileUsage extends Realm.Object<RealmNamedFileUsage> {\n File!: RealmFile;\n Filename?: string;\n\n static embedded = true;\n\n static schema: ObjectSchema = {\n name: \"RealmNamedFileUsage\",\n embedded: true,\n properties: {\n File: \"File\",\n Filename: { type: \"string\", optional: true },\n },\n };\n}\n",
|
|
12
|
+
"export { Beatmap } from \"./beatmap.js\";\nexport { BeatmapMetadata } from \"./beatmapMetadata.js\";\nexport { BeatmapSet } from \"./beatmapSet.js\";\nexport { RealmFile } from \"./realmFile.js\";\nexport { RealmUser } from \"./realmUser.js\";\nexport { RealmNamedFileUsage } from \"./realmNamedFileUsage.js\";\n",
|
|
13
|
+
"import path from \"node:path\";\nimport { existsSync } from \"node:fs\";\n\nexport function getDataDir(): string | undefined {\n switch (process.platform) {\n case \"linux\":\n case \"openbsd\":\n case \"freebsd\": {\n const xdg = process.env.XDG_DATA_HOME;\n if (xdg) return xdg;\n\n const home = process.env.HOME;\n if (home) return path.join(home, \".local\", \"share\");\n break;\n }\n\n case \"darwin\": {\n const home = process.env.HOME;\n if (home) return path.join(home, \"Library\", \"Application Support\");\n break;\n }\n\n case \"win32\":\n return process.env.LOCALAPPDATA ?? undefined;\n }\n\n return undefined;\n}\n\nexport function getConfigDir(): string | undefined {\n switch (process.platform) {\n case \"openbsd\":\n case \"freebsd\":\n case \"linux\": {\n const xdg = process.env.XDG_CONFIG_HOME;\n if (xdg) return xdg;\n\n const home = process.env.HOME;\n if (home) return path.join(home, \".config\");\n break;\n }\n\n case \"darwin\": {\n const home = process.env.HOME;\n if (home) return path.join(home, \"Library\", \"Preferences\");\n break;\n }\n\n case \"win32\":\n return process.env.APPDATA ?? undefined;\n }\n\n return undefined;\n}\n\nexport function getDefaultOsuDataDir() {\n return path.join(getDataDir() ?? \".\", \"osu\");\n}\n\nexport function getDefaultConfigPath(appName: string = \"osu-play\") {\n return path.join(getConfigDir() ?? \".\", appName);\n}\n\nexport function hashedFilePath(\n hash: string,\n osuDataDir: string = getDefaultOsuDataDir(),\n) {\n return path.join(\n osuDataDir,\n \"files\",\n hash.slice(0, 1),\n hash.slice(0, 2),\n hash,\n );\n}\n\ntype RealmPathOptions = {\n osuDataDir?: string;\n};\n\n/**\n * Returns osu!lazer's live Realm DB path directly.\n * The legacy `appConfigDir` positional argument is accepted for backwards\n * compatibility but no longer used.\n */\nexport function getRealmDBPath(options?: RealmPathOptions): string | null;\nexport function getRealmDBPath(\n legacyAppConfigDir: string,\n options?: RealmPathOptions,\n): string | null;\nexport function getRealmDBPath(\n legacyAppConfigDirOrOptions: string | RealmPathOptions = {},\n maybeOptions: RealmPathOptions = {},\n) {\n const options =\n typeof legacyAppConfigDirOrOptions === \"string\"\n ? maybeOptions\n : legacyAppConfigDirOrOptions;\n const osuDataDir = options.osuDataDir ?? getDefaultOsuDataDir();\n const osuDBPath = path.join(osuDataDir, \"client.realm\");\n\n if (!existsSync(osuDBPath)) {\n console.log(`[getRealmDBPath]: ${osuDBPath} not found`);\n return null;\n }\n\n return osuDBPath;\n}\n",
|
|
14
|
+
"import Realm from \"realm\";\nimport type { PlaylistBeatmapSet } from \"../playlist/mod.js\";\nimport type { BeatmapSet } from \"./schema/beatmapSet.js\";\nimport { inspectLazerSchemaEntries } from \"./compat.js\";\n\nexport {\n Beatmap,\n BeatmapMetadata,\n BeatmapSet,\n RealmFile,\n RealmNamedFileUsage,\n RealmUser,\n} from \"./schema/mod.js\";\nexport {\n formatLazerSchemaCompatibilityError,\n inspectLazerSchemaEntries,\n LAST_STATIC_LAZER_SCHEMA_VERSION,\n} from \"./compat.js\";\nexport { hashedFilePath } from \"../utils/mod.js\";\n\ntype SchemaPropertyLike = {\n type?: string;\n objectType?: string;\n};\n\ntype SchemaEntryLike = {\n name: string;\n properties: Record<string, SchemaPropertyLike>;\n};\n\nexport function inspectLazerSchema(realm: Realm) {\n return inspectLazerSchemaEntries(\n realm.schema as unknown as SchemaEntryLike[],\n Realm.schemaVersion(realm.path),\n );\n}\n\nexport const getLazerDB = async (realmDBPath: string) => {\n return Realm.open({\n path: realmDBPath,\n readOnly: true,\n });\n};\n\nexport function getBeatmapSets(realm: Realm) {\n return realm.objects(\"BeatmapSet\") as unknown as Iterable<PlaylistBeatmapSet>;\n}\n\nexport const getNamedFileHash = (fileName: string, beatmapSet: BeatmapSet) => {\n const files = beatmapSet.Files;\n for (const file of files) {\n if (file.Filename == fileName) return file.File.Hash;\n }\n return undefined;\n};\n",
|
|
15
|
+
"export * from \"./core/lazer/mod.js\";\nexport * from \"./core/lazer/schema/mod.js\";\nexport * from \"./core/utils/mod.js\";\nexport { buildPlaylist, formatTrackTitle } from \"./core/playlist/mod.js\";\n",
|
|
16
|
+
"import { hashedFilePath } from \"../utils/mod.js\";\n\nexport type PlaylistBeatmapMetadata = {\n AudioFile?: string | null;\n Title?: string | null;\n Artist?: string | null;\n TitleUnicode?: string | null;\n ArtistUnicode?: string | null;\n};\n\nexport type PlaylistBeatmap = {\n Metadata: PlaylistBeatmapMetadata;\n};\n\nexport type PlaylistFile = {\n Filename?: string | null;\n File?: {\n Hash?: string | null;\n } | null;\n};\n\nexport type PlaylistBeatmapSet = {\n Beatmaps: Iterable<PlaylistBeatmap>;\n Files: Iterable<PlaylistFile>;\n};\n\nexport type PlaylistTrack = {\n hash: string;\n path: string;\n title: string;\n};\n\nfunction uniqueParts(parts: Array<string | null | undefined>) {\n return [...new Set(parts.map((part) => part?.trim()).filter(Boolean))];\n}\n\nexport function formatTrackTitle(metadata: PlaylistBeatmapMetadata) {\n const title = uniqueParts([metadata.Title, metadata.TitleUnicode]).join(\" / \");\n const artist = uniqueParts([metadata.Artist, metadata.ArtistUnicode]).join(\" / \");\n\n return `${title || \"Unknown Title\"} - ${artist || \"Unknown Artist\"}`;\n}\n\nexport function getNamedFileHash(fileName: string, beatmapSet: PlaylistBeatmapSet) {\n for (const file of beatmapSet.Files) {\n if (file.Filename === fileName && file.File?.Hash) {\n return file.File.Hash;\n }\n }\n\n return undefined;\n}\n\nexport function buildPlaylist(\n beatmapSets: Iterable<PlaylistBeatmapSet>,\n osuDataDir: string,\n) {\n const seenHashes = new Set<string>();\n const playlist: PlaylistTrack[] = [];\n\n for (const beatmapSet of beatmapSets) {\n for (const beatmap of beatmapSet.Beatmaps) {\n const hash = getNamedFileHash(beatmap.Metadata.AudioFile ?? \"\", beatmapSet);\n if (!hash || seenHashes.has(hash)) {\n continue;\n }\n\n seenHashes.add(hash);\n playlist.push({\n hash,\n path: hashedFilePath(hash, osuDataDir),\n title: formatTrackTitle(beatmap.Metadata),\n });\n }\n }\n\n return playlist;\n}\n"
|
|
17
|
+
],
|
|
18
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,SAAS,mBAAmB,CAAC,aAAqD;AAAA,EAChF,IAAI,YAAY,SAAS,YAAY,YAAY,SAAS,QAAQ;AAAA,IAChE,OAAO,GAAG,YAAY,QAAQ,YAAY,cAAc;AAAA,EAC1D;AAAA,EAEA,OAAO,YAAY,QAAQ;AAAA;AAG7B,SAAS,gBAAgB,CAAC,UAA0C;AAAA,EAClE,IAAI,CAAC,UAAU,MAAM;AAAA,IACnB,OAAO;AAAA,EACT;AAAA,EAEA,IAAI,SAAS,SAAS,YAAY,SAAS,SAAS,QAAQ;AAAA,IAC1D,OAAO,GAAG,SAAS,QAAQ,SAAS,cAAc;AAAA,EACpD;AAAA,EAEA,OAAO,SAAS;AAAA;AAGX,SAAS,yBAAyB,CACvC,eACA,SACgC;AAAA,EAChC,MAAM,eAAe,IAAI,IAAI,cAAc,IAAI,CAAC,UAAU,CAAC,MAAM,MAAM,KAAK,CAAC,CAAC;AAAA,EAC9E,MAAM,iBAA2B,CAAC;AAAA,EAClC,MAAM,SAA0C,CAAC;AAAA,EAEjD,YAAY,YAAY,iBAAiB,OAAO,QAAQ,wBAAwB,GAAG;AAAA,IACjF,MAAM,cAAc,aAAa,IAAI,UAAU;AAAA,IAC/C,IAAI,CAAC,aAAa;AAAA,MAChB,eAAe,KAAK,UAAU;AAAA,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