+ elif not self.__in_end_notify:
+ self.__in_end_notify = True
+ postoffice.notify('playlist-end', self.playlist)
+ self.__in_end_notify = False
+ # if the notification refills the playlist,
+ # we do nothing after this point so we don't
+ # mess things up
+ if not self.playlist.has_next():
+ self.stop()