Skip to content

Commit

Permalink
Remove useless alias to MPD's currentsong command
Browse files Browse the repository at this point in the history
  • Loading branch information
multani committed Oct 31, 2011
1 parent d0b4fd4 commit cb68779
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sonata/cli.py
Expand Up @@ -150,7 +150,7 @@ def execute_cmd(self, cmd):
'preferences or MPD_HOST/MPD_PORT environment variables.')) 'preferences or MPD_HOST/MPD_PORT environment variables.'))
sys.exit(1) sys.exit(1)


self.songinfo = self.MPDH.currsong() self.songinfo = self.MPDH.currentsong()
getattr(self, "_execute_%s" % cmd)() getattr(self, "_execute_%s" % cmd)()


def _execute_play(self): def _execute_play(self):
Expand Down
3 changes: 1 addition & 2 deletions sonata/current.py
Expand Up @@ -295,8 +295,7 @@ def current_update(self, prevstatus_playlist, new_playlist_length):
pass pass


if 'pos' in self.songinfo(): if 'pos' in self.songinfo():
currsong = mpdh.get(self.songinfo(), 'pos', 0, currsong = mpdh.get(self.songinfo(), 'pos', 0, True)
True)
self.boldrow(currsong) self.boldrow(currsong)
self.prev_boldrow = currsong self.prev_boldrow = currsong


Expand Down
4 changes: 2 additions & 2 deletions sonata/main.py
Expand Up @@ -469,7 +469,7 @@ def __init__(self, args, window=None, _sugar=False):
if self.conn: if self.conn:
self.status = self.MPDH.status() self.status = self.MPDH.status()
self.iterate_time = self.iterate_time_when_connected self.iterate_time = self.iterate_time_when_connected
self.songinfo = self.MPDH.currsong() self.songinfo = self.MPDH.currentsong()
self.artwork.update_songinfo(self.songinfo) self.artwork.update_songinfo(self.songinfo)
elif self.config.initial_run: elif self.config.initial_run:
show_prefs = True show_prefs = True
Expand Down Expand Up @@ -1157,7 +1157,7 @@ def update_status(self):
if self.status['state'] == 'stop': if self.status['state'] == 'stop':
self.iterate_time = \ self.iterate_time = \
self.iterate_time_when_disconnected_or_stopped self.iterate_time_when_disconnected_or_stopped
self.songinfo = self.MPDH.currsong() self.songinfo = self.MPDH.currentsong()
self.artwork.update_songinfo(self.songinfo) self.artwork.update_songinfo(self.songinfo)
if not self.last_repeat \ if not self.last_repeat \
or self.last_repeat != self.status['repeat']: or self.last_repeat != self.status['repeat']:
Expand Down
3 changes: 0 additions & 3 deletions sonata/mpdhelper.py
Expand Up @@ -47,9 +47,6 @@ def status(self):
else: else:
return {} return {}


def currsong(self):
return self.call('currentsong')

@property @property
def version(self): def version(self):
# XXX this is not supposed to change, unless the client reconnect to # XXX this is not supposed to change, unless the client reconnect to
Expand Down

0 comments on commit cb68779

Please sign in to comment.