LastFM
Onofficiรซle Beta-vertaling
Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden โ
Watโ
Toon het nummer dat momenteel wordt afgespeeld van een LastFM-gebruiker.
let op
Houd er rekening mee dat LastFM-updates vertraagd kunnen zijn wanneer de muziek is gepauzeerd en nummers lang in de "now playing"-status kunnen blijven hangen.
Daarnaast gebruiken we HTTP-verzoeken om de gegevens op te halen, dus moet je mogelijk de http_timeout aanpassen naar wens voor betere resultaten.
Je moet een API-sleutel aanvragen op de LastFM-website.
Voorbeeldconfiguratieโ
- json
- yaml
- toml
{
"background": "p:sky",
"foreground": "p:white",
"powerline_symbol": "๎ฐ",
"options": {
"api_key": "<YOUR_API_KEY>",
"username": "<LASTFM_USERNAME>",
"http_timeout": 20000
},
"style": "powerline",
"template": " {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Full }}{{ end }} ",
"type": "lastfm"
}
background: p:sky
foreground: p:white
powerline_symbol: ๎ฐ
options:
api_key: <YOUR_API_KEY>
username: <LASTFM_USERNAME>
http_timeout: 20000
style: powerline
template: ' {{ .Icon }}{{ if ne .Status "stopped" }}{{ .Full }}{{ end }} '
type: lastfm
background = "p:sky"
foreground = "p:white"
powerline_symbol = "๎ฐ"
style = "powerline"
template = " {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Full }}{{ end }} "
type = "lastfm"
[options]
api_key = "<YOUR_API_KEY>"
username = "<LASTFM_USERNAME>"
http_timeout = 20000
Optiesโ
| Name | Type | Default | Description |
|---|---|---|---|
playing_icon | string | \uE602 | text/icon to show when playing |
stopped_icon | string | \uF04D | text/icon to show when stopped |
api_key | template | . | your LastFM API key |
username | string | . | your LastFM username |
http_timeout | int | 20 | in milliseconds - the timeout for http request |
Template (informatie)โ
standaard template
{{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Full }}{{ end }}
Eigenschappenโ
| Name | Type | Description |
|---|---|---|
.Status | string | player status (playing, paused, stopped) |
.Artist | string | current artist |
.Track | string | current track |
.Full | string | will output Artist - Track |
.Icon | string | icon (based on .Status) |