NBLA: Fix subtitle handling for unshackle
This commit is contained in:
parent
7bd7417c66
commit
a0dc67f74b
@ -24,13 +24,7 @@ class NebulaSubtitle(Subtitle):
|
|||||||
STYLE_RE = re.compile('::cue\\(v\\[voice="(.+)"\\]\\) { color: ([^;]+); (.*)}')
|
STYLE_RE = re.compile('::cue\\(v\\[voice="(.+)"\\]\\) { color: ([^;]+); (.*)}')
|
||||||
RGB_RE = re.compile("rgb\\((.+), ?(.+), ?(.+)\\)")
|
RGB_RE = re.compile("rgb\\((.+), ?(.+), ?(.+)\\)")
|
||||||
|
|
||||||
def download(
|
def download(self, *args, **kwargs):
|
||||||
self,
|
|
||||||
session: requests.Session,
|
|
||||||
prepare_drm: partial,
|
|
||||||
max_workers: Optional[int] = None,
|
|
||||||
progress: Optional[partial] = None
|
|
||||||
):
|
|
||||||
# Track.download chooses file extension based on class name so use
|
# Track.download chooses file extension based on class name so use
|
||||||
# this hack to keep it happy
|
# this hack to keep it happy
|
||||||
self.__class__.__name__ = "Subtitle"
|
self.__class__.__name__ = "Subtitle"
|
||||||
@ -38,7 +32,7 @@ class NebulaSubtitle(Subtitle):
|
|||||||
# Skip Subtitle.download and use Track.download directly. The pycaption
|
# Skip Subtitle.download and use Track.download directly. The pycaption
|
||||||
# calls in Subtitle.download are not needed here and mangle the WebVTT
|
# calls in Subtitle.download are not needed here and mangle the WebVTT
|
||||||
# styling Nebula uses
|
# styling Nebula uses
|
||||||
Track.download(self, session, prepare_drm, max_workers, progress)
|
Track.download(self, *args, **kwargs)
|
||||||
|
|
||||||
def convert(self, codec: Subtitle.Codec) -> Path:
|
def convert(self, codec: Subtitle.Codec) -> Path:
|
||||||
if codec != Subtitle.Codec.SubRip:
|
if codec != Subtitle.Codec.SubRip:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user