Beispiel #1
0
 def update_content(self):
     self.__clear_content()
     tv_series_files = [elem for elem in os.listdir(self._dir_path)
                             if functions.get_season_episode(elem)]
     # tv_series_files = filter(lambda s:functions.get_season_episode(s),
     #                          os.listdir(self._dir_path))
     for elem in tv_series_files:
         if functions.is_dir(elem):
             self.__subdir.append(FileObject(elem))
             self.__subdirectories.append(elem)
         elif functions.is_subtitle(elem):
             self.__subtitles.append(FileObject(elem))
         elif functions.is_video(elem):
             self.__videos.append(FileObject(elem))
         elif functions.is_archive(elem):
             self.__archives.append(FileObject(elem))
Beispiel #2
0
 def __get_season_episode(self, string):
     return functions.get_season_episode(string)