1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-11-10 04:02:17 +00:00
supysonic/api/browse.py

18 lines
338 B
Python
Raw Normal View History

2012-10-13 09:29:48 +00:00
# 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() ]
}
})