Merge pull request #1530 from Zillode/multi-scan

Support multiple scan query strings at the same time
This commit is contained in:
Jakob Borg
2015-03-29 16:02:45 +02:00
4 changed files with 50 additions and 23 deletions

View File

@@ -685,8 +685,8 @@ func restPostScan(m *model.Model, w http.ResponseWriter, r *http.Request) {
qs := r.URL.Query()
folder := qs.Get("folder")
if folder != "" {
sub := qs.Get("sub")
err := m.ScanFolderSub(folder, sub)
subs := qs["sub"]
err := m.ScanFolderSubs(folder, subs)
if err != nil {
http.Error(w, err.Error(), 500)
}