silver-music-notifier 0.1.0 → 1.1.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 +68 -28
- package/dist/cli/index.js +831 -222
- package/dist/cli/index.js.map +1 -1
- package/dist/web/assets/index-DIWztYL6.js +11 -0
- package/dist/web/assets/index-MSzNdpYK.css +1 -0
- package/dist/web/favicon.svg +1 -0
- package/dist/web/index.html +3 -2
- package/package.json +11 -8
- package/dist/web/assets/index-DPovoyOV.css +0 -1
- package/dist/web/assets/index-xYrc5ayg.js +0 -124
package/README.md
CHANGED
|
@@ -10,9 +10,27 @@ local web UI (built with [silver-ui](https://silver-ui.com)).
|
|
|
10
10
|
npm install -g silver-music-notifier
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
Requires Node.js 22.12.0 or newer.
|
|
14
|
+
|
|
13
15
|
This requires a working build toolchain for `better-sqlite3` (the native SQLite
|
|
14
16
|
driver), which is built automatically on install.
|
|
15
17
|
|
|
18
|
+
## MusicBrainz contact (required)
|
|
19
|
+
|
|
20
|
+
MusicBrainz requires every API client to identify a contact (an email or URL) in
|
|
21
|
+
its User-Agent, and throttles or blocks requests without one. The first time you
|
|
22
|
+
run most CLI commands, the CLI **prompts you for a contact** and saves it.
|
|
23
|
+
Non-network setup commands such as `config set`, `clear-data`, and `dismiss`
|
|
24
|
+
can run before the contact is configured. You can also set it ahead of time:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
silver-music-notifier config set musicbrainz.contact you@example.com
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
or in the web UI's **Settings** view after the app has launched. In a
|
|
31
|
+
non-interactive context (no TTY), commands that require the contact error with
|
|
32
|
+
this guidance instead of prompting.
|
|
33
|
+
|
|
16
34
|
## Usage
|
|
17
35
|
|
|
18
36
|
### Web UI
|
|
@@ -27,7 +45,8 @@ The UI has three views:
|
|
|
27
45
|
- **Releases** — a feed of every known release-group, newest first, with a
|
|
28
46
|
**Refresh** button and a "New" badge on releases discovered in the last refresh.
|
|
29
47
|
- **Artists** — search MusicBrainz and add/remove the artists you follow.
|
|
30
|
-
- **Settings** —
|
|
48
|
+
- **Settings** — set the MusicBrainz contact (required), choose notification
|
|
49
|
+
methods, and configure SMTP for email.
|
|
31
50
|
|
|
32
51
|
### CLI
|
|
33
52
|
|
|
@@ -38,50 +57,71 @@ silver-music-notifier add "X" --mbid <mbid> # add an exact MBID
|
|
|
38
57
|
silver-music-notifier list # list tracked artists
|
|
39
58
|
silver-music-notifier remove "Radiohead" # stop tracking (by name or MBID)
|
|
40
59
|
silver-music-notifier refresh # fetch releases + notify on new ones
|
|
60
|
+
silver-music-notifier refresh --no-notify # fetch without sending email
|
|
41
61
|
silver-music-notifier releases --new --limit 20
|
|
62
|
+
silver-music-notifier dismiss <release-mbid> # hide a release's New badge
|
|
42
63
|
silver-music-notifier config get # show settings
|
|
43
|
-
silver-music-notifier config set notify.
|
|
64
|
+
silver-music-notifier config set notify.email true
|
|
65
|
+
silver-music-notifier clear-data # delete artists/releases, keep settings
|
|
44
66
|
```
|
|
45
67
|
|
|
46
68
|
## Notifications
|
|
47
69
|
|
|
48
|
-
When `refresh` finds releases it has never seen before, it can notify you
|
|
70
|
+
When `refresh` finds releases it has never seen before, it can notify you two ways:
|
|
49
71
|
|
|
50
72
|
- **In-page badges** — "New" badges in the web UI (always available).
|
|
51
|
-
- **
|
|
52
|
-
|
|
53
|
-
|
|
73
|
+
- **Email** — one HTML email per new release, sent once SMTP is configured and
|
|
74
|
+
the email toggle is on. Configure it in the **Settings** view or via
|
|
75
|
+
`config set smtp.host`, `smtp.port`, `smtp.secure`, `smtp.user`, `smtp.pass`,
|
|
76
|
+
`smtp.from`, and `smtp.to`.
|
|
77
|
+
|
|
78
|
+
Adding a new artist refreshes that artist immediately, but treats the existing
|
|
79
|
+
catalog as your starting baseline: it does not send email for those releases or
|
|
80
|
+
mark them with "New" badges.
|
|
54
81
|
|
|
55
82
|
`refresh` is manual — run it from the CLI, the web button, or your own scheduler
|
|
56
83
|
(cron, systemd timer, etc.).
|
|
57
84
|
|
|
58
|
-
|
|
85
|
+
### Cron refresh
|
|
59
86
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
with the `SMN_DATA_DIR` environment variable.
|
|
87
|
+
To check for new releases on a schedule, first make sure the CLI has the required
|
|
88
|
+
MusicBrainz contact and any notification settings configured:
|
|
63
89
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
90
|
+
```bash
|
|
91
|
+
silver-music-notifier config set musicbrainz.contact you@example.com
|
|
92
|
+
silver-music-notifier config set notify.email true # optional, if SMTP is configured
|
|
93
|
+
```
|
|
67
94
|
|
|
68
|
-
|
|
95
|
+
Then add a cron entry. This example refreshes every day at 9:00 AM:
|
|
69
96
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
97
|
+
```cron
|
|
98
|
+
0 9 * * * /usr/bin/env silver-music-notifier refresh >> "$HOME/.local/share/silver-music-notifier/cron.log" 2>&1
|
|
99
|
+
```
|
|
73
100
|
|
|
74
|
-
|
|
101
|
+
If cron cannot find the command, use the full path from
|
|
102
|
+
`command -v silver-music-notifier`. To use a custom database location, set
|
|
103
|
+
`SILVER_MUSIC_NOTIFIER_DATA_DIR` in the cron line:
|
|
75
104
|
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
npm run build # bundle CLI/server (tsup) + build web (vite) into dist/
|
|
80
|
-
npm run typecheck
|
|
81
|
-
npm run lint # eslint
|
|
82
|
-
npm run lint:fix # eslint --fix
|
|
83
|
-
npm run format # prettier --write .
|
|
105
|
+
```cron
|
|
106
|
+
0 9 * * *
|
|
107
|
+
SILVER_MUSIC_NOTIFIER_DATA_DIR="$HOME/.local/share/silver-music-notifier" /usr/bin/env silver-music-notifier refresh >> "$HOME/.local/share/silver-music-notifier/cron.log" 2>&1
|
|
84
108
|
```
|
|
85
109
|
|
|
86
|
-
|
|
87
|
-
|
|
110
|
+
## Data & configuration
|
|
111
|
+
|
|
112
|
+
State lives in a single SQLite file (`data.db`) in your per-user data directory:
|
|
113
|
+
|
|
114
|
+
- **Linux:** `$XDG_DATA_HOME/silver-music-notifier` (usually `~/.local/share/silver-music-notifier`)
|
|
115
|
+
- **macOS:** `~/Library/Application Support/silver-music-notifier`
|
|
116
|
+
- **Windows:** `%LOCALAPPDATA%\silver-music-notifier\Data`
|
|
117
|
+
|
|
118
|
+
Override the location with the `SILVER_MUSIC_NOTIFIER_DATA_DIR` environment
|
|
119
|
+
variable.
|
|
120
|
+
|
|
121
|
+
> **Note:** SMTP credentials (including the password) are stored in plaintext in
|
|
122
|
+
> that local SQLite file. This is a single-user local tool; treat the data
|
|
123
|
+
> directory accordingly.
|
|
124
|
+
|
|
125
|
+
Notification methods (in-page / email) and the MusicBrainz contact are
|
|
126
|
+
configured in the web UI's **Settings** view or via `silver-music-notifier
|
|
127
|
+
config set …` — not through environment variables.
|