LastFM
Traducción Beta No Oficial
Esta página fue traducida por PageTurner AI (beta). No está respaldada oficialmente por el proyecto. ¿Encontraste un error? Reportar problema →
Qué hace
Muestra la canción que se está reproduciendo actualmente de un usuario de LastFM.
precaución
Ten en cuenta que las actualizaciones de LastFM pueden retrasarse considerablemente cuando se pausa la reproducción, y las canciones pueden permanecer en estado "reproduciendo" durante mucho tiempo.
Además, estamos usando solicitudes HTTP para obtener los datos,
por lo que es posible que necesites ajustar el http_timeout según tus preferencias para obtener mejores resultados.
Debes solicitar una clave de API en el sitio web de LastFM.
Configuración de ejemplo
- 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
Opciones
| 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 |
Plantilla (info)
plantilla predeterminada
{{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Full }}{{ end }}
Propiedades
| 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) |