I’m trying to get all the duplicates in my library, but I can’t get it to work on singletons.
My duplicate keys are
[mb_trackid, mb_releasegroupid, track]
As you can see, two of these keys are album-specific, however,
beet info -l on the culprits shows that while they are singletons, these tags are nontheless populated, and this causes the recordings to not be seen as duplicates.
Could there be a way to adapt the duplicates plugin so that for singletons it doesn’t consider album-specific tags?
As a temporary workaround, I thought of using the
inline plugin and create a tag this way:
dupe: | if singleton: return mb_trackid else: return mb_trackid+track+mb_releasegroupid
However, upon trying it out I got this error message:
beetsplug.inline.InlineError: error in inline path field code: if singleton: return mb_trackid else: return mb_trackid+track+mb_releasegroupid NameError: global name 'singleton' is not defined
So what’s the name of the
singleton tag in
inline? How could I find out?
after looking at all the variables available for
inline, there is nothing corresponding to the
I did it by by trying
for x in globals(): print(x)
discogs_artistid lyrics disctitle lyricist month channels disc mb_trackid composer mb_parentworkid albumartist_sort style bitdepth parentwork_disambig title mb_albumid acoustid_fingerprint rg_album_gain mb_releasegroupid rg_album_peak discogs_albumid albumartist_credit catalognum format encoder rg_track_gain day original_year data_source r128_album_gain mb_albumartistid releasegroupdisambig work bpm r128_track_gain mb_workid arranger artist_credit artist parent_composer mb_workid_current grouping mb_releasetrackid disctotal album_id albumstatus alt.by-work track_alt original_day albumartist year albumdisambig samplerate id album mb_artistid parentwork media artist_sort comments tracktotal rg_track_peak track mtime acoustid_id work_date added original_month discogs_labelid __builtins__ comp composer_sort initial_key genre path bitrate language country script parent_composer_sort label length albumtype __INLINE_FUNC__ work_disambig asin