示例#1
0
文件: shows.go 项目: razer1s/quasar
func SearchShows(ctx *gin.Context) {
	query := ctx.Request.URL.Query().Get("q")
	if query == "" {
		query = xbmc.Keyboard("", "LOCALIZE[30201]")
		if query == "" {
			return
		}
	}
	renderShows(tmdb.SearchShows(query, config.Get().Language), ctx, -1)
}
示例#2
0
文件: shows.go 项目: scakemyer/quasar
func SearchShows(ctx *gin.Context) {
	query := ctx.Request.URL.Query().Get("q")
	if query == "" {
		if len(searchHistory) > 0 && xbmc.DialogConfirm("Quasar", "LOCALIZE[30262]") {
			choice := xbmc.ListDialog("LOCALIZE[30261]", searchHistory...)
			query = searchHistory[choice]
		} else {
			query = xbmc.Keyboard("", "LOCALIZE[30201]")
			if query == "" {
				return
			}
			searchHistory = append(searchHistory, query)
		}
	}
	page, _ := strconv.Atoi(ctx.DefaultQuery("page", "0"))
	renderShows(tmdb.SearchShows(query, config.Get().Language, page), ctx, page, query)
}