def drop(self, event): for link in get_links(event.mimeData()): if path.isdir(link): for video in get_videos(link): self.addFile(video) elif is_a_video_file(link): self.addFile(link)
def openFolderDialog(self): dirname = QFileDialog.getExistingDirectory(self, i18n("Select folder"), '~') for video in get_videos(unicode(dirname)): self.addFile(video)