Exemplo n.º 1
0
def test_get_matches_no_match(episodes):
    subtitle_releases = ['The.Big.Bang.Theory.S07E05.1080p.HDTV.DIMENSION']
    subtitle = PodnapisiSubtitle(Language('eng'), False, None, 'EdQo',
                                 subtitle_releases, 'The Big Bang Theory', 7,
                                 5, 2007)
    matches = subtitle.get_matches(episodes['got_s03e10'])
    assert matches == {'year', 'country'}
Exemplo n.º 2
0
def test_get_matches_movie(movies):
    subtitle_releases = [
        'Man.Of.Steel.2013.720p.BRRip.x264.AAC-ViSiON',
        'Man.Of.Steel.2013.720p.BluRay.x264-Felony',
        'Man.Of.Steel.2013.1080p.BluRay.x264-SECTOR7',
        'Man.Of.Steel.2013.720p.BRRip.x264.AC3-UNDERCOVER',
        'Man.Of.Steel.2013.BDRip.XviD.MP3-RARBG',
        'Man.Of.Steel.(2013).BDRip.600MB.Ganool',
        'Man.of.Steel.2013.BDRip.x264.700MB-Micromkv',
        'Man.Of.Steel.2013.BRRip.AAC.x264-SSDD',
        'Man.Of.Steel.2013.BDRip.x264-Larceny',
        'Man.Of.Steel.2013.BDRiP.XViD-NoGRP',
        'Man.Of.Steel.2013.720p.BRRip.x264.AC3-EVO',
        'Man.of.Steel.2013.720p.BRRip.h264.AAC-RARBG',
        'Man.Of.Steel.[2013].BRRip.XviD-ETRG',
        'Man.of.Steel.[2013].BRRip.XViD.[AC3]-ETRG',
        'Man.Of.Steel.2013.BRRiP.XVID.AC3-MAJESTIC',
        'Man.of.steel.2013.BRRip.XviD.AC3-RARBG',
        'Man.Of.Steel.2013.720p.BRRip.x264.AC3-SUPERM4N',
        'Man.Of.Steel.2013.720p.BRRip.XviD.AC3-ViSiON',
        'Man.Of.Steel.2013.720p.BRRip.x264.AC3-JYK',
        'Man.of.Steel.[2013].DVDRIP.DIVX.[Eng]-DUQA\u252c\xab',
        'Man.of.Steel.2013.1080p.BluRay.x264.YIFY'
    ]
    subtitle = PodnapisiSubtitle(Language('eng'), True, None, 'EMgo',
                                 subtitle_releases, 'Man of Steel', None, None,
                                 2013)
    matches = subtitle.get_matches(movies['man_of_steel'])
    assert matches == {
        'title', 'year', 'video_codec', 'resolution', 'format', 'release_group'
    }
Exemplo n.º 3
0
def test_get_matches_episode(episodes):
    subtitle_releases = [
        'The.Big.Bang.Theory.S07E05.HDTV.x264-LOL', 'The.Big.Bang.Theory.S07E05.720p.HDTV.x264-DIMENSION',
        'The.Big.Bang.Theory.S07E05.480p.HDTV.x264-mSD', 'The.Big.Bang.Theory.S07E05.HDTV.XviD-AFG'
    ]
    subtitle = PodnapisiSubtitle(Language('eng'), False, None, 'EdQo', subtitle_releases, 'The Big Bang Theory', 7, 5,
                                 2007)
    matches = subtitle.get_matches(episodes['bbt_s07e05'])
    assert matches == {'series', 'season', 'episode', 'video_codec', 'resolution', 'format', 'release_group', 'year'}
Exemplo n.º 4
0
def test_get_matches_episode(episodes):
    subtitle_releases = [
        'The.Big.Bang.Theory.S07E05.HDTV.x264-LOL', 'The.Big.Bang.Theory.S07E05.720p.HDTV.x264-DIMENSION',
        'The.Big.Bang.Theory.S07E05.480p.HDTV.x264-mSD', 'The.Big.Bang.Theory.S07E05.HDTV.XviD-AFG'
    ]
    subtitle = PodnapisiSubtitle(Language('eng'), False, None, 'EdQo', subtitle_releases, 'The Big Bang Theory', 7, 5,
                                 2007)
    matches = subtitle.get_matches(episodes['bbt_s07e05'])
    assert matches == {'series', 'season', 'episode', 'video_codec', 'resolution', 'source', 'release_group', 'year',
                       'country'}
