Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple lastfm users with jellyfin leads to log spam #85

Closed
AverageHoarder opened this issue Jul 13, 2023 · 4 comments
Closed

multiple lastfm users with jellyfin leads to log spam #85

AverageHoarder opened this issue Jul 13, 2023 · 4 comments

Comments

@AverageHoarder
Copy link

AverageHoarder commented Jul 13, 2023

Please check the FAQ before submitting a bug report.

Describe the bug
I've configured lastfm.json and jellyfin.json with 2 users and scrobbling works for both.
However ever since I added a second user the log is constantly being spammed.

To Reproduce
Add 2 users to lastfm.json and jellyfin.json and play something.

Maybe there's something wrong with my config, here's how my .jsons look:
lastfm.json:

[
  {
    "name": "LastFmUser1",
    "configureAs": "client",
    "data": {
      "apiKey": "REDACTED",
      "secret": "REDACTED",
      "redirectUri": "http://localhost:9078/lastfm/callback"
    }
  },
  {
    "name": "LastFmUser2",
    "configureAs": "client",
    "data": {
      "apiKey": "REDACTED",
      "secret": "REDACTED",
      "redirectUri": "http://localhost:9078/lastfm/callback"
    }
  }
]

jellyfin.json:

[
  {
    "name": "JellyUser1",
    "clients": [LastFmUser1],
    "data": {
      "users": ["User1"],
      "servers": ["jellyfin"],
      "options": {
        "logPayload": false
      }
    }
  },
  {
    "name": "JellyUser2",
    "clients": [LastFmUser2],
    "data": {
      "users": ["User2"],
      "servers": ["jellyfin"],
      "options": {
        "logPayload": false
      }
    }
  }
]

