Skip to content

Commit

Permalink
Version related updates (#56)
Browse files Browse the repository at this point in the history
* Ignore pre-release tags on header of web interface - Fixes #55

* Move full version number into the settings page - Fixes #54
  • Loading branch information
danstis authored Oct 28, 2017
1 parent 4decbd4 commit f1877d3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Changed
- Refresh shows when reloading the WebUI homepage.
- ([#50](https://github.com/danstis/Plex-Sync/issues/50)) Refresh shows when reloading the WebUI homepage.
- ([#55](https://github.com/danstis/Plex-Sync/issues/55)) Ignore pre-release tags on header of web interface.
- ([#54](https://github.com/danstis/Plex-Sync/issues/54)) Move full version number into the settings page.

## [v0.3.3]
### Added
Expand Down
2 changes: 1 addition & 1 deletion plex/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package plex

// Version contains the version of the app.
const Version = "0.3.5-refresh-shows-onreload-homepage.4"
const Version = "0.3.5-version-updates.7"
17 changes: 8 additions & 9 deletions webui/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"os"
"path"
"strings"

"github.com/gorilla/mux"

Expand All @@ -15,23 +16,21 @@ import (

// PageData defines a struct to store the current version information.
type PageData struct {
Version string
Shows []string
Version string
FullVersion string
Shows []string
}

var ss, _ = plex.SelectedShows()
var v = PageData{
Version: plex.Version,
Shows: ss,
Version: strings.Split(plex.Version, "-")[0],
FullVersion: plex.Version,
Shows: ss,
}

// refreshShows updates the PageData with the latest shows.
func refreshShows() {
ss, _ = plex.SelectedShows()
v = PageData{
Version: plex.Version,
Shows: ss,
}
v.Shows, _ = plex.SelectedShows()
}

// RootHandler returns the default page.
Expand Down
4 changes: 4 additions & 0 deletions webui/templates/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ <h1>Settings</h1>
<li class="list-group-item">
<a href="/token/remove">Remove Cached Token</a>
</li>

<li class="list-group-item disabled">
Plex-Sync v{{.FullVersion}}
</li>
</ul>

</div>
Expand Down

0 comments on commit f1877d3

Please sign in to comment.