Exemplo n.º 5
0
def test_compute_score_episode_title(episodes):
    video = episodes['bbt_s07e05']
    subtitle = PodnapisiSubtitle(Language('eng'), True, None, 1, [
        'The.Big.Bang.Theory.S07E05.The.Workplace.Proximity.720p.HDTV.x264-DIMENSION.mkv'
    ], None, 7, 5, None)
    assert compute_score(subtitle, video) == sum(
        episode_scores.get(m, 0)
        for m in ('series', 'year', 'season', 'episode', 'release_group',
                  'format', 'resolution', 'video_codec', 'title'))
Exemplo n.º 6
0
def test_get_matches_movie(movies):
    subtitle_releases = [
        'Man.Of.Steel.2013.720p.BRRip.x264.AAC-ViSiON', 'Man.Of.Steel.2013.720p.BluRay.x264-Felony',
        'Man.Of.Steel.2013.1080p.BluRay.x264-SECTOR7', 'Man.Of.Steel.2013.720p.BRRip.x264.AC3-UNDERCOVER',
        'Man.Of.Steel.2013.BDRip.XviD.MP3-RARBG', 'Man.Of.Steel.(2013).BDRip.600MB.Ganool',
        'Man.of.Steel.2013.BDRip.x264.700MB-Micromkv', 'Man.Of.Steel.2013.BRRip.AAC.x264-SSDD',
        'Man.Of.Steel.2013.BDRip.x264-Larceny', 'Man.Of.Steel.2013.BDRiP.XViD-NoGRP',
        'Man.Of.Steel.2013.720p.BRRip.x264.AC3-EVO', 'Man.of.Steel.2013.720p.BRRip.h264.AAC-RARBG',
        'Man.Of.Steel.[2013].BRRip.XviD-ETRG', 'Man.of.Steel.[2013].BRRip.XViD.[AC3]-ETRG',
        'Man.Of.Steel.2013.BRRiP.XVID.AC3-MAJESTIC', 'Man.of.steel.2013.BRRip.XviD.AC3-RARBG',
        'Man.Of.Steel.2013.720p.BRRip.x264.AC3-SUPERM4N', 'Man.Of.Steel.2013.720p.BRRip.XviD.AC3-ViSiON',
        'Man.Of.Steel.2013.720p.BRRip.x264.AC3-JYK', 'Man.of.Steel.[2013].DVDRIP.DIVX.[Eng]-DUQA\u252c\xab',
        'Man.of.Steel.2013.1080p.BluRay.x264.YIFY'
    ]
    subtitle = PodnapisiSubtitle(Language('eng'), True, None, 'EMgo', subtitle_releases, 'Man of Steel', None, None,
                                 2013)
    matches = subtitle.get_matches(movies['man_of_steel'])
    assert matches == {'title', 'year', 'video_codec', 'resolution', 'format', 'release_group'}
Exemplo n.º 7
0
def test_get_matches_episode_year(episodes):
    subtitle_releases = ['Dallas.2012.S01E03.HDTV.x264-LOL']
    subtitle = PodnapisiSubtitle(Language('eng'), True, None, '-5oa', subtitle_releases, 'Dallas', 1, 3, 2012)
    matches = subtitle.get_matches(episodes['dallas_2012_s01e03'])
    assert matches == {'series', 'year', 'season', 'episode'}
Exemplo n.º 8
0
def test_get_matches_no_match(episodes):
    subtitle_releases = ['The.Big.Bang.Theory.S07E05.1080p.HDTV.DIMENSION']
    subtitle = PodnapisiSubtitle(Language('eng'), False, None, 'EdQo', subtitle_releases, 'The Big Bang Theory', 7, 5,
                                 2007)
    matches = subtitle.get_matches(episodes['got_s03e10'], hearing_impaired=True)
    assert matches == {'year'}
Exemplo n.º 9
0
def test_get_matches_episode_year(episodes):
    subtitle_releases = ['Dallas.2012.S01E03.HDTV.x264-LOL']
    subtitle = PodnapisiSubtitle(Language('eng'), True, None, '-5oa', subtitle_releases, 'Dallas', 1, 3, 2012)
    matches = subtitle.get_matches(episodes['dallas_2012_s01e03'])
    assert matches == {'series', 'year', 'season', 'episode'}