Last active
September 1, 2018 00:12
-
-
Save erinxocon/d3ad9e896ddb75d1dcc39225bb4dc710 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, render_template, jsonify, redirect | |
from soco import SoCo | |
import json | |
app = Flask(__name__) | |
sonos = SoCo('10.0.1.153') | |
@app.route("/info") | |
def info(): | |
track = sonos.get_current_track_info() | |
return render_template('index.html', art=track['album_art']) | |
if __name__ == '__main__': | |
app.run(debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment