mbsync: Double output
See original GitHub issueRecently the mbsync
plugin has started to produce double output.
$ beet mbsync -p black sabbath vol 4
Black Sabbath - Vol 4 - Wheels of Confusion
script: -> Latn
language: -> eng
script: -> Latn
language: -> eng
...snip...
Black Sabbath - Vol 4 - Under the Sun
script: -> Latn
language: -> eng
script: -> Latn
language: -> eng
A quick git bisect
reveals this was introduced in 72515448ad505ef0b73c0d0aa4aa424419b55755.
It looks like this could just be a cosmetic issue but I haven’t had time to dive into the new code from #2988 to confirm yet.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
mbsync - isync
Multiple replicas of each mailbox can be maintained. ... Prepend + to the command to indicate that it produces TTY output (e.g., a...
Read more >isync - ArchWiki
isync is a command line application to synchronize mailboxes; ... in one local text file per mailbox pair; multiple replicas of a mailbox...
Read more >mbsync(1): synchronize IMAP4/Maildir mailboxes - Die.net
mbsync is a command line application which synchronizes mailboxes; ... local text file per mailbox pair; multiple replicas of a mailbox can be...
Read more >Duplicated mails - isync-devel@lists.sourceforge.net - narkive
I've attached the output from running "mbsync -a --debug-net-all ... remote server, even though multiple copies of the mail already exist on the...
Read more >email - Possible to make mbsync (isync) update multiple ...
When running mbsync -a , it goes over each folder, updating it. This gets slow if you have many folders (20+ for e.g.)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The call trace is actually slightly different, you looked at
beets.library.FormattedItemMapping.__iter__
, what’s actually being iterated over inshow_model_changes
is not this formatted view, but thebeets.library.Item
directly. That in turn inheritsbeets.dbcore.db.Model.__iter__
, which just returnsiter(self.keys())
.So it appears to be correct that
Item.keys()
should always return a list, but ifwith_album=True
, it should remove duplicates first.In addition, I have the impression that
show_model_changes
can be improved performance-wise. I guess it’s correct that it iterates over the item rather than the formatted view, since it should compare the actual values, not any formatted output. However, it creates a new view for each key by callingItem.formatted()
. It should keep this view around instead.@FichteFoll it looks like this:
https://github.com/beetbox/beets/blob/c4347960eab78be2ad54f4e35b32928c47e287d1/beetsplug/mbsync.py#L161
Calls
show_model_changes
, which iterates over fields:https://github.com/beetbox/beets/blob/c4347960eab78be2ad54f4e35b32928c47e287d1/beets/ui/__init__.py#L713
Which are returned from
__iter__
:https://github.com/beetbox/beets/blob/c4347960eab78be2ad54f4e35b32928c47e287d1/beets/library.py#L432-L433
And it seems like
all_keys
is an amalgamation ofmodel_keys
andalbum_keys
:https://github.com/beetbox/beets/blob/c4347960eab78be2ad54f4e35b32928c47e287d1/beets/library.py#L385-L387
And
model_keys
is populated from thekeys
method:https://github.com/beetbox/beets/blob/c4347960eab78be2ad54f4e35b32928c47e287d1/beets/library.py#L382
I am a bit confused how this is an issue though, as
all_keys
already convertsmodel_keys
to a set…