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

Add section-level info for "Collection" / "is_compilation" projects to API #253

Open
redrun45 opened this issue Feb 4, 2025 · 0 comments
Labels
area:api API and RSS - resources for third-party automed access enhancement help wanted

Comments

@redrun45
Copy link
Collaborator

redrun45 commented Feb 4, 2025

There are several fields in the sections table that are only used in "Collection" projects. Following the pattern of #246, we might add those fields to the API.

Most projects only have a single source document, stored as projects.url_text_source. They have a single language, and a single group of authors, which are all assumed to apply to every audio section recorded for that project.

The main exception is "Collection" projects, where readers can submit recordings from any number of different sources. Those projects are marked with projects.is_compilation = 1. For these projects, and these projects only, our code uses the following fields, which are not currently returned as part of the API:

  • sections.source
  • sections.language_id
  • sections.author_id

The place to start is application/libraries/Librivox_API.php. We'll want this to be behind a new flag, so that existing API users aren't suddenly receiving new data they don't know what to do with. For those '_id' fields, it looks like we have a nicer way of returning the data, rather than sending the raw IDs. 😉

Personally, this is low on the list of "me writing new code". But if someone comes along with some code, I'd be willing to comment and help test and/or refine.

@redrun45 redrun45 added area:api API and RSS - resources for third-party automed access enhancement help wanted labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api API and RSS - resources for third-party automed access enhancement help wanted
Projects
None yet
Development

No branches or pull requests

1 participant