Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support searching non-album tracks #39

Closed
mgoltzsche opened this issue Dec 5, 2023 · 0 comments · Fixed by #40
Closed

Support searching non-album tracks #39

mgoltzsche opened this issue Dec 5, 2023 · 0 comments · Fixed by #40

Comments

@mgoltzsche
Copy link
Contributor

mgoltzsche commented Dec 5, 2023

Currently, when I search for a singleton track (not part of an album) within my beets library via mopidy-beets, I don't get any result.

Problem

When I enter "Bertrand" into the mopidy search (knowing that I have a matching singleton track within the library), mopidy-beets logs:

ERROR    2023-12-05 23:18:36,143 [1:BeetsBackend-3 (_actor_loop)] mopidy_beets.client
  Beets - Request http://127.0.0.1:8337/album/None, failed with status code 404
WARNING  2023-12-05 23:18:36,143 [1:Core-12 (_actor_loop)] mopidy.core.library
  BeetsBackend does not implement library.search() with "exact" support. Please upgrade it.
ERROR    2023-12-05 23:18:36,155 [1:BeetsBackend-3 (_actor_loop)] mopidy_beets.client
  Beets - Request http://127.0.0.1:8337/album/None, failed with status code 404
WARNING  2023-12-05 23:18:36,155 [1:Core-12 (_actor_loop)] mopidy.core.library
  BeetsBackend does not implement library.search() with "exact" support. Please upgrade it.

Correspondingly, beets logs:

127.0.0.1 - - [05/Dec/2023 23:18:36] "GET /item/query/artist:Bertrand HTTP/1.1" 200 -
127.0.0.1 - - [05/Dec/2023 23:18:36] "GET /album/None HTTP/1.1" 404 -
127.0.0.1 - - [05/Dec/2023 23:18:36] "GET /item/query/Bertrand HTTP/1.1" 200 -
127.0.0.1 - - [05/Dec/2023 23:18:36] "GET /album/None HTTP/1.1" 404 -

Looking into the beets query result JSON shows that the album_id is null, indeed:

$ curl -s http://localhost:8337/item/query/Bertrand
{"results":[{"id": 1, "album_id": null, "title": "\u00c7a plane pour moi", ...

Apparently, mopidy-beets submits the search query to beets correctly, reads the result containing the matching track but then tries to query the containing album although the track is not associated with an album.

Proposed solution

Let mopidy-beets also add singleton tracks (that are not associated with an album) to the search result, not trying to resolve None albums.

Environment

I am using

  • beets 1.6.0
  • mopidy 3.4.2
  • mopidy-beets 4.0.1
mgoltzsche added a commit to mgoltzsche/mopidy-beets that referenced this issue Dec 6, 2023
This fixes a bug that prevented singleton (none-album) search results from showing up within mopidy.
Fixes mopidy#39
mgoltzsche added a commit to mgoltzsche/mopidy-beets that referenced this issue Dec 6, 2023
This fixes a bug that prevented singleton (none-album) search results from showing up within mopidy.
Fixes mopidy#39
mgoltzsche added a commit to mgoltzsche/mopidy-beets that referenced this issue Dec 6, 2023
This fixes a bug that prevented singleton (none-album) search results from showing up within mopidy.
Fixes mopidy#39
mgoltzsche added a commit to mgoltzsche/mopidy-beets that referenced this issue Dec 6, 2023
This fixes a bug that prevented singleton (none-album) search results from showing up within mopidy.
Fixes mopidy#39
mgoltzsche added a commit to mgoltzsche/mopidy-beets that referenced this issue Dec 12, 2023
This fixes a bug that prevented singleton (none-album) search results from showing up within mopidy.
Fixes mopidy#39

Co-authored-by: Nick Steel <nick@nsteel.co.uk>
sumpfralle pushed a commit that referenced this issue Dec 12, 2023
This fixes a bug that prevented singleton (none-album) search results from showing up within mopidy.
Fixes #39

Co-authored-by: Nick Steel <nick@nsteel.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant