Fix for guessit importing

This commit is contained in:
echel0n 2014-04-22 07:52:26 -07:00
commit 33754b8d1e
2 changed files with 9 additions and 9 deletions

View file

@ -71,10 +71,10 @@ else:
return x.encode('hex')
from guessit.guess import Guess, merge_all
from guessit.language import Language
from guessit.matcher import IterativeMatcher
from guessit.textutils import clean_string
from lib.guessit.guess import Guess, merge_all
from lib.guessit.language import Language
from lib.guessit.matcher import IterativeMatcher
from lib.guessit.textutils import clean_string
import logging
import json
@ -219,7 +219,7 @@ def guess_file_info(filename, filetype, info=None):
result.append(_guess_filename(filename, filetype))
elif infotype == 'hash_mpc':
from guessit.hash_mpc import hash_file
from lib.guessit.hash_mpc import hash_file
try:
result.append(Guess({'hash_mpc': hash_file(filename)},
confidence=1.0))
@ -227,7 +227,7 @@ def guess_file_info(filename, filetype, info=None):
log.warning('Could not compute MPC-style hash because: %s' % e)
elif infotype == 'hash_ed2k':
from guessit.hash_ed2k import hash_file
from lib.guessit.hash_ed2k import hash_file
try:
result.append(Guess({'hash_ed2k': hash_file(filename)},
confidence=1.0))

View file

@ -19,9 +19,9 @@
#
from __future__ import unicode_literals
from guessit import base_text_type, Guess
from guessit.patterns import canonical_form
from guessit.textutils import clean_string
from lib.guessit import base_text_type, Guess
from lib.guessit.patterns import canonical_form
from lib.guessit.textutils import clean_string
import logging
log = logging.getLogger(__name__)