1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-12-22 17:06:17 +00:00
supysonic/api/browse.py
2012-10-13 11:29:48 +02:00

18 lines
338 B
Python
Executable File

# coding: utf-8
from flask import request
from web import app
from db import MusicFolder
@app.route('/rest/getMusicFolders.view')
def list_folders():
return request.formatter({
'musicFolders': {
'musicFolder': [ {
'id': str(f.id),
'name': f.name
} for f in MusicFolder.query.order_by(MusicFolder.name).all() ]
}
})