1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-29 12:30:11 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
9b977bafbf
add other funding method 2021-03-09 18:45:28 +00:00
77f755e43c
fix dropdown colors in dark mode on chrome 2021-03-09 18:15:14 +00:00
30bef15855
Trim commit before comparing in IsNew()
Fixes the current version appearing as an update. Also fixed error
handling when no update is available, which obviously hadn't previously
been experienced.
2021-03-09 15:52:15 +00:00
7 changed files with 23 additions and 6 deletions

1
.github/FUNDING.yml vendored
View File

@ -1,2 +1,3 @@
github: hrfee
ko_fi: hrfee
custom: https://www.buymeacoffee.com/hrfee

1
.gitignore vendored
View File

@ -13,3 +13,4 @@ config-payload.json
server.key
server.pem
server.crt
instructions-debian.txt

View File

@ -85,3 +85,7 @@
.dark-only {
display: initial;
}
.dark-theme select option {
background: #202020;
}

8
jfa-go.service Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=An account management system for Jellyfin.
[Service]
ExecStart={executable}
[Install]
WantedBy=default.target

6
package-lock.json generated
View File

@ -236,9 +236,9 @@
"integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY="
},
"esbuild": {
"version": "0.8.56",
"resolved": "https://registry.npm.taobao.org/esbuild/download/esbuild-0.8.56.tgz",
"integrity": "sha1-nHw9bmFNtzZ6+jSK2wqyh8KWc14="
"version": "0.8.57",
"resolved": "https://registry.npm.taobao.org/esbuild/download/esbuild-0.8.57.tgz?cache=0&sync_timestamp=1615272041268&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesbuild%2Fdownload%2Fesbuild-0.8.57.tgz",
"integrity": "sha1-pC0CvCtXxwvNDviX/iRHZrtt2SY="
},
"escalade": {
"version": "3.1.1",

View File

@ -19,7 +19,7 @@
"dependencies": {
"@ts-stack/markdown": "^1.3.0",
"a17t": "^0.4.0",
"esbuild": "^0.8.56",
"esbuild": "^0.8.57",
"lodash": "^4.17.19",
"mjml": "^4.8.0",
"remixicon": "^2.5.0",

View File

@ -197,11 +197,14 @@ func (ud *Updater) GetTag() (Tag, int, error) {
var tag Tag
err = json.Unmarshal(body, &tag)
if tag.Version == "" {
err = errors.New("Tag was empty")
}
return tag, resp.StatusCode, err
}
func (t *Tag) IsNew() bool {
return t.Version != commit
return t.Version[:7] != commit
}
func (ud *Updater) getRelease() (release GHRelease, status int, err error) {
@ -462,7 +465,7 @@ func (app *appContext) checkForUpdates() {
go func() {
tag, status, err := app.updater.GetTag()
if status != 200 || err != nil {
if strings.Contains(err.Error(), "strconv.ParseInt") {
if err != nil && strings.Contains(err.Error(), "strconv.ParseInt") {
app.err.Println("No new updates available.")
} else {
app.err.Printf("Failed to get latest tag (%d): %v", status, err)