From d89c14d3eab6a32f3029a3e599397ad61766fa97 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Thu, 27 Jan 2022 17:01:57 +0100 Subject: [PATCH] Support all MB entity URLs in FileLookup --- picard/browser/filelookup.py | 2 +- test/test_browser.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/picard/browser/filelookup.py b/picard/browser/filelookup.py index fb175bb79..46cb75f54 100644 --- a/picard/browser/filelookup.py +++ b/picard/browser/filelookup.py @@ -51,7 +51,7 @@ from picard.ui.searchdialog.album import AlbumSearchDialog class FileLookup(object): RE_MB_ENTITY = re.compile(r""" - \b(?Prelease-group|release|recording|work|artist|label|url|area|track)? + \b(?Parea|artist|instrument|label|place|recording|release|release-group|series|track|url|work)? \W*(?P[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}) """, re.VERBOSE | re.IGNORECASE) diff --git a/test/test_browser.py b/test/test_browser.py index 6330f9c46..0ef93cf52 100644 --- a/test/test_browser.py +++ b/test/test_browser.py @@ -133,7 +133,7 @@ class BrowserLookupTest(PicardTestCase): def test_mbid_lookup_browser_fallback(self): mbid = '4836aa50-a9ae-490a-983b-cfc8efca92de' - for entity in {'area', 'artist', 'label', 'url', 'work'}: + for entity in {'area', 'artist', 'instrument', 'label', 'place', 'series', 'url', 'work'}: with patch.object(webbrowser2, 'open') as mock_open: uri = '%s:%s' % (entity, mbid) result = self.lookup.mbid_lookup(uri)