<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/51f4ef26b7256dc52c986cd0104dc6ea9a5f7780">https://github.com/macports/macports-ports/commit/51f4ef26b7256dc52c986cd0104dc6ea9a5f7780</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 51f4ef26b72 beets-usertag: update to 20211129
</span>51f4ef26b72 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 51f4ef26b7256dc52c986cd0104dc6ea9a5f7780
</span>Author: Kirill A. Korinsky <kirill@korins.ky>
AuthorDate: Mon Nov 29 23:35:03 2021 +0100
<span style='display:block; white-space:pre;color:#404040;'> beets-usertag: update to 20211129
</span>---
audio/beets/Portfile | 15 ++--
audio/beets/files/usertag-album.diff | 162 -----------------------------------
2 files changed, 6 insertions(+), 171 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/audio/beets/Portfile b/audio/beets/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index c819d556bc1..4c549a99eab 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/audio/beets/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/audio/beets/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -525,9 +525,9 @@ subport ${name}-summarize {
</span> }
subport ${name}-usertag {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- github.setup igordertigor beets-usertag 8e058361c9dfa335980048c0afb9274e5f077611
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- version 20210908
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ github.setup igordertigor beets-usertag 1b78e48ea471ced50d1e499085d6ef3b935537f1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ version 20211129
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 0
</span>
license MIT
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -535,12 +535,9 @@ subport ${name}-usertag {
</span> long_description \
${description}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 2e44ee667ed71fb8f9b8c96dd7503bd1fff89918 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 5bd683eca9a38ab14b1917e3023e4639c16378b88ea31d2d4a45bec8dbf73c56 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 2449
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch.pre_args -p1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles usertag-album.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 30ab572c6400feffaf245da349bf66a63ae39441 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 d486e241309948b5b764c7776a7da2dcebe2dd7ffb36affdf880b77da77d67df \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 2655
</span> }
subport ${name}-xtractor {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/audio/beets/files/usertag-album.diff b/audio/beets/files/usertag-album.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 074a7ca8d52..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/audio/beets/files/usertag-album.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,162 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-From 59898d241a08d62c2058af6b4be315a30cffef19 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-From: Edgars Supe <edgars.supe@gmail.com>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Date: Fri, 10 Sep 2021 15:12:08 +0300
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Subject: [PATCH] Add ability to add tags to albums
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>----
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- README.md | 23 ++++++++++++++---------
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- beetsplug/usertag.py | 43 +++++++++++++++++++++++++++++++++++--------
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 2 files changed, 49 insertions(+), 17 deletions(-)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git a/README.md b/README.md
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-index f0e2ab5..7579a09 100644
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/README.md
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/README.md
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -5,34 +5,39 @@ Provides user defined keyword tags for
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- add and remove tags and to clear all tags from a file. These are specifically:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ```
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--beet addtag <query> -t <usertag>[ -t <other-usertag>[...]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+beet addtag <query> -t <usertag>[ -t <other-usertag>[...]] [-a]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ```
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--Adds one (or more) usertags to the track with the given id.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+Adds one (or more) usertags to the track with the given id. Use the `-a` flag to
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+tag albums instead.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ```
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--beet rmtag <query> -t <usertag>[ -t <other-usertag>[...]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+beet rmtag <query> -t <usertag>[ -t <other-usertag>[...]] [-a]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ```
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--Removes a usertag from the track with the given id.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+Removes a usertag from the track with the given id. Use the `-a` flag to remove
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+a tag from an album.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ```
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--beet cleartags <query>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+beet cleartags <query> [-a]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ```
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--Strips all usertags from the track with the given id.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+Strips all usertags from the track with the given id. Use the `-a` flag to strip
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+all usertags from the specified albums.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ```
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--beet listtags
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+beet listtags [-a]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ```
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--Lists all user defined tags and a count of tracks that used those tags.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+Lists all user defined tags and a count of tracks that used those tags. Use the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+`-a` flag to return user-defined tags and count for albums.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ```
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- beet list usertags:my-tag
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ```
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--Query user tags as you would query any other field with the standard `list` command.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+Query user tags as you would query any other field with the standard `list`
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+command. Add the `-a` flag to list user-tagged albums.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Installation
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-diff --git a/beetsplug/usertag.py b/beetsplug/usertag.py
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-index f272dbc..6fec521 100644
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- a/beetsplug/usertag.py
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ b/beetsplug/usertag.py
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -32,7 +32,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- def add_usertag(lib, opts, args):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- """Add a usertag"""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- items = lib.items(args)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ items = _get_items(lib, opts, args)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- newtags = opts.tags
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for item in items:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- usertags = item.get('usertags', None)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -57,14 +57,19 @@ def add_usertag(lib, opts, args):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- '--tag', '-t',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- action='append', dest='tags',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- help='Tag to add. '
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- 'Combine multiple tags by specifiing this option repeatedly.')
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ 'Combine multiple tags by specifying this option repeatedly.')
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+add_tag_command.parser.add_option(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ '--album', '-a',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ action='store_true', default=False,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ dest='album', help='tag only albums'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- add_tag_command.parser.usage += '\n'\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 'Example: beet addtag artist:beatles -t favourites'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- def remove_usertag(lib, opts, args):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- """Remove a usertag"""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- items = lib.items(args)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ items = _get_items(lib, opts, args)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- deltags = opts.tags
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for item in items:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- usertags = item.get('usertags', None)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -88,24 +93,34 @@ def remove_usertag(lib, opts, args):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- '--tag', '-t',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- action='append', dest='tags',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- help='Tag to remove. '
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- 'Combine multiple tags by specifiing this option repeatedly.')
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ 'Combine multiple tags by specifying this option repeatedly.')
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+rm_tag_command.parser.add_option(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ '--album', '-a',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ action='store_true', default=False,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ dest='album', help='remove tag only from albums'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rm_tag_command.parser.usage += '\n'\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 'Example: beet rmtag artist:beatles -t favourites'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- def clear_usertags(lib, opts, args):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- """Clear all usertags"""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- items = lib.items(args)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ items = _get_items(lib, opts, args)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for item in items:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- item.update({'usertags': None})
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- item.store()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- clear_tags_command = Subcommand('cleartags',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- help='remove ALL user defined tags')
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ help='remove ALL user-defined tags from tracks')
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+clear_tags_command.parser.add_option(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ '--album', '-a',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ action='store_true', default=False,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ dest='album', help='remove user-defined tags from albums'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- clear_tags_command.func = clear_usertags
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- def list_usertags(lib, opts, args):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- items = lib.items(u'')
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ items = _get_items(lib, opts, args)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- alltags = []
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for item in items:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- usertags = item.get('usertags', None)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -114,11 +129,23 @@ def list_usertags(lib, opts, args):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- for tag in sorted(set(alltags)):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- print(tag, len([True for t in alltags if t == tag]))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- list_tags_command = Subcommand('listtags',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- help='list all user defined tags',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ help='list all user-defined tags on tracks',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- aliases=('lst',))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+list_tags_command.parser.add_option(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ '--album', '-a',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ action='store_true', default=False,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ dest='album', help='list all user-defined tags on albums'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- list_tags_command.func = list_usertags
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+def _get_items(lib, opts, args):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if opts.album:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return lib.albums(args)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ else:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return lib.items(args)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- class UserTagsPlugin(BeetsPlugin):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- """UserTags plugin to support user defined tags"""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- item_types = {'usertags': types.STRING}
</span></pre><pre style='margin:0'>
</pre>