Skip to content

bpd: support short form of list command for albums - #3215

Merged
arcresu merged 2 commits into
beetbox:masterfrom
arcresu:bpd-compat
Apr 15, 2019
Merged

bpd: support short form of list command for albums#3215
arcresu merged 2 commits into
beetbox:masterfrom
arcresu:bpd-compat

Conversation

@arcresu

@arcresu arcresu commented Apr 13, 2019

Copy link
Copy Markdown
Member

Some clients list the albums belonging to an artist by issuing the command list album <ARTIST NAME>. This change inserts the tag artist before the artist name so that this succeeds. Fixes #3007.

I confirmed the behaviour with the current MPD. It gave a rather helpful error message ACK [2@0] {list} should be "Album" for 3 arguments that shows that the shorter version is only for getting the albums of an artist.

A small unrelated change is to address a minor issue where if clients listed all album artists the first result would be blank (due to not all items in beets' database having album artist tags). We just skip any blank responses for the specific case of listing all unique values of a tag.

@sampsyo sampsyo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! ✨ Thanks for making both of these changes. I just left one comment inline about mentioning that this seems to be a nonstandard extension…

Comment thread beetsplug/bpd/__init__.py Outdated
arcresu added 2 commits April 15, 2019 13:25
Some clients list the albums belonging to an artist by issuing the
command `list album <ARTIST NAME>`. This change inserts the tag `artist`
before the artist name so that this succeeds. Fixes #3007
@arcresu

arcresu commented Apr 15, 2019

Copy link
Copy Markdown
Member Author

Just to note though that the MPD developer has indicated that the MPD protocol docs are not complete and that the software should be used as a reference to answer any questions. I don't think this is non-standard behaviour, just an undocumented part of the protocol that clients were already relying on.

The MPD query syntax was overhauled in 0.21, so I think this syntax is only still supported by MPD for backwards-compatibility. It might even be that the clients stop issuing these type of queries once we start claiming to be a more modern version of MPD.

@arcresu
arcresu merged commit 7b910c3 into beetbox:master Apr 15, 2019
@arcresu
arcresu deleted the bpd-compat branch April 15, 2019 03:39
@sampsyo

sampsyo commented Apr 15, 2019

Copy link
Copy Markdown
Member

Got it; that makes sense! In that case, I suppose it's not shocking that the real-world usage would differ from the docs. Thanks for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bpd bpd plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

beets bpd crash

3 participants