Skip to main content

# Webscrobbler

After installing the Webscrobbler extension open the preferences/settings for it:

- Under Accounts
  - Add Webhook
    - API URL: `[YourMultiScrobblerInstance]/api/webscrobbler` EX `http://localhost:9078/api/webscrobbler`
    - Application name: `(whatever you want)`

Reload the extension after adding the webhook.

URL Types Supported by Webscrobbler

- On Firefox - Only FQNs (domain.tld), `localhost`, and `127.0.0.1` are supported for API URL due to firefox requiring https
- On Chromium-based Browsers - Any domain will work for API URL
- All other browsers are untested

Public-Facing Usage

Multi-scrobbler is not designed to be publicly accessible from the internet. To use Webscrobbler outside your local network you should be accessing MS through a VPN or through a reverse proxy with some kind of authentication (though this is still not recommended).

### Multiple Users​

If you would like use multiple WebScrobbler sources they can be matched using a slug at the end of the API URL. This requires using a file-based config.

Example
webscrobbler.json

    [
      {
        "name": "aUserWS",
        "clients": [
          "client1Maloja"
        ],
        "data": {
          "slug": "usera"
        }
      },
      {
        "name": "bUserWS",
        "clients": [
          "client2Maloja"
        ],
        "data": {
          "slug": "userb"
        }
      }
    ]

- To use `aUserWS` source set API URL to `http://localhost:9078/api/webscrobbler/usera`
- To use `bUserWS` source set API URL to `http://localhost:9078/api/webscrobbler/userb`

tip

`http://localhost:9078/api/webscrobbler` is matched with the first source that that does not have a slug defined.

### Connectors Black/Whitelist​

MS can be configured to only scrobble, or NOT scrobble, from some WS connectors. Use the name of the website from the supported websites or from the Connectors tab in the extension.

note

This affects only MS's behavior and does not affect the general connector behavior you have configured within the WebScrobbler extension.

## Configuration​

- ENV
- File
- AIO

Configuration Type

This is configuration for the ENV Config Type.

Environmental Variable | Type | Default | Description
--- | --- | --- | ---
`WS_ID` | string |  | A globally unique ID EX `myComponentId`
`WS_NAME` | string | Value of `WS_ID` | A vanity name EX `My Cool Component`
`WS_ENABLE` | boolean | true | Should this component be used?
`WS_BLACKLIST` | string |  | Block scrobbling from specific WebScrobbler Connectors
`WS_WHITELIST` | string |  | Only allow scrobbling from specific WebScrobbler Connectors

Bold/Italic = Required

Config Structure

This displays the structure of the File Configuration for a webscrobbler type Source with all possible properties, their shape, and descriptions/types. Use this to understand how to write a valid config.

Loading ...
Config Example

This displays an example config file of a webscrobbler Source File Configuration that adheres to the shown Config Structure.

- text mode lets you edit the JSON directly.
- tree mode gives you a guided point-and-click editing experience that always keeps the JSON syntax valid.

Both modes validate that the configuration is correct. Any errors show up as squiggly lines.

important

Only source webscrobbler configs will validate correctly in the editor but both source and client webscrobbler configs are allowed in the real `CONFIG/webscrobbler.json`

After you finish editing, switch to text and then copy all text to get a completed config.

Config Example Mobile Experience

This displays an example config file of a webscrobbler Source File Configuration that adheres to the shown Config Structure.

The example config file editor is meant for a larger screen experience so only the read-only example is shown. Please use this site on a tablet/laptop/desktop to enable file editor features.

CONFIG/webscrobbler.json

    [
      {
        "id": "MyWebScrobbler",
        "name": "Firefox Laptop",
        "data": {
          "slug": "MyOptionalSlug",
          "whitelist": [],
          "blacklist": []
        }
      }
    ]

Config Structure

This displays the structure of the all-in-one (`config.json`) configuration with all possible properties, their shape, and descriptions/types. Use this to understand how to write a valid config.

Select the webscrobbler type from the respective `sources` node below, then expand it.

Loading ...
Config Example

This displays an example config file of a all-in-one (`config.json`) configuration that includes a webscrobbler Source that adheres to the shown Config Structure.

- text mode lets you edit the JSON directly.
- tree mode gives you a guided point-and-click editing experience that always keeps the JSON syntax valid.

Both modes validate that the configuraion is correct. Any errors show up as squiggly lines.

After you finish editing, switch to text and then copy all text to get a completed config.

Config Example Mobile Experience

This displays an example config file of a all-in-one (`config.json`) configuration that includes a webscrobbler Source that adheres to the shown Config Structure.

The example config file editor is meant for a larger screen experience so only the read-only example is shown. Please use this site on a tablet/laptop/desktop to enable file editor features.

CONFIG/config.json

    {
      "sources": [
        {
          "id": "MyWebScrobbler",
          "name": "Firefox Laptop",
          "data": {
            "slug": "MyOptionalSlug",
            "whitelist": [],
            "blacklist": []
          },
          "type": "webscrobbler"
        }
      ]
    }