Expected behavior
A way to either prevent those from being logged (as it's expected behaviour to not scrobble for a user who is not allowed) or at least to hide them from the log. It spams so many lines per second that the log is becoming unusable.

Logs
If possible reproduce the issue with debug logging ON

2023-07-13T14:38:46+02:00 warn : [Sources] [Jellyfin - JellyUser2] Will not scrobble event because author was not an allowed user: User1 {"artists":["Coldplay"],"track":"X&Y"}
2023-07-13T14:38:46+02:00 warn : [Sources] [Jellyfin - JellyUser1] Will not scrobble event because author was not an allowed user: User2 {"artists":["Fleet Foxes"],"track":"Helplessness Blues"}
2023-07-13T14:38:46+02:00 warn : [Sources] [Jellyfin - JellyUser2] Will not scrobble event because author was not an allowed user: User1 {"artists":["Coldplay"],"track":"X&Y"}
2023-07-13T14:38:46+02:00 warn : [Sources] [Jellyfin - JellyUser1] Will not scrobble event because author was not an allowed user: User2 {"artists":["Fleet Foxes"],"track":"Helplessness Blues"}
2023-07-13T14:38:46+02:00 warn : [Sources] [Jellyfin - JellyUser2] Will not scrobble event because author was not an allowed user: User1 {"artists":["Coldplay"],"track":"X&Y"}
2023-07-13T14:38:46+02:00 warn : [Sources] [Jellyfin - JellyUser1] Will not scrobble event because author was not an allowed user: User2 {"artists":["Fleet Foxes"],"track":"Helplessness Blues"}
2023-07-13T14:38:46+02:00 warn : [Sources] [Jellyfin - JellyUser2] Will not scrobble event because author was not an allowed user: User1 {"artists":["Coldplay"],"track":"X&Y"}
2023-07-13T14:38:41+02:00 warn : [Sources] [Jellyfin - JellyUser1] Will not scrobble event because author was not an allowed user: User2 {"artists":["Fleet Foxes"],"track":"Helplessness Blues"}
2023-07-13T14:38:41+02:00 warn : [Sources] [Jellyfin - JellyUser2] Will not scrobble event because author was not an allowed user: User1 {"artists":["Coldplay"],"track":"X&Y"}

Versions (please complete the following information):

  • multi-scrobbler: foxxmd/multi-scrobbler:latest on docker
  • jellyfin: 10.8.10
FoxxMD added a commit that referenced this issue Jul 13, 2023
For jellyfin/plex/tautulli -- `logFilterFailure` option in config allows controlling if and what log LEVEL user/server filter failures are logged. #85

* Updated schema
* Updated examples
* Also added expected/found detailed logging for filters to jellyfin #84
@FoxxMD
Copy link
Owner

FoxxMD commented Jul 13, 2023

Thanks for the writeup and logs! I've added another option for jellyfin that can suppress these log statements: logFilterFailure. This is available in the develop branch or docker image foxxmd/multi-scrobbler:develop.

If you still want to log these warnings for debugging purposes (when using LOG_LEVEL=debug) set

"logFilterFailure ": "debug"

otherwise they can be turned off completely by setting to false like this in your config:

[
  {
    "name": "JellyUser1",
    "clients": [
      "LastFmUser1"
    ],
    "data": {
      "users": [
        "User1"
      ],
      "servers": [
        "jellyfin"
      ],
      "options": {
        "logPayload": false,
        "logFilterFailure": false
      }
    }
  },
  {
    "name": "JellyUser2",
    "clients": [
      "LastFmUser2"
    ],
    "data": {
      "users": [
        "User2"
      ],
      "servers": [
        "jellyfin"
      ],
      "options": {
        "logPayload": false,
        "logFilterFailure": false
      }
    }
  }
]

Please let me know if this fixes your issue.

@AverageHoarder
Copy link
Author

That did indeed fix my issue. Thanks, now the logs no longer give me anxiety!

Quick question before you close this issue (if that's alright):
If I want to use LastFM both as source and client, the docs say:

"See lastfm.json.example, change configureAs to source."

Does that mean that lastfm can only act as source OR client?
Or does it mean that I copy the existing lastfm config dictionary within the .json, paste it and only change configureAs to "source" instead of "client" while leaving api key etc. identical? I'm a bit confused.

My goal is to scrobble from MusicBee to Lastfm directly and let multi-scrobbler then use LastFM as a source for Maloja to sync those scrobbels between LastFM and Maloja.
At the same time I want to scrobble from Jellyfin and Plex to Lastfm and Maloja at the same time.
Is that feasible?

@FoxxMD
Copy link
Owner

FoxxMD commented Jul 13, 2023

You can use as many lastfm configs as you want, as source or client. Yes your setup is valid.

Or does it mean that I copy the existing lastfm config dictionary within the .json, paste it and only change configureAs to "source" instead of "client" while leaving api key etc. identical?

Basically this. The only other change would be to make sure that when set as a source you have also specified clients, like this:

[
  {
    "name": "myLastFmSource",
    "configureAs": "source",
    "clients": ["MyMalojaClient"],
    "data": {
      "apiKey": "a89cba1569901a0671d5a9875fed4be1",
      "secret": "ec42e09d5ae0ee0f0816ca151008412a",
      "redirectUri": "http://localhost:9078/lastfm/callback"
    }
  },
  {
    "name": "myLastFmClient",
    "configureAs": "client",
    "data": {
      "apiKey": "a89cba1569901a0671d5a9875fed4be1",
      "secret": "ec42e09d5ae0ee0f0816ca151008412a",
      "redirectUri": "http://localhost:9078/lastfm/callback"
    }
  }
]

@AverageHoarder
Copy link
Author

AverageHoarder commented Jul 14, 2023

nvm I'm stupid.
I typed "client" instead of "clients" in the lastFM source in lastfm.json, which is why it probably scrobbled to more than the intended client.
Sorry for wasting your time if you had already read what I wrote before.

The way you suggested works well so far. Thanks a lot!

Feel free to close the issue and thanks again!

@FoxxMD FoxxMD closed this as completed Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants