Skip to content

Instantly share code, notes, and snippets.

@spikeh
spikeh / lastfm.patch
Last active January 2, 2019 12:36
Custom last.fm plugin for deadbeef that scrobbles album artist if the artist field contains "feat." or "featuring". Useful for those that use MusicBrainz.
diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c
index 5d0a008ca..5b8c99627 100644
--- a/plugins/lastfm/lastfm.c
+++ b/plugins/lastfm/lastfm.c
@@ -479,6 +479,11 @@ lfm_format_uri (int subm, DB_playItem_t *song, char *out, int outl, time_t start
return -1;
}
+ char *feat = NULL;
+ if ((feat = strstr(a, " feat.")) || (feat = strstr(a, " featuring")) || (feat = strstr(a, " ft."))) {