mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
compiles, basic issues fixed
Server type is found under the Jellyfin settings tab, where you can change it to emby. Currently: * logs in * creates users * parses accounts
This commit is contained in:
committed by
Harvey Tindall
parent
5d56ed5378
commit
d9e1e2f58b
4
setup.go
4
setup.go
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/hrfee/jfa-go/common"
|
||||
"github.com/hrfee/jfa-go/jfapi"
|
||||
"github.com/hrfee/jfa-go/mediabrowser"
|
||||
)
|
||||
|
||||
type testReq struct {
|
||||
@@ -15,7 +15,7 @@ type testReq struct {
|
||||
func (app *appContext) TestJF(gc *gin.Context) {
|
||||
var req testReq
|
||||
gc.BindJSON(&req)
|
||||
tempjf, _ := jfapi.NewJellyfin(req.Host, "jfa-go-setup", app.version, "auth", "auth", common.NewTimeoutHandler("authJF", req.Host, true), 30)
|
||||
tempjf, _ := mediabrowser.NewServer(mediabrowser.JellyfinServer, req.Host, "jfa-go-setup", app.version, "auth", "auth", common.NewTimeoutHandler("authJF", req.Host, true), 30)
|
||||
_, status, err := tempjf.Authenticate(req.Username, req.Password)
|
||||
if !(status == 200 || status == 204) || err != nil {
|
||||
app.info.Printf("Auth failed with code %d (%s)", status, err)
|
||||
|
||||
Reference in New Issue
Block a user