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

web: GET /album/<n> hides artpath even when INCLUDE_PATHS is set #3866

Closed
GrahamCobb opened this issue Mar 6, 2021 · 2 comments · Fixed by #3868
Closed

web: GET /album/<n> hides artpath even when INCLUDE_PATHS is set #3866

GrahamCobb opened this issue Mar 6, 2021 · 2 comments · Fixed by #3868
Labels
feature features we would like to implement

Comments

@GrahamCobb
Copy link
Contributor

GrahamCobb commented Mar 6, 2021

Problem

beet web provides GET operations to fetch track items and albums. By default this removes paths
from the returned data, but the config setting INCLUDE_PATHS should allow the paths to be returned.

This works correctly for GET /item/... but not GET /album/... In the album case, the artpath is unconditionally deleted from the results.

Setup

Add to config file:

web:
include_paths: true

Use beet web to make a webserver available and do a GET /album/N, where N is the album id of an album in the database which has a cover art set. The JSON result should include the 'artpath' value but does not.

  • OS: Linux (Debian Testing)
  • Python version: 3.9.1-1
  • beets version: 1.4.9-7
  • Turning off plugins made problem go away (yes/no): bug in web plugin

Note this is a small issue, although I have hit it. I have a fix (and a regression test) which I will submit as a small PR once my first PR has been finished (so I can learn from the mistakes I made in that!).

@sampsyo sampsyo added the feature features we would like to implement label Mar 6, 2021
@sampsyo sampsyo changed the title Web api GET /album/<n> hides artpath even when INCLUDE_PATHS is set web: GET /album/<n> hides artpath even when INCLUDE_PATHS is set Mar 6, 2021
@sampsyo
Copy link
Member

sampsyo commented Mar 6, 2021

Sounds great!

@GrahamCobb
Copy link
Contributor Author

I see it as a bug, rather than a feature (as it works correctly for the item path) but I guess it doesn't really matter!

Anyway, I will submit the PR once the first one is completed. I forgot to create a separate branch for that one so I think it will be easier to manage once that is closed.

GrahamCobb added a commit to GrahamCobb/beets that referenced this issue Mar 6, 2021
@GrahamCobb GrahamCobb mentioned this issue Mar 6, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature features we would like to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants