Exemplo n.º 1
0
func RecentShows(ctx *gin.Context) {
	genre := ctx.Params.ByName("genre")
	if genre == "0" {
		genre = ""
	}
	page, _ := strconv.Atoi(ctx.DefaultQuery("page", "0"))
	renderShows(tmdb.RecentShowsComplete(genre, config.Get().Language, page), ctx, page, "")
}
Exemplo n.º 2
0
func RecentShows(ctx *gin.Context) {
	genre := ctx.Params.ByName("genre")
	if genre == "0" {
		genre = ""
	}
	page := -1
	if config.Get().EnablePagination == true {
		currentpage, err := strconv.Atoi(ctx.DefaultQuery("page", "0"))
		if err == nil {
			page = currentpage
		}
	}
	renderShows(tmdb.RecentShowsComplete(genre, config.Get().Language, page), ctx, page)
}