osu-play 1.3.3 → 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 CHANGED
@@ -9,14 +9,15 @@
9
9
 
10
10
  </h1>
11
11
 
12
- > Listen to your favourite [osu!lazer](https://lazer.ppy.sh) beatmaps as a
13
- > spotify playlist from the terminal
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
@@ -57,17 +64,53 @@ osu-play --loop
57
64
  - `o`: Reveal the selected track in the native file manager
58
65
  - `n` / `p`: Next or previous track
59
66
  - `PageUp` / `PageDown`: Jump faster through the playlist
67
+ - `x`: Toggle shuffle mode
60
68
  - `r`: Toggle looping
61
69
  - `s`: Stop playback
62
70
  - `q`: Quit
63
71
  - `/`: Enter search mode
64
72
  - Type in search mode: Filter tracks by title
65
73
  - `Up`/`Down` or `Ctrl+P`/`Ctrl+N` in search mode: Navigate matching tracks
74
+ - `Ctrl+W` in search mode: Delete the previous word
66
75
  - `Backspace`: Edit the search query
67
76
  - `Enter` in search mode: Play the selected match, leave search entry, and keep the filter
68
77
  - `Esc`: Leave search mode, or clear the current query outside search mode
69
78
 
70
- ### 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
71
114
 
72
115
  ```ts
73
116
  import { getLazerDB, getRealmDBPath } from "osu-play";
@@ -78,11 +121,14 @@ const db = await getLazerDB(realmPath);
78
121
 
79
122
  ## Options
80
123
 
124
+ - `--api`: Run the localhost Subsonic-compatible provider instead of the TUI
125
+ - `--apiPort`: Provider port (default: `4533`)
81
126
  - `--reload, -r`: Deprecated and ignored
82
127
  - `--exportPlaylist`: Export the discovered track paths to a file instead of launching the TUI
83
128
  - `--osuDataDir, -d`: Override the osu!lazer data directory
84
129
  - `--configDir, -c`: Deprecated and ignored
85
130
  - `--loop, -l`: Restart from the beginning when playback reaches the end
131
+ - `--shuffle, -s`: Play the playlist in shuffled order
86
132
  - `--help, -h`: Show help
87
133
 
88
134
  ## Development