def _handle_songs(self, songs, playlist=None):
     # Check this is a launch, not a configure
     if self.com_index:
         com = self.get_data(self.com_index)
         if len(songs) > com.warn_threshold:
             if not confirm_multi_song_invoke(
                     self, com.name, len(songs)):
                 print_d("User decided not to run on %d songs" % len(songs))
                 return
         print_d("Running %s on %d song(s)" % (com, len(songs)))
         try:
             com.run(songs, playlist and playlist.name)
         except Exception as err:
             print_e("Couldn't run command %s: %s %s at:"
                     % (com.name, type(err), err, ))
             print_exc()
             ErrorMessage(
                 self.plugin_window,
                 _("Unable to run custom command %s") %
                 util.escape(self.com_index),
                 util.escape(str(err))).run()
 def _handle_songs(self, songs, playlist=None):
     # Check this is a launch, not a configure
     if self.com_index:
         com = self.get_data(self.com_index)
         if len(songs) > com.warn_threshold:
             if not confirm_multi_song_invoke(
                     self, com.name, len(songs)):
                 print_d("User decided not to run on %d songs" % len(songs))
                 return
         print_d("Running %s on %d song(s)" % (com, len(songs)))
         try:
             com.run(songs, playlist and playlist.name)
         except Exception as err:
             print_e("Couldn't run command %s: %s %s at:"
                     % (com.name, type(err), err, ))
             print_exc()
             ErrorMessage(
                 self.plugin_window,
                 _("Unable to run custom command %s") %
                 util.escape(self.com_index),
                 util.escape(str(err))).run()