Skip to content

Commit

Permalink
Merge pull request #8 from darknessomi/new-user
Browse files Browse the repository at this point in the history
增加清除用户信息退出登录功能
  • Loading branch information
darknessomi committed Jan 2, 2015
2 parents 6818543 + 043122a commit d27cba8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

setup(
name = 'NetEase-MusicBox',
version = '0.1.0.1.2',
version = '0.1.1',
packages = find_packages(),

include_package_data = True,
Expand Down
8 changes: 7 additions & 1 deletion src/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
['s', 'Star ', '添加到收藏'],
['c', 'Collection', '收藏列表'],
['r', 'Remove ', '删除当前条目'],
['q', 'Quit ', '退出']
['q', 'Quit ', '退出'],
["w", 'Quit&Clear', '退出并清除用户信息']
]

log = logger.getLogger(__name__)
Expand Down Expand Up @@ -106,6 +107,11 @@ def start(self):
if key == ord('q'):
break

# 退出并清除用户信息
if key == ord('w'):
self.account = {}
break

# 上移
elif key == ord('k'):
self.index = carousel(offset, min( len(datalist), offset + step) - 1, idx-1 )
Expand Down

0 comments on commit d27cba8

Please sign in to comment.