Skip to content

Commit

Permalink
Handle returned errors for the GetToken method - Fixes #59 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
danstis authored Oct 29, 2017
1 parent bee8596 commit 10a341d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [v0.4.1]
### Fixed
- ([#59](https://github.com/danstis/Plex-Sync/issues/59)) Handle returned errors for the GetToken method.

## [v0.4.0]
### Changed
Expand Down Expand Up @@ -55,7 +58,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- App would attempt to sync even if a token was not obtained.
- Spaces in TV Show names cause errors.

[unreleased]: https://github.com/danstis/Plex-Sync/compare/v0.4.0...HEAD
[unreleased]: https://github.com/danstis/Plex-Sync/compare/v0.4.1...HEAD
[v0.4.1]: https://github.com/danstis/Plex-Sync/compare/v0.4.0...v0.4.1
[v0.4.0]: https://github.com/danstis/Plex-Sync/compare/v0.3.4...v0.4.0
[v0.3.4]: https://github.com/danstis/Plex-Sync/compare/v0.3.1...v0.3.4
[v0.3.1]: https://github.com/danstis/Plex-Sync/compare/v0.3.0...v0.3.1
Expand Down
9 changes: 6 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ func main() {
for {
token := plex.Token()
if token != "" {
localServer.GetToken(token)
remoteServer.GetToken(token)

if err = localServer.GetToken(token); err != nil {
log.Printf("ERROR: %v", err)
}
if err = remoteServer.GetToken(token); err != nil {
log.Printf("ERROR: %v", err)
}
plex.SyncWatchedTv(localServer, remoteServer)
}
log.Printf("Sleeping for %v...", (sleepInterval * time.Second))
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.4.0"
const Version = "0.4.1-beta.2"

0 comments on commit 10a341d

Please sign in to comment.