Browse Source

Merge branch 'feature/FixGuessit' into develop

tags/release_0.25.1
JackDandy 5 years ago
parent
commit
571c0df575
  1. 3
      lib/guessit/fileutils.py
  2. 2
      lib/guessit/language.py
  3. 4
      lib/guessit/patterns.py
  4. 2
      lib/guessit/textutils.py

3
lib/guessit/fileutils.py

@ -87,4 +87,5 @@ def load_file_in_same_dir(ref_file, filename):
zfile = zipfile.ZipFile(zfilename)
return zfile.read('/'.join(path[i + 1:]))
return u(io.open(os.path.join(*path), encoding='utf-8').read())
with io.open(os.path.join(*path), encoding='utf-8') as fh:
return u(fh.read())

2
lib/guessit/language.py

@ -172,7 +172,7 @@ class Language(UnicodeMixin):
'pob'
"""
_with_country_regexp = re.compile('(.*)\((.*)\)')
_with_country_regexp = re.compile(r'(.*)\((.*)\)')
_with_country_regexp2 = re.compile('(.*)-(.*)')
def __init__(self, language, country=None, strict=False, scheme=None):

4
lib/guessit/patterns.py

@ -140,7 +140,7 @@ prop_multi = { 'format': { 'DVD': [ 'DVD', 'DVD-Rip', 'VIDEO-TS', 'DVDivX' ],
'DTS': [ 'DTS' ],
'AAC': [ 'He-AAC', 'AAC-He', 'AAC' ] },
'audioChannels': { '5.1': [ r'5\.1', 'DD5[\._ ]1', '5ch' ] },
'audioChannels': { '5.1': [ r'5\.1', r'DD5[\._ ]1', '5ch' ] },
'episodeFormat': { 'Minisode': [ 'Minisodes?' ] }
@ -170,7 +170,7 @@ prop_single = { 'releaseGroup': [ 'ESiR', 'WAF', 'SEPTiC', r'\[XCT\]', 'iNT', 'P
}
_dash = '-'
_psep = '[-\. _]?'
_psep = r'[-\. _]?'
def _to_rexp(prop):
return re.compile(prop.replace(_dash, _psep), re.IGNORECASE)

2
lib/guessit/textutils.py

@ -58,7 +58,7 @@ def clean_string(s):
return result
_words_rexp = re.compile('\w+', re.UNICODE)
_words_rexp = re.compile(r'\w+', re.UNICODE)
def find_words(s):
return _words_rexp.findall(s.replace('_', ' '))

Loading…
Cancel
Save