Ejemplo n.º 1
0
    def test_generate_derived_season_renames_anime_1(self):
        rename.show_name = 'Masamune-kun no Revenge'

        a_mode = rename.anime_mode
        rename.anime_mode = True

        infos = rename.generate_episode_infos(
            os.path.abspath(
                './tests/cases/[Judas] Masamune-kun no Revenge (Season 1) [BD 1080p][HEVC x265 10bit][Dual-Audio][Eng-Subs]/'
            ))
        result = rename.generate_derived_season_renames(infos)

        rename.anime_mode = a_mode

        self.assertEqual(
            result[0],
            EpisodeRename('[Judas] Masamune-kun no Revenge - 01.mkv',
                          '[Judas] Masamune-kun no Revenge - S01E01.mkv'))
Ejemplo n.º 2
0
    def test_generate_derived_season_renames_3(self):
        rename.show_name = 'Martin Mystery'
        infos = []
        # For this test, assume Episode 65, even though this was for a season_maps exercise
        info = EpisodeInfo(root_dir,
                           'martin-mystery-episode-65-its-alive-part-1.mp4')
        info.episode = 'E65'
        info.extension = 'mp4'
        info.part_num = 0
        info.subtitle = None
        info.season = 'S01'
        info.title = 'its alive part 1'
        infos.append(info)
        result = rename.generate_derived_season_renames(infos)

        self.assertListEqual(result, [
            EpisodeRename('martin-mystery-episode-65-its-alive-part-1.mp4',
                          'Martin Mystery - S01E65 - its alive part 1.mp4')
        ])
Ejemplo n.º 3
0
    def test_generate_derived_season_renames_2(self):
        rename.show_name = 'Producing Parker'
        infos = []
        info = EpisodeInfo(
            root_dir,
            'producing-parker-season-2-episode-6-15-minutes-in-parker.mp4')
        info.episode = 'E06'
        info.extension = 'mp4'
        info.part_num = 0
        info.subtitle = None
        info.season = 'S02'
        info.title = '15 minutes in parker'
        infos.append(info)
        result = rename.generate_derived_season_renames(infos)

        self.assertListEqual(result, [
            EpisodeRename(
                'producing-parker-season-2-episode-6-15-minutes-in-parker.mp4',
                'Producing Parker - S02E06 - 15 minutes in parker.mp4')
        ])
Ejemplo n.º 4
0
    def test_generate_derived_season_renames(self):
        rename.show_name = 'Producing Parker'
        infos = rename.generate_episode_infos(
            os.path.abspath('./tests/cases/Producing Parker/'))
        result = rename.generate_derived_season_renames(infos)

        correct_renames = []
        correct_renames.append(
            EpisodeRename(
                'producing-parker-season-1-episode-1-producing-parker.mp4',
                'Producing Parker - S01E01 - producing parker.mp4'))
        correct_renames.append(
            EpisodeRename(
                'producing-parker-season-1-episode-2-producing-parker.mp4',
                'Producing Parker - S01E02 - producing parker.mp4'))
        correct_renames.append(
            EpisodeRename(
                'producing-parker-season-2-episode-1-producing-parker.mp4',
                'Producing Parker - S02E01 - producing parker.mp4'))
        self.assertListEqual(result, correct_renames)