OpenMediaCenter/apiGo/api/TVShows.go
lukas 4539147208 add tvshow syntax to db
basic tvshow api request to show available tvshows
limit randompage videos to 3
improve settings object to remove one useless copy
2021-04-16 22:44:56 +02:00

16 lines
313 B
Go

package api
import "openmediacenter/apiGo/database"
func AddTvshowHandlers() {
var dT struct {
TagId int
Force bool
}
AddHandler("getTVShows", TVShowNode, &dT, func() []byte {
query := "SELECT id, name FROM tvshow"
rows := database.Query(query)
return jsonify(readTVshowsFromResultset(rows))
})
}