metadata-filter
metadata-filter copied to clipboard
Artist-specific suffixes
As part of my rabbit hole dive I came across a couple of artists for whom basically all song titles have an artist-specific suffix.
-
Basically all songs by
Glee Castare suffixed with(Glee Cast Version)or- Glee Cast Version -
It appears all songs by
Kelsea Ballerinihave titles suffixed with- ballerini album version
Is it appropriate to add artist-specific filters for track titles like this?
And on the subject of multiple types of suffixes, apparently some Glee songs have titles like so:
Smooth Criminal (Glee Cast Version) (feat. 2CELLOS)
Filters (and filter functions) don't know about artists in the context of now playing song. Obviously, you can write a function which uses a hardcoded list of artists, but I don't think it's a good solution.
For now, the only solution is to use custom filter functions in client code. For example, in Web Scrobbler we use a filter function to filter YouTube titles conditionally (yes, this filter function is not a pure function).
Another possible way is to pass this context to the filter, so filter functions would know about additional information they could use to filter a field value. This way also requires building the context object to pass it to the filter.
I believe everything that is suffixed by "Version" label should be removed, right?
Filters (and filter functions) don't know about artists in the context of now playing song. Obviously, you can write a function which uses a hardcoded list of artists, but I don't think it's a good solution.
Sorry, I didn't explain what I was meaning well enough. I definitely don't think it's a good idea to require supplemental metadata (ie. the artist name) to process track titles. What I'm wondering is whether you'd accept a filter to (for example) remove the specific suffix (Glee Cast Version), which will only ever be relevant for a single artist.
And if so, how do you want to categorise these kinds of filters?
I believe everything that is suffixed by "Version" label should be removed, right?
I don't think so. This is what I get with a quick test on the master branch:
[djmattyg007@djmattyg-arch2019 metadata-filter]$ npx ts-node
> const MetadataFilter = require("./src")
undefined
> MetadataFilter.removeVersion("Test Song Name (Glee Cast Version)")
'Test Song Name (Glee Cast Version)'
Aha, I got it.
I think it's fine to add such filters.
And if so, how do you want to categorise these kinds of filters?
I see two different options.
- If it's related to Spotify only, it can be added as a separate filter function with own filter rules.
- The
removeVersionfunction can be extended to process generic "Version" suffixes, like thefixTrackSuffixfunction does. The Spotify filter does not include this function, but we can include it.
I don't think so. This is what I get with a quick test on the master branch:
Sorry, I confused it with the fixTrackSuffix which is more generic; removeVersion removes only hardcoded suffixes.
I don't think it would be a good idea to implement a generic "strip Version suffixes" rule, as this would also impact song titles like The Sound of Silence - Acoustic Version, where you probably would want the suffix to be kept.
I guess I'll start by adding these artist-specific filters to the removeVersion ruleset and see how we go from there.