diff options
| author | James Mills <prologic@shortcircuit.net.au> | 2020-03-27 21:50:19 +1000 |
|---|---|---|
| committer | James Mills <prologic@shortcircuit.net.au> | 2020-03-27 21:50:19 +1000 |
| commit | fd3f210a36529bdd0d5988052d5fe60ab4fa5682 (patch) | |
| tree | 2a6927ad796fb4f0b28b55efa29c96f080e7396f /app/app.go | |
| parent | f4afd2eb6be4bdf6236c6e410d1c3846f2b6e685 (diff) | |
Refactor Sort UI
Diffstat (limited to 'app/app.go')
| -rw-r--r-- | app/app.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -177,12 +177,13 @@ func (a *App) indexHandler(w http.ResponseWriter, r *http.Request) { if len(pl) > 0 { http.Redirect(w, r, fmt.Sprintf("/v/%s?%s", pl[0].ID, r.URL.RawQuery), 302) } else { + sort := strings.ToLower(r.URL.Query().Get("sort")) ctx := &struct { Sort string Playing *media.Video Playlist media.Playlist }{ - Sort: "", + Sort: sort, Playing: &media.Video{ID: ""}, Playlist: a.Library.Playlist(), } |
