diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 00000000..d60c5994 --- /dev/null +++ b/cliff.toml @@ -0,0 +1,67 @@ +# configuration file for git-cliff (0.1.0) + +[changelog] +# changelog header +header = """ +# Changelog +All notable changes to this project will be documented in this file.\n +""" +# template for the changelog body +# https://tera.netlify.app/docs/#introduction +body = """ +{% if version %}\ + ## [{{ version | replace(from="v", to="") }}] - {{ timestamp | date(format="%Y-%m-%d") }} +{% else %}\ + ## [unreleased] +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | upper_first }} + {% for commit in commits + | filter(attribute="scope") + | sort(attribute="scope") %} + - *({{commit.scope}})* {{ commit.message | upper_first }} + {%- if commit.breaking %} + {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} + {%- endif -%} + {%- endfor -%} + {%- for commit in commits %} + {%- if commit.scope -%} + {% else -%} + - *(No Category)* {{ commit.message | upper_first }} + {% if commit.breaking -%} + {% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}} + {% endif -%} + {% endif -%} + {% endfor -%} +{% endfor %} +""" +# remove the leading and trailing whitespaces from the template +trim = true +# changelog footer +footer = """ + +""" + +[git] +# allow only conventional commits +# https://www.conventionalcommits.org +conventional_commits = true +# regex for parsing and grouping commits +commit_parsers = [ + { message = "^feat", group = "Features"}, + { message = "^fix", group = "Bug Fixes"}, + { message = "^doc", group = "Documentation"}, + { message = "^perf", group = "Performance"}, + { message = "^refactor", group = "Refactor"}, + { message = "^style", group = "Styling"}, + { message = "^test", group = "Testing"}, + { message = "^chore\\(release\\): prepare for", skip = true}, + { message = "^chore", group = "Miscellaneous Tasks"}, + { body = ".*security", group = "Security"}, +] +# filter out the commits that are not matched by commit parsers +filter_commits = false +# glob pattern for matching git tags +tag_pattern = "[0-9]*" +# regex for skipping tags +skip_tags = "v0.1.0-beta.1" -- 2.51.2 From c648ad4ae3b0512792f5ac54d0edf245180beced Mon Sep 17 00:00:00 2001 From: Wouter Habets Date: Mon, 12 Jun 2023 17:56:37 +0200 Subject: [PATCH 2/3] fix(lastfm): only scrobble primary artist to last.fm When a track contains multiple artist, only the first artist should be send to Last.fm since it doesn't support multiple artists per track. Previous behaviour was to combine all artists in a single string. Issue: #81 --- src/clients/LastfmScrobbler.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/clients/LastfmScrobbler.ts b/src/clients/LastfmScrobbler.ts index 57a78c19..a12d16ac 100644 --- a/src/clients/LastfmScrobbler.ts +++ b/src/clients/LastfmScrobbler.ts @@ -138,8 +138,15 @@ export default class LastfmScrobbler extends AbstractScrobbleClient { const sType = newFromSource ? 'New' : 'Backlog'; + let artist: string; + if (artists.length === 0) { + artist = ""; + } else { + artist = artists[0]; + } + const rawPayload = { - artist: artists.join(', '), + artist: artist, duration, track, album, -- 2.51.2 From 91bd702deb00e57d551f8f34527dcc609c231f9b Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Mon, 12 Jun 2023 12:23:49 -0400 Subject: [PATCH 3/3] docs: Add multiple artist scrobbling limitation to FAQ --- docs/FAQ.md | 16 +++++++++++++++- src/clients/LastfmScrobbler.ts | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index 897ab0ab..d8f354a5 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -4,6 +4,9 @@ * [Spotify/Deezer/LastFM won't authenticate](#spotifydeezerlastfm-wont-authenticate) * [Configuration Issues](#configuration-issues) * [Config could not be parsed](#config-could-not-be-parsed) +* [Scrobbling Issues](#scrobbling-issues) + * [Last.fm does not scrobble tracks with multiple artists correctly](#lastfm-does-not-scrobble-tracks-with-multiple-artists-correctly) + * [Jellyfin does not scrobble tracks with multiple artists correctly](#jellyfin-does-not-scrobble-tracks-with-multiple-artists-correctly) # Connection Issues @@ -19,7 +22,6 @@ multi-scrobbler will log information about any server that connects to it for th 2023-02-22T10:55:56-05:00 warn : [Plex Request ] Received valid Plex webhook payload but no Plex sources are configured ``` It also logs if a server tries to connect to a URL that it does not recognize: - ``` 2023-02-22T11:16:12-05:00 debug : [App ] Server received POST request from ::ffff:192.168.0.140 (UA: PlexMediaServer/1.24.5.5173-8dcc73a59) to unknown route: /plkex ``` @@ -120,3 +122,15 @@ If you see something like this in your logs: ``` It means the JSON in your configuration file is not valid. Copy and paste your configuration into a site like [JSONLint](https://jsonlint.com/) to find out where errors you have and fix them. + +# Scrobbling Issues + +## Last.fm does not scrobble tracks with multiple artists correctly + +This is a limitation of the [Last.fm API](https://www.last.fm/api/show/track.scrobble) where the **artist** field is only one string and Last.fm does not recognize (play well) with "combined" artists. + +Multi-scrobbler works the same was the official Spotify-Last.fm integration works -- it only scrobbles the **first** artist on a multi-artist track. + +## Jellyfin does not scrobble tracks with multiple artists correctly + +This is a limitation caused by the [Jellyfin webhook plugin](https://github.com/FoxxMD/multi-scrobbler/issues/70#issuecomment-1443804712) only sending the first artist to multi-scrobbler. This issues needs to be [fixed upstream on the Jellyfin webhook repository.](https://github.com/jellyfin/jellyfin-plugin-webhook/issues/166) diff --git a/src/clients/LastfmScrobbler.ts b/src/clients/LastfmScrobbler.ts index a12d16ac..59b3a6ee 100644 --- a/src/clients/LastfmScrobbler.ts +++ b/src/clients/LastfmScrobbler.ts @@ -138,6 +138,8 @@ export default class LastfmScrobbler extends AbstractScrobbleClient { const sType = newFromSource ? 'New' : 'Backlog'; + // LFM does not support multiple artists in scrobble payload + // https://www.last.fm/api/show/track.scrobble let artist: string; if (artists.length === 0) { artist = "";