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

Returns a 'failed' status when no covers are found #13

Open
dgellow opened this issue Dec 11, 2013 · 2 comments
Open

Returns a 'failed' status when no covers are found #13

dgellow opened this issue Dec 11, 2013 · 2 comments
Assignees

Comments

@dgellow
Copy link
Contributor

dgellow commented Dec 11, 2013

If mpd is playing a song and the server can't find the cover /api/cover will returns the following json

{
  "status": "success",
  "large": null,
  "medium": null,
  "mega": null,
  "extralarge": null,
  "small": null
}

Something like that should be better

{
    "status" : "fail",
    "error" : "Can't find the cover",
    "cover" : null
}
@ghost ghost assigned gcmalloc Dec 11, 2013
@gcmalloc
Copy link
Member

What if you only have a small size, what if the request between the flask server and last fm failed ?

@dgellow
Copy link
Contributor Author

dgellow commented Dec 12, 2013

If not all size are found

{
  "status": "success",
  "error": null,
  "cover": {
      "large": "http//foo.bar.tld/album-picture.jpg",
      "medium": null,
      "mega": null,
      "extralarge": null,
      "small": null
  }
}

If the request between flask and lastfm failed

{
    "status" : "fail",
    "error" : "Can't fetch information from lastfm",
    "cover" : null
}

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

No branches or pull requests

2 participants