clean up repo
This commit is contained in:
75
app.py
75
app.py
@@ -1,6 +1,5 @@
|
||||
from flask import Flask, render_template, request, Response
|
||||
from flask_api import status
|
||||
from spot import *
|
||||
import sys
|
||||
|
||||
app = Flask(__name__)
|
||||
@@ -27,79 +26,5 @@ def privacy():
|
||||
def fourohfour(e):
|
||||
return render_template('404.html')
|
||||
|
||||
'''# ndsspotify stuff
|
||||
@app.route('/play', methods=["POST"])
|
||||
def flaskPlay():
|
||||
print(request.headers)
|
||||
if request.headers['Auth'] == passwd:
|
||||
spotPP()
|
||||
return Response('{"status":"Success"}', status=200, mimetype='application/json')
|
||||
else:
|
||||
return Response('{"status":"Incorrect password"}', status=401, mimetype='application/json')
|
||||
|
||||
@app.route('/next', methods=["POST"])
|
||||
def flaskNext():
|
||||
if request.headers['Auth'] == passwd:
|
||||
spotNE()
|
||||
return Response('{"status":"Success"}', status=200, mimetype='application/json')
|
||||
else:
|
||||
return Response('{"status":"Incorrect password"}', status=401, mimetype='application/json')
|
||||
|
||||
@app.route('/prev', methods=["POST"])
|
||||
def flaskPrev():
|
||||
if request.headers['Auth'] == passwd:
|
||||
spotPR()
|
||||
return Response('{"status":"Success"}', status=200, mimetype='application/json')
|
||||
else:
|
||||
return Response('{"status":"Incorrect password"}', status=401, mimetype='application/json')
|
||||
|
||||
@app.route('/shuf', methods=["POST"])
|
||||
def flaskShuf():
|
||||
if request.headers['Auth'] == passwd:
|
||||
spotSF()
|
||||
return Response('{"status":"Success"}', status=200, mimetype='application/json')
|
||||
else:
|
||||
return Response('{"status":"Incorrect password"}', status=401, mimetype='application/json')
|
||||
|
||||
@app.route('/repr', methods=["POST"])
|
||||
def flaskRepr():
|
||||
if request.headers['Auth'] == passwd:
|
||||
spotRE()
|
||||
return Response('{"status":"Success"}', status=200, mimetype='application/json')
|
||||
else:
|
||||
return Response('{"status":"Incorrect password"}', status=401, mimetype='application/json')
|
||||
|
||||
@app.route('/sear', methods=["POST"])
|
||||
def flaskSear():
|
||||
if request.headers['Auth'] == passwd:
|
||||
spotSE("track", request.headers['Search-Text'])
|
||||
return Response('{"status":"Success"}', status=200, mimetype='application/json')
|
||||
else:
|
||||
return Response('{"status":"Incorrect password"}', status=401, mimetype='application/json')
|
||||
|
||||
@app.route('/like', methods=["POST"])
|
||||
def flaskLike():
|
||||
if request.headers['Auth'] == passwd:
|
||||
spotLS()
|
||||
return Response('{"status":"Success"}', status=200, mimetype='application/json')
|
||||
else:
|
||||
return Response('{"status":"Incorrect password"}', status=401, mimetype='application/json')
|
||||
|
||||
@app.route('/disl', methods=['POST'])
|
||||
def flaskDisl():
|
||||
if request.headers['Auth'] == passwd:
|
||||
spotRL()
|
||||
return Response('{"status":"Success"}', status=200, mimetype='application/json')
|
||||
else:
|
||||
return Response('{"status":"Incorrect password"}', status=401, mimetype='application/json')
|
||||
|
||||
@app.route('/volu', methods=["POST"])
|
||||
def flaskVolu():
|
||||
if request.headers['Auth'] == passwd:
|
||||
spotVL(request.headers['Volume'])
|
||||
return Response('{"status":"Success"}', status=200, mimetype='application/json')
|
||||
else:
|
||||
return Response('{"status":"Incorrect password"}', status=401, mimetype='application/json')'''
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', port=5000)
|
||||
Reference in New Issue
Block a user