mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
add subliminal for subtitle download. #253
This commit is contained in:
parent
47289c903a
commit
c3889c01b1
149 changed files with 34173 additions and 33 deletions
22
libs/pysrt/compat.py
Normal file
22
libs/pysrt/compat.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
import sys
|
||||
|
||||
# Syntax sugar.
|
||||
_ver = sys.version_info
|
||||
|
||||
#: Python 2.x?
|
||||
is_py2 = (_ver[0] == 2)
|
||||
|
||||
#: Python 3.x?
|
||||
is_py3 = (_ver[0] == 3)
|
||||
|
||||
from io import open as io_open
|
||||
|
||||
if is_py2:
|
||||
basestring = basestring
|
||||
str = unicode
|
||||
open = io_open
|
||||
elif is_py3:
|
||||
basestring = (str, bytes)
|
||||
str = str
|
||||
open = open
|
Loading…
Add table
Add a link
Reference in a new issue