aboutsummaryrefslogtreecommitdiffhomepage
path: root/custom_libs/subliminal_patch/__init__.py
blob: c8780e961e20ff0e85a2fb26d4a83a21b1595e75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# coding=utf-8

from __future__ import absolute_import
import subliminal

# patch subliminal's subtitle and provider base
from .subtitle import Subtitle, guess_matches
from .providers import Provider
subliminal.subtitle.Subtitle = Subtitle
subliminal.subtitle.guess_matches = guess_matches

from .core import scan_video, search_external_subtitles, list_all_subtitles, save_subtitles, refine, \
    download_best_subtitles
from .score import compute_score
from .video import Video
from . import extensions
from . import http
from . import core

# patch subliminal's core functions
subliminal.scan_video = subliminal.core.scan_video = scan_video
subliminal.core.search_external_subtitles = search_external_subtitles
subliminal.save_subtitles = subliminal.core.save_subtitles = save_subtitles
subliminal.refine = subliminal.core.refine = refine
subliminal.video.Video = subliminal.Video = Video
subliminal.video.Episode.__bases__ = (Video,)
subliminal.video.Movie.__bases__ = (Video,)

# add our own list_all_subtitles
subliminal.list_all_subtitles = subliminal.core.list_all_subtitles = list_all_subtitles