You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+70-60Lines changed: 70 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,66 +41,76 @@ All settings are optional, although rescrobbled isn't very useful without Last.f
41
41
42
42
If the config file doesn't exist, rescrobbled will generate an example config for you when you run it for the first time.
43
43
44
-
-`lastfm-key`, `lastfm-secret`
45
-
46
-
To use rescrobbled with Last.fm, you'll need a Last.fm API key and secret. These can be obtained [here](https://www.last.fm/api/account/create).
47
-
48
-
-`min-play-time`
49
-
50
-
Minimum play time in seconds before a song is scrobbled.
51
-
52
-
By default, track submission respects Last.fm's recommended behavior: songs should only be scrobbled if they have been playing for at least half their duration, or for 4 minutes, whichever comes first. Using `min-play-time` you can override this.
53
-
54
-
-`player-whitelist`
55
-
56
-
If empty or ommitted, music from all players will be scrobbled; otherwise, rescrobbled will only listen to players in this list.
57
-
58
-
A CLI application like [playerctl](https://github.com/altdesktop/playerctl) can be used to determine a player's name for the whitelist. To do so, start playing a song and run the following command:
59
-
```
60
-
playerctl --list-all
61
-
```
62
-
63
-
- `filter-script`
64
-
65
-
The `filter-script` will be run before updating status and before submitting tracks.
66
-
It receives the following properties on consecutive lines of its standard input (separated by `\n`):
67
-
- artist;
68
-
- song title;
69
-
- album name;
70
-
- zero or more comma-separated (`,`) genre(s)
71
-
72
-
The script should write the filtered artist, song title and album name on corresponding lines of
73
-
its standard output.
74
-
This can be used to clean up song names, for example removing "remastered" and similar suffixes.
75
-
If the filter script does not return any output, the current track will be ignored.
76
-
77
-
A number of example scripts can be found in the [`filter-script-examples`](https://github.com/InputUsername/rescrobbled/tree/master/filter-script-examples) directory.
78
-
79
-
- `use-track-start-timestamp`
80
-
81
-
By default, tracks are submitted with a timestamp of the submission time. By setting `use-track-start-timestamp` to `true`, tracks are instead submitted with the time the track originally started playing. This is currently Last.fm-only.
82
-
83
-
- `[[listenbrainz]]`
84
-
85
-
You can specify one or more ListenBrainz instances by repeating this option. Each definition needs at least a `token`. You can set `url` to use a custom API URL (eg. for use with custom ListenBrainz instances or services like [Maloja](https://github.com/krateng/maloja)). If the URL is not provided, it defaults to the ListenBrainz.org instance.
86
-
87
-
If you only want to use ListenBrainz.org, you can set the `listenbrainz-token` option as a shorthand instead.
88
-
89
-
For ListenBrainz.org, the user token can be found [here](https://listenbrainz.org/profile/). Other services might do this differently, refer to their documentation for more info.
90
-
91
-
> [!NOTE]
92
-
> Due to the way TOML works, the `[[listenbrainz]]` definitions need to be the last thing in your config file.
93
-
94
-
### Environment variables
95
-
96
-
Options can also be overridden using environment variables. The following variables are supported:
<td>To use rescrobbled with Last.fm, you'll need a Last.fm API key and secret. These can be obtained <a href="https://www.last.fm/api/account/create">here</a>.</td>
<p>Minimum play time in seconds before a song is scrobbled.</p>
64
+
<p>By default, track submission respects Last.fm's recommended behavior: songs should only be scrobbled if they have been playing for at least half their duration, or for 4 minutes, whichever comes first. Using <code>min-play-time</code> you can override this.</p>
65
+
</td>
66
+
<td><code>MIN_PLAY_TIME</code></td>
67
+
</tr>
68
+
<tr>
69
+
<td><code>player-whitelist</code></td>
70
+
<td>
71
+
<p>If empty or ommitted, music from all players will be scrobbled; otherwise, rescrobbled will only listen to players in this list.</p>
72
+
<p>A CLI application like <a href="https://github.com/altdesktop/playerctl">playerctl</a> can be used to determine a player's name for the whitelist. To do so, start playing a song and run the following command:
73
+
<code><pre>playerctl --list-all</pre></code>
74
+
</p>
75
+
</td>
76
+
<td></td>
77
+
</tr>
78
+
<tr>
79
+
<td><code>filter-script</code></td>
80
+
<td>
81
+
<p>The <code>filter-script</code> will be run before updating status and before submitting tracks.
82
+
It receives the following properties on consecutive lines of its standard input (separated by <code>\n</code>):
83
+
<ul>
84
+
<li>artist;</li>
85
+
<li>song title;</li>
86
+
<li>album name;</li>
87
+
<li>zero or more comma-separated (<code>,</code>) genre(s)</li>
88
+
</ul>
89
+
</p>
90
+
<p>The script should write the filtered artist, song title and album name on corresponding lines of its standard output.
91
+
This can be used to clean up song names, for example removing "remastered" and similar suffixes.
92
+
If the filter script does not return any output, the current track will be ignored.</p>
93
+
<p>A number of example scripts can be found in the <a href="https://github.com/InputUsername/rescrobbled/tree/master/filter-script-examples"><code>filter-script-examples</code></a> directory.</p>
94
+
</td>
95
+
<td><code>FILTER_SCRIPT</code></td>
96
+
</tr>
97
+
<tr>
98
+
<td><code>use-track-start-timestamp</code></td>
99
+
<td>By default, tracks are submitted with a timestamp of the submission time. By setting <code>use-track-start-timestamp</code> to <code>true</code>, tracks are instead submitted with the time the track originally started playing. This is currently Last.fm-only.</td>
100
+
<td><code>USE_TRACK_START_TIMESTAMP</code></td>
101
+
</tr>
102
+
<tr>
103
+
<td><code>[[listenbrainz]]</code></td>
104
+
<td>
105
+
<p>You can specify one or more ListenBrainz instances by repeating this option. Each definition needs at least a <code>token</code>. You can set <code>url</code> to use a custom API URL (eg. for use with custom ListenBrainz instances or services like <a href="https://github.com/krateng/maloja">Maloja</a>). If the URL is not provided, it defaults to the ListenBrainz.org instance.</p>
106
+
<p>If you only want to use ListenBrainz.org, you can set the <code>listenbrainz-token</code> option as a shorthand instead.</p>
107
+
<p>For ListenBrainz.org, the user token can be found <a href="https://listenbrainz.org/profile/">here</a>. Other services might do this differently, refer to their documentation for more info.</p>
108
+
<p class="markdown-alert-title">Due to the way TOML works, the <code>[[listenbrainz]]</code> definitions need to be the last thing in your config file.</p>
0 commit comments