FoxxMD / multi-scrobbler

Scrobble plays from multiple sources to multiple clients
https://foxxmd.github.io/multi-scrobbler
MIT License
299 stars 14 forks source link

WebScrobbler - Documentation Issue #111

Closed undaunt closed 5 months ago

undaunt commented 7 months ago

Describe the bug When attempting to follow the webscrobbler documentation I was receiving no-configured sources and/or syntax errors.

To Reproduce Steps to reproduce the behavior:

  1. Create a configuration based, single user config from here
  2. Attempt to start the app
  3. Receive warnings about no configured source when playing.
  4. Reconfigure based on the multi-user documentation with slugs.
  5. Receive schema warnings and app does not fully load.

Expected behavior The app should launch and not have schema errors, and receive webhooks from a valid source.

Versions (please complete the following information):

Additional context This appears to be resolved by updating the config to:

  1. Not nesting the slug under data as shown in the multi-user example.
  2. Including the type of webscrobbler (not noted in the docs, I saw it in the commit code

Here is my working config:

    {
      "type": "webscrobbler",
      "name": "WebScrobble",
      "slug": null,
      "clients": [],
      "data": {
        "whitelist": [],
        "blacklist": []
      }
    },
TheFeelTrain commented 7 months ago

In addition to this the environment variables like WS_ENABLE don't do anything. If you search for any of them in the code, the only references made to them is in the documentation. So as far as I can tell they never actually get used. The entire WebScrobbler section needs updating.

Edit: Actually right after I commented I decided to dig a little deeper and the variables are there but it's WEBSCROBBLER_ENABLE instead of WS_ENABLE so the documentation is just wrong.

FoxxMD commented 7 months ago

You are correct in that there was a discrepancy between what was shown in webscrobbler.json and in the multi-user config, but either one should have worked without issue. slug should be in data but it is an optional property and should not cause schema warnings. I was not able to reproduce your issue when using MS setup with config/webscrobbler.json

Were you using the example data found in webscrobbler.json but in sources in the all-in-one config (config.json)? This is the only area where type is required. If you were using webscrobbler.json directly in your config directory it is not necessary to include type.

MS with All-in-one config

/config
  --> config.json

# config.json
...
  "sources": [
    {
      "name": "MyWebScrobbler",
      "type": "webscrobbler", // <-- type is required
      "data": {
        "slug": null,
        "whitelist": [],
        "blacklist": []
      }
    }
  ],
...

MS with Specific file configuration

/config
  --> webscrobbler.json

# webscrobbler.json
[
  {
    "name": "MyWebScrobbler",
   // No type required because MS recognizes the file as specific for webscrobbler
    "data": {
      "slug": null,
      "whitelist": [],
      "blacklist": []
    }
  }
]
FoxxMD commented 7 months ago

@TheFeelTrain thanks for catching the ENV discrepancy. It has been updated to match what it is found documentation and available now on the develop branch/image

FoxxMD commented 5 months ago

Fixed in 0.6.3