osu-play 1.3.2 → 1.4.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 +54 -6
- package/dist/cli.cjs +967 -97
- package/dist/cli.cjs.map +10 -7
- package/dist/cli.js +956 -86
- package/dist/cli.js.map +10 -7
- package/dist/core/api/catalog.d.ts +61 -0
- package/dist/core/api/server.d.ts +13 -0
- package/dist/core/cli/main.d.ts +6 -0
- package/dist/core/lazer/library.d.ts +17 -0
- package/dist/core/player/mod.d.ts +1 -1
- package/dist/core/player/session.d.ts +13 -0
- package/dist/core/player/types.d.ts +1 -0
- package/dist/core/utils/mod.d.ts +1 -0
- package/dist/index.cjs +30 -4
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +29 -3
- package/dist/index.js.map +3 -3
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
|
|
10
10
|
</h1>
|
|
11
11
|
|
|
12
|
-
>
|
|
13
|
-
>
|
|
12
|
+
> Turn your [osu!lazer](https://lazer.ppy.sh) beatmap library into a terminal
|
|
13
|
+
> music player or a local music server for clients such as Kopuz.
|
|
14
14
|
|
|
15
15
|
## Requirements
|
|
16
16
|
|
|
17
17
|
- Node.js `20+`
|
|
18
|
-
- `mpv` available on your `PATH`
|
|
19
18
|
- An osu!lazer install with beatmaps available locally
|
|
19
|
+
- `mpv` available on your `PATH` for the terminal player (not required for API
|
|
20
|
+
or playlist export modes)
|
|
20
21
|
|
|
21
22
|
If you're developing locally, Realm's native bindings are still the one awkward part of this stack. Use the repo's `setup` script so Bun install and the Realm repair step happen in the right order.
|
|
22
23
|
|
|
@@ -46,6 +47,12 @@ osu-play --exportPlaylist playlist.txt
|
|
|
46
47
|
|
|
47
48
|
# Loop the playlist
|
|
48
49
|
osu-play --loop
|
|
50
|
+
|
|
51
|
+
# Start in shuffle mode
|
|
52
|
+
osu-play --shuffle
|
|
53
|
+
|
|
54
|
+
# Serve your library to Kopuz and other compatible clients
|
|
55
|
+
osu-play --api
|
|
49
56
|
```
|
|
50
57
|
|
|
51
58
|
### TUI Controls
|
|
@@ -54,18 +61,56 @@ osu-play --loop
|
|
|
54
61
|
- `Left/Right` or `h/l`: Seek backward or forward by 5 seconds
|
|
55
62
|
- `Enter`: Play the selected track
|
|
56
63
|
- `Space`: Pause or resume playback
|
|
64
|
+
- `o`: Reveal the selected track in the native file manager
|
|
57
65
|
- `n` / `p`: Next or previous track
|
|
58
66
|
- `PageUp` / `PageDown`: Jump faster through the playlist
|
|
67
|
+
- `x`: Toggle shuffle mode
|
|
59
68
|
- `r`: Toggle looping
|
|
60
69
|
- `s`: Stop playback
|
|
61
70
|
- `q`: Quit
|
|
62
71
|
- `/`: Enter search mode
|
|
63
|
-
- Type in search mode:
|
|
72
|
+
- Type in search mode: Filter tracks by title
|
|
73
|
+
- `Up`/`Down` or `Ctrl+P`/`Ctrl+N` in search mode: Navigate matching tracks
|
|
74
|
+
- `Ctrl+W` in search mode: Delete the previous word
|
|
64
75
|
- `Backspace`: Edit the search query
|
|
65
|
-
- `Enter
|
|
76
|
+
- `Enter` in search mode: Play the selected match, leave search entry, and keep the filter
|
|
66
77
|
- `Esc`: Leave search mode, or clear the current query outside search mode
|
|
67
78
|
|
|
68
|
-
### API
|
|
79
|
+
### Provider API for Kopuz
|
|
80
|
+
|
|
81
|
+
osu!play 1.4 adds a localhost music-provider mode that makes your existing
|
|
82
|
+
beatmap library available inside Kopuz—with album grouping, beatmap
|
|
83
|
+
backgrounds as artwork, original-quality streaming, and no separate library
|
|
84
|
+
import.
|
|
85
|
+
|
|
86
|
+
Start the provider:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
osu-play --api
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The server listens only on `http://127.0.0.1:4533`. In Kopuz:
|
|
93
|
+
|
|
94
|
+
1. Add a media server and choose **Custom (manual API)**.
|
|
95
|
+
2. Enter `http://127.0.0.1:4533` as the server URL.
|
|
96
|
+
3. Enter any non-empty username and password.
|
|
97
|
+
|
|
98
|
+
The provider exposes each osu! beatmap set as an album, streams the original
|
|
99
|
+
audio files, and uses beatmap backgrounds as cover art. It is intentionally
|
|
100
|
+
read-only: favorites and playlists are shown as empty and remote mutations are
|
|
101
|
+
not supported. Changes to the osu!lazer library are picked up the next time
|
|
102
|
+
Kopuz starts a library sync.
|
|
103
|
+
|
|
104
|
+
Use a different local port if needed:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
osu-play --api --apiPort 5533
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The API binds only to localhost and is not intended for LAN or internet
|
|
111
|
+
exposure.
|
|
112
|
+
|
|
113
|
+
### Library API
|
|
69
114
|
|
|
70
115
|
```ts
|
|
71
116
|
import { getLazerDB, getRealmDBPath } from "osu-play";
|
|
@@ -76,11 +121,14 @@ const db = await getLazerDB(realmPath);
|
|
|
76
121
|
|
|
77
122
|
## Options
|
|
78
123
|
|
|
124
|
+
- `--api`: Run the localhost Subsonic-compatible provider instead of the TUI
|
|
125
|
+
- `--apiPort`: Provider port (default: `4533`)
|
|
79
126
|
- `--reload, -r`: Deprecated and ignored
|
|
80
127
|
- `--exportPlaylist`: Export the discovered track paths to a file instead of launching the TUI
|
|
81
128
|
- `--osuDataDir, -d`: Override the osu!lazer data directory
|
|
82
129
|
- `--configDir, -c`: Deprecated and ignored
|
|
83
130
|
- `--loop, -l`: Restart from the beginning when playback reaches the end
|
|
131
|
+
- `--shuffle, -s`: Play the playlist in shuffled order
|
|
84
132
|
- `--help, -h`: Show help
|
|
85
133
|
|
|
86
134
|
## Development
|