Skip to content

Commit

Permalink
fix status check
Browse files Browse the repository at this point in the history
  • Loading branch information
ceuk committed Jul 6, 2020
1 parent b653465 commit ed07262
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="spotui",
version="0.1.13",
version="0.1.14",
author="ceuk",
description="Spotify TUI",
long_description=long_description,
Expand Down
4 changes: 2 additions & 2 deletions spotui/src/MainForm.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ def __init__(self, stdscr):
self.popup = None

# Set initial tracklist
if self.status and self.status["context"] and self.status["context"]["uri"]:
if self.status and 'context' in self.status and self.status["context"]["uri"]:
self.change_tracklist(
self.api.get_playlist_tracks(self.status["context"]["uri"]), "Previous Session")
else:
self.change_tracklist(self.api.get_top_tracks(), "Top Tracks")

# Set initial device ID
devices = self.api.get_devices()
if self.status and self.status["device"] and self.status["device"]["is_active"]:
if self.status and 'device' in self.status and self.status["device"]["is_active"]:
self.device_id = self.status["device"]["id"]
else:
self.device_id = devices[0]["id"] if devices and len(
Expand Down

0 comments on commit ed07262

Please sign in to comment.