+ print 'Connecting %s:%i' % (self.cli_options.host, self.cli_options.port)
+ self.mpdConnect({'host':self.cli_options.host, 'port':self.cli_options.port})
+ current_pos = int(self.client.currentsong().get('pos'))
+ if current_pos <= self.cli_options.nb_tracks:
+ self.client.disconnect()
+ sys.exit(0)
+ while current_pos > self.cli_options.nb_tracks:
+ self.client.delete(0)
+ current_pos = int(self.client.currentsong().get('pos'))
+ self.client.disconnect()
+ sys.exit(0)