use newJellyfin instead of constructor method

This commit is contained in:
Harvey Tindall
2020-08-30 20:44:10 +01:00
parent 072776c15f
commit 6e3d5dac19
3 changed files with 8 additions and 8 deletions

View File

@@ -13,8 +13,7 @@ type testReq struct {
func (app *appContext) TestJF(gc *gin.Context) {
var req testReq
gc.BindJSON(&req)
tempjf := Jellyfin{}
tempjf.init(req.Host, "jfa-go-setup", app.version, "auth", "auth")
tempjf, _ := newJellyfin(req.Host, "jfa-go-setup", app.version, "auth", "auth")
tempjf.noFail = true
_, status, err := tempjf.authenticate(req.Username, req.Password)
if !(status == 200 || status == 204) || err != nil {