mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-10 04:02:17 +00:00
18 lines
338 B
Python
18 lines
338 B
Python
|
# 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() ]
|
||
|
}
|
||
|
})
|
||
|
|