From 2293e1e09d384b2e289f95efd18dc9ec364e2790 Mon Sep 17 00:00:00 2001 From: kooimens Date: Tue, 3 Nov 2015 20:03:24 +0100 Subject: [PATCH 1/7] Discogs: option to change 'various' album artist to 'Various Artists' (Musicbrainz naming) Just a simple config option to change 'various' album artist to the one that MusicBrainz uses: Various Artists. --- beetsplug/discogs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index 904220685..4afdcd6fe 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -57,6 +57,7 @@ class DiscogsPlugin(BeetsPlugin): 'apisecret': 'plxtUTqoCzwxZpqdPysCwGuBSmZNdZVy', 'tokenfile': 'discogs_token.json', 'source_weight': 0.5, + 'change_va': False, }) self.config['apikey'].redact = True self.config['apisecret'].redact = True @@ -224,6 +225,8 @@ class DiscogsPlugin(BeetsPlugin): albumtype = ', '.join( result.data['formats'][0].get('descriptions', [])) or None va = result.data['artists'][0]['name'].lower() == 'various' + if va and self.config['change_va']: + artist = 'Various Artists' year = result.data['year'] label = result.data['labels'][0]['name'] mediums = len(set(t.medium for t in tracks)) From da0360bd902f9418f27adfeb8dbb032f9626643a Mon Sep 17 00:00:00 2001 From: kooimens Date: Thu, 5 Nov 2015 14:50:40 +0100 Subject: [PATCH 2/7] Update discogs.py --- beetsplug/discogs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index 4afdcd6fe..8d0f12e44 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -57,7 +57,7 @@ class DiscogsPlugin(BeetsPlugin): 'apisecret': 'plxtUTqoCzwxZpqdPysCwGuBSmZNdZVy', 'tokenfile': 'discogs_token.json', 'source_weight': 0.5, - 'change_va': False, + 'va_name': 'Various Artists', }) self.config['apikey'].redact = True self.config['apisecret'].redact = True @@ -225,8 +225,8 @@ class DiscogsPlugin(BeetsPlugin): albumtype = ', '.join( result.data['formats'][0].get('descriptions', [])) or None va = result.data['artists'][0]['name'].lower() == 'various' - if va and self.config['change_va']: - artist = 'Various Artists' + if va: + artist = self.config['va_name'].get() year = result.data['year'] label = result.data['labels'][0]['name'] mediums = len(set(t.medium for t in tracks)) From 414ae131a5c0c1656abcdf1af20a84edac633888 Mon Sep 17 00:00:00 2001 From: kooimens Date: Fri, 6 Nov 2015 19:27:36 +0100 Subject: [PATCH 3/7] Fix style error --- beetsplug/discogs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py index 8d0f12e44..78a5ee4aa 100644 --- a/beetsplug/discogs.py +++ b/beetsplug/discogs.py @@ -226,7 +226,7 @@ class DiscogsPlugin(BeetsPlugin): result.data['formats'][0].get('descriptions', [])) or None va = result.data['artists'][0]['name'].lower() == 'various' if va: - artist = self.config['va_name'].get() + artist = self.config['va_name'].get() year = result.data['year'] label = result.data['labels'][0]['name'] mediums = len(set(t.medium for t in tracks)) From b11533b98f69349dfeeb23d7294cff031aed44a7 Mon Sep 17 00:00:00 2001 From: kooimens Date: Fri, 6 Nov 2015 19:45:05 +0100 Subject: [PATCH 4/7] Update discogs docs --- docs/plugins/discogs.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/plugins/discogs.rst b/docs/plugins/discogs.rst index 038718f9b..2961bb3bb 100644 --- a/docs/plugins/discogs.rst +++ b/docs/plugins/discogs.rst @@ -25,6 +25,14 @@ MusicBrainz. If you have a Discogs ID for an album you want to tag, you can also enter it at the "enter Id" prompt in the importer. +Configuration +------------- +To configure the plugin, make a ``discogs:`` section in your configuration +file. The available options are: + +- **va_name**: Change the name of the albumartist if an album is V.A. + Default: ``'Various Artists'`` (Same as MusicBrainz). + Troubleshooting --------------- From c20479515373fbd0f899be635b88c5ce84568479 Mon Sep 17 00:00:00 2001 From: kooimens Date: Fri, 6 Nov 2015 19:56:19 +0100 Subject: [PATCH 5/7] Update changelog --- docs/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 7c5b91217..a522b4ce3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -24,6 +24,9 @@ Fixes: * :doc:`/plugins/thumbnails`: Fix a crash with Unicode paths. :bug:`1686` * :doc:`/plugins/embedart`: The ``remove_art_file`` option now works on import (as well as with the explicit command). :bug:`1662` :bug:`1675` +* :doc:`/plugins/discogs`: New config option to change the default album + artist name if album is V.A. The default is changed to 'Various Artists' to + be the same as for MusicBrainz. 1.3.15 (October 17, 2015) From 7d02d7da29c6ea27234860a2490e1c1635a76817 Mon Sep 17 00:00:00 2001 From: kooimens Date: Fri, 6 Nov 2015 20:00:36 +0100 Subject: [PATCH 6/7] Update changelog.rst --- docs/changelog.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index a522b4ce3..1257c9132 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -24,9 +24,9 @@ Fixes: * :doc:`/plugins/thumbnails`: Fix a crash with Unicode paths. :bug:`1686` * :doc:`/plugins/embedart`: The ``remove_art_file`` option now works on import (as well as with the explicit command). :bug:`1662` :bug:`1675` -* :doc:`/plugins/discogs`: New config option to change the default album - artist name if album is V.A. The default is changed to 'Various Artists' to - be the same as for MusicBrainz. +* :doc:`/plugins/discogs`: New config option (va_name) to change the default + album artist name if album is V.A. The default is changed to 'Various Artists' + to be the same as for MusicBrainz. 1.3.15 (October 17, 2015) From 1150f65ee3752c73e6ccbda4f2b1465c413ed9b5 Mon Sep 17 00:00:00 2001 From: kooimens Date: Fri, 6 Nov 2015 20:01:56 +0100 Subject: [PATCH 7/7] Update changelog.rst --- docs/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 1257c9132..84b79b723 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -26,7 +26,7 @@ Fixes: (as well as with the explicit command). :bug:`1662` :bug:`1675` * :doc:`/plugins/discogs`: New config option (va_name) to change the default album artist name if album is V.A. The default is changed to 'Various Artists' - to be the same as for MusicBrainz. + to be the same as MusicBrainz. 1.3.15 (October 17, 2015)