add URL base option for subfolder proxies

also cleaned up the naming of some things.
This commit is contained in:
Harvey Tindall
2020-11-22 16:36:43 +00:00
parent e35d0579c8
commit 9dbf60e3df
15 changed files with 145 additions and 115 deletions

View File

@@ -34,7 +34,8 @@ func (app *appContext) StartPWR() {
<-done
}
type Pwr struct {
// PasswordReset represents a passwordreset-xyz.json file generated by Jellyfin.
type PasswordReset struct {
Pin string `json:"Pin"`
Username string `json:"UserName"`
Expiry time.Time `json:"ExpirationDate"`
@@ -48,7 +49,7 @@ func pwrMonitor(app *appContext, watcher *fsnotify.Watcher) {
return
}
if event.Op&fsnotify.Write == fsnotify.Write && strings.Contains(event.Name, "passwordreset") {
var pwr Pwr
var pwr PasswordReset
data, err := ioutil.ReadFile(event.Name)
if err != nil {
return