lukas
4539147208
basic tvshow api request to show available tvshows limit randompage videos to 3 improve settings object to remove one useless copy
16 lines
313 B
Go
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))
|
|
})
|
|
}
|