veltrixcode commited on
Commit
940d0a8
·
verified ·
1 Parent(s): 7a11778

Upload 8 files

Browse files
Files changed (1) hide show
  1. routes.py +1 -7
routes.py CHANGED
@@ -43,11 +43,6 @@ def search():
43
  required: false
44
  default: 25
45
  description: Maximum number of results
46
- - name: official
47
- in: query
48
- type: boolean
49
- required: false
50
- description: Prefer official music videos when filter=videos
51
  responses:
52
  200:
53
  description: Search results
@@ -60,12 +55,11 @@ def search():
60
 
61
  flt: Optional[str] = request.args.get("filter", type=str)
62
  limit: int = request.args.get("limit", default=25, type=int)
63
- official: Optional[bool] = request.args.get("official", default=None, type=lambda v: v.lower() == "true")
64
 
65
  if flt and flt not in ALLOWED_FILTERS:
66
  return jsonify({"error": f"Invalid filter. Allowed: {sorted(list(ALLOWED_FILTERS))}"}), 400
67
 
68
- results = _client().search(query, filter=flt, limit=limit, ignore_spelling=False, official_music_video=official)
69
  return jsonify({"results": results})
70
 
71
 
 
43
  required: false
44
  default: 25
45
  description: Maximum number of results
 
 
 
 
 
46
  responses:
47
  200:
48
  description: Search results
 
55
 
56
  flt: Optional[str] = request.args.get("filter", type=str)
57
  limit: int = request.args.get("limit", default=25, type=int)
 
58
 
59
  if flt and flt not in ALLOWED_FILTERS:
60
  return jsonify({"error": f"Invalid filter. Allowed: {sorted(list(ALLOWED_FILTERS))}"}), 400
61
 
62
+ results = _client().search(query, filter=flt, limit=limit, ignore_spelling=False)
63
  return jsonify({"results": results})
64
 
65