question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mbsync: Double output

See original GitHub issue

Recently 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:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
wisp3rwindcommented, Mar 18, 2021

I am a bit confused how this is an issue though, as all_keys already converts model_keys to a set…

The call trace is actually slightly different, you looked at beets.library.FormattedItemMapping.__iter__, what’s actually being iterated over in show_model_changes is not this formatted view, but the beets.library.Item directly. That in turn inherits beets.dbcore.db.Model.__iter__, which just returns iter(self.keys()).

So it appears to be correct that Item.keys() should always return a list, but if with_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 calling Item.formatted(). It should keep this view around instead.

2reactions
jackwilsdoncommented, Mar 15, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found