Normalize digital media in Discogs searches - #6980
sindreruud wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6980 +/- ##
=======================================
Coverage 76.85% 76.85%
=======================================
Files 163 163
Lines 21627 21629 +2
Branches 3344 3345 +1
=======================================
+ Hits 16621 16623 +2
Misses 4190 4190
Partials 816 816
🚀 New features to boost your workflow:
|
snejus
left a comment
There was a problem hiding this comment.
Thanks for this! Could you normalize the media values before passing them to util.plurality()?
Currently, Digital Media and WEB are counted separately. For example, two tracks with Digital Media, two with WEB, and three with Vinyl would select Vinyl, even though the normalized plurality should be File.
Would you mind adding a regression test with multiple items covering this case as well?
Also, please rebase this on master to resolve the current conflict.
| "digital media", | ||
| "web", |
There was a problem hiding this comment.
I think it's worth defining this as a constant at the top of the module.
The Discogs plugin supports
mediaas anextra_tagssearch filter and maps it to Discogs' format parameter.Discogs uses the word
Fileto describe digital releases. MusicBrainz on the other hand uses something different,Digital MediaIf you have music previously tagged against MusicBrainz, the metadata will usually say
Digital Media. I have also seenWEBbeing quite common.As a result, enabling
mediaindiscogs.extra_tagscan negatively impact the search accuracy, while in reality it should not.This PR normalizes
Digital MediaandWEBtoFilewhen constructing the Discogs search filter.PS, this is my first PR in this project. So please let me know if there is something I need to correct. I tried following all the documentation to the best of my knowledge.