User-defined scrobble transformers not working - not sure why #476
-
|
I've checked the FAQ and the documentation regarding user stage scrobble transformers. I had playTransform rules from before the scrobble enhancements overhaul in v0.10.5 and tried to adapt them for the new scrobble transform pipeline. I have Multi-Scrobbler set up with Spotify as a source and Maloja as a client. Inside config.json: "transformers": [
{
"type": "user",
"name": "FixTitleRegex",
"defaults": {
"title": [
"/\\s*[-—]\\s*(?:\\d{4}\\s+)?(?:special|deluxe|remaster(?:s)?(?:ed)?|expanded|extended|bonus|\\btrack\\b|edition)(?:\\s+\\d{4})?(?:\\s+(?:special|deluxe|remaster(?:s)?(?:ed)?|expanded|extended|bonus|track|edition)(?:\\s+\\d{4})?)*$/img",
"/\\(*\\[*(?:\\d{4}\\s+)?(?:\\(special|deluxe|remaster(?:s)?(?:ed)?|expanded|extended|bonus|\\btrack\\b|edition)(?:\\s+\\d{4})?(?:\\s+(?:special|deluxe|remaster(?:s)?(?:ed)?|expanded|extended|bonus|track|edition)(?:\\s+\\d{4}?)?)*\\)*\\]*$/img"
],
"album": [
"/\\s*[-—]\\s*(?:\\d{4}\\s+)?(?:special|deluxe|remaster(?:s)?(?:ed)?|expanded|extended|bonus|\\btrack\\b|edition)(?:\\s+\\d{4})?(?:\\s+(?:special|deluxe|remaster(?:s)?(?:ed)?|expanded|extended|bonus|track|edition)(?:\\s+\\d{4})?)*$/img",
"/\\[*\\(*(?:\\d{4}\\s+)?(?:\\(special|deluxe|remaster(?:s)?(?:ed)?|expanded|extended|bonus|\\btrack\\b|edition)(?:\\s+\\d{4})?(?:\\s+(?:special|deluxe|remaster(?:s)?(?:ed)?|expanded|extended|bonus|track|edition)(?:\\s+\\d{4}?)?)*\\)*\\]*$/img"
]
}
},
{
"type": "user",
"name": "FixGroupArtists",
"defaults": {
"artists": [
"KPop Demon Hunters Cast",
"hololive English -Myth-",
"hololive English -Council-",
"hololive English -Advent-",
"hololive English -Justice-"
]
}
},
{
"type": "user",
"name": "FixAlbumTitles",
"defaults": {
"album": [
{
"search": "The way of all flesh",
"replace": "The Way of All Flesh",
"when": [
{ "artist": "Gojira" }
]
},
{
"search": "(Full Dynamic Range Edition)",
"replace": "",
"when": [
{ "artist": "Carcass" }
]
},
{
"search": "(Complete Edition)",
"replace": "",
"when": [
{ "artist": "Carcass" }
]
},
{
"search": "(Ultimate Edition)",
"replace": "",
"when": [
{ "artist": "Carcass" }
]
},
{
"search": "(Expanded Edition - Remastered)",
"replace": "",
"when": [
{ "artist": "Megadeth" }
]
},
{
"search": "(2004 Remix / Expanded Edition)",
"replace": "",
"when": [
{ "artist": "Megadeth" }
]
},
{
"search": "(30th Anniversary / Deluxe Edition)",
"replace": "",
"when": [
{ "artist": "Bryan Adams" }
]
},
{
"search": "(40th Anniversary Expanded Edition)",
"replace": "",
"when": [
{ "artist": "Ozzy Osbourne" }
]
},
{
"search": "(Remastered Deluxe Box Set)",
"replace": "",
"when": [
{ "artist": "Metallica" }
]
},
{
"search": "(Anniversary Edition - Remastered)",
"replace": "",
"when": [
{ "artist": "Rammstein" }
]
},
{
"search": "(XXV Anniversary Edition — Remastered)",
"replace": "",
"when": [
{ "artist": "Rammstein" }
]
}
]
}
}
]spotify.json looks like this: [
{
"name": "redacted",
"enable": true,
"clients": [],
"data": {
"clientId": "clientId",
"clientSecret": "clientSecret",
"redirectUri": "https://scrobble.example.com/callback"
},
"options": {
"scrobbleBacklog": false,
"playTransform": {
"preCompare": [
{
"type": "user",
"name": "FixTitleRegex"
},
{
"type": "user",
"name": "FixGroupArtists"
},
{
"type": "user",
"name": "FixAlbumTitles"
}
],
"log": "all"
}
}
}
]maloja.json: [
{
"name": "Maloja",
"enable": true,
"configureAs": "client",
"data": {
"apiKey": "apiKey",
"url": "http://local-ip-redacted.local:42010"
},
"options": {
"maxRequestRetries": 16383,
"retryMultiplier": 2
}
}
]What ends up happening is that when I try to play specific tracks e.g. Some Artist - Example Song (Remastered 2025), the transform rules that I set up don't work, and Maloja accepts a new scrobble "as is." In other words, Maloja scrobbles "Some Artist - Example Song (Remastered 2025)" instead of just "Some Artist - Example Song" Debug output: Debug output from scrobbled track: {
"input": {
"device": {
"id": "{redacted}",
"is_active": true,
"is_private_session": false,
"is_restricted": false,
"name": "{redacted}",
"supports_volume": false,
"type": "Tablet",
"volume_percent": 100
},
"shuffle_state": false,
"smart_shuffle": false,
"repeat_state": "off",
"is_playing": true,
"timestamp": 1772508186854,
"context": {
"external_urls": {
"spotify": "https://open.spotify.com/album/0qaLL09EtF1hiUis7PRvaJ"
},
"href": "https://api.spotify.com/v1/albums/0qaLL09EtF1hiUis7PRvaJ",
"type": "album",
"uri": "spotify:album:0qaLL09EtF1hiUis7PRvaJ"
},
"progress_ms": 10311,
"item": {
"album": {
"album_type": "album",
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/1Yox196W7bzVNZI7RBaPnf"
},
"href": "https://api.spotify.com/v1/artists/1Yox196W7bzVNZI7RBaPnf",
"id": "1Yox196W7bzVNZI7RBaPnf",
"name": "Megadeth",
"type": "artist",
"uri": "spotify:artist:1Yox196W7bzVNZI7RBaPnf"
}
],
"external_urls": {
"spotify": "https://open.spotify.com/album/0qaLL09EtF1hiUis7PRvaJ"
},
"href": "https://api.spotify.com/v1/albums/0qaLL09EtF1hiUis7PRvaJ",
"id": "0qaLL09EtF1hiUis7PRvaJ",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/ab67616d0000b273be9fa5a89479b6af481938a0",
"width": 640
},
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02be9fa5a89479b6af481938a0",
"width": 300
},
{
"height": 64,
"url": "https://i.scdn.co/image/ab67616d00004851be9fa5a89479b6af481938a0",
"width": 64
}
],
"name": "Rust In Peace (2004 Remix / Expanded Edition)",
"release_date": "1990-10-04",
"release_date_precision": "day",
"total_tracks": 13,
"type": "album",
"uri": "spotify:album:0qaLL09EtF1hiUis7PRvaJ"
},
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/1Yox196W7bzVNZI7RBaPnf"
},
"href": "https://api.spotify.com/v1/artists/1Yox196W7bzVNZI7RBaPnf",
"id": "1Yox196W7bzVNZI7RBaPnf",
"name": "Megadeth",
"type": "artist",
"uri": "spotify:artist:1Yox196W7bzVNZI7RBaPnf"
}
],
"disc_number": 1,
"duration_ms": 311200,
"explicit": false,
"external_ids": {
"isrc": "USCA20400648"
},
"external_urls": {
"spotify": "https://open.spotify.com/track/6b6uLZsoGhObYexIxnRbIb"
},
"href": "https://api.spotify.com/v1/tracks/6b6uLZsoGhObYexIxnRbIb",
"id": "6b6uLZsoGhObYexIxnRbIb",
"is_local": false,
"name": "Hangar 18 - 2004 Remix",
"popularity": 61,
"preview_url": null,
"track_number": 2,
"type": "track",
"uri": "spotify:track:6b6uLZsoGhObYexIxnRbIb"
},
"currently_playing_type": "track",
"actions": {
"disallows": {
"resuming": true
}
}
},
"original": {
"data": {
"artists": [
"Megadeth"
],
"albumArtists": [],
"album": "Rust In Peace (2004 Remix / Expanded Edition)",
"track": "Hangar 18 - 2004 Remix",
"duration": 311.2,
"playDate": "2026-03-03T03:23:06.854Z",
"isrc": "USCA20400648",
"meta": {
"spotify": {
"track": "6b6uLZsoGhObYexIxnRbIb",
"artist": [
"1Yox196W7bzVNZI7RBaPnf"
],
"albumArtist": [],
"album": "0qaLL09EtF1hiUis7PRvaJ"
},
"brainz": {
"trackNumber": 2
}
}
},
"meta": {
"deviceId": "51503f58c7-iPad",
"source": "Spotify",
"musicService": "Spotify",
"trackId": "6b6uLZsoGhObYexIxnRbIb",
"trackProgressPosition": 10.311,
"scrobbleTsSOC": 1,
"newFromSource": true,
"url": {
"web": "https://open.spotify.com/track/6b6uLZsoGhObYexIxnRbIb"
},
"art": {
"album": "https://i.scdn.co/image/ab67616d00001e02be9fa5a89479b6af481938a0"
}
}
},
"steps": [
{
"name": "preCompare",
"source": "Spotify - source name redacted"
}
],
"scrobble": {
"payload": {
"title": "Hangar 18 - 2004 Remix",
"artists": [
"Megadeth"
],
"album": "Rust In Peace (2004 Remix / Expanded Edition)",
"key": "jCGimb2wbINxXHcqXfy0R4gbowxPxX5uZiRbholDGiAbtwb1yg5pAw14H44MC5rM",
"time": 1772508497,
"length": 311.2,
"duration": 300.889
},
"response": {
"status": "success",
"track": {
"artists": [
"Megadeth"
],
"title": "Hangar 18 - 2004 Remix"
},
"desc": "Scrobbled Hangar 18 - 2004 Remix by Megadeth"
},
"mergedScrobble": {
"data": {
"artists": [
"Megadeth"
],
"track": "Hangar 18 - 2004 Remix",
"album": "Rust In Peace (2004 Remix / Expanded Edition)",
"duration": 311.2,
"playDate": "2026-03-03T03:28:17.000Z"
},
"meta": {
"source": "Maloja",
"url": {
"web": "http://local-ip-redacted.local:42010/track?artist=Megadeth&title=Hangar+18+-+2004+Remix"
},
"lifecycle": {
"input": {
"time": 1772508497,
"track": {
"artists": [
"Megadeth"
],
"title": "Hangar 18 - 2004 Remix",
"length": 311.2,
"album": {
"name": "Rust In Peace (2004 Remix / Expanded Edition)",
"artists": []
}
}
},
"original": {
"data": {
"artists": [
"Megadeth"
],
"track": "Hangar 18 - 2004 Remix",
"album": "Rust In Peace (2004 Remix / Expanded Edition)",
"duration": 311.2,
"playDate": "2026-03-03T03:28:17.000Z"
},
"meta": {
"source": "Maloja",
"url": {
"web": "http://local-ip-redacted.local:42010/track?artist=Megadeth&title=Hangar+18+-+2004+Remix"
}
}
},
"steps": []
}
}
}
}
}I'm not sure what I'm doing wrong, if anything. I've tried various things, including having the transform pipeline in both the source and client JSON files, moving the playTransform rules into the source JSON file ( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Thanks for the detailed logs and debug data! I'll see if I can reproduce this. |
Beta Was this translation helpful? Give feedback.
I think I see what you're saying. Can you make a new issue for this instead of a discussion? Also, please include Play Debug Data for the Plays detailed in the posted logs.