mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 20:13:37 +01:00
/item/at_path/ endpoint
More at_path /item/by_path docs
This commit is contained in:
parent
29d61ca634
commit
43936cd84c
2 changed files with 15 additions and 0 deletions
|
|
@ -221,6 +221,14 @@ def item_query(queries):
|
|||
return g.lib.items(queries)
|
||||
|
||||
|
||||
@app.route('/item/at_path/<path:path>')
|
||||
def item_at_path(path):
|
||||
try:
|
||||
return flask.jsonify(_rep(beets.library.Item.from_path('/' + path)))
|
||||
except beets.library.ReadError:
|
||||
return flask.abort(404)
|
||||
|
||||
|
||||
@app.route('/item/values/<string:key>')
|
||||
def item_unique_field_values(key):
|
||||
sort_key = flask.request.args.get('sort_key', key)
|
||||
|
|
|
|||
|
|
@ -162,6 +162,13 @@ response includes all the items requested. If a track is not found it is silentl
|
|||
dropped from the response.
|
||||
|
||||
|
||||
``GET /item/by_path/...``
|
||||
+++++++++++++++++++++
|
||||
|
||||
Look for an item at the given path on the server. If it corresponds to a track,
|
||||
return the track in the same format as /item/*.
|
||||
|
||||
|
||||
``GET /item/query/querystring``
|
||||
+++++++++++++++++++++++++++++++
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue