Subliminal update
This commit is contained in:
@@ -27,7 +27,7 @@ from exceptions import InvalidLanguageError, PluginError, BadStateError, \
|
||||
WrongTaskError, DownloadFailedError
|
||||
from itertools import groupby
|
||||
from languages import list_languages
|
||||
from subliminal.utils import NullHandler
|
||||
from utils import NullHandler
|
||||
from tasks import Task, DownloadTask, ListTask, StopTask
|
||||
import Queue
|
||||
import guessit
|
||||
@@ -216,16 +216,16 @@ class Subliminal(object):
|
||||
key = ''
|
||||
for sort_item in order:
|
||||
if sort_item == LANGUAGE_INDEX:
|
||||
key += '{:03d}'.format(len(self._languages) - self._languages.index(subtitle.language) - 1)
|
||||
key += '{0:03d}'.format(len(self._languages) - self._languages.index(subtitle.language) - 1)
|
||||
elif sort_item == PLUGIN_INDEX:
|
||||
key += '{:02d}'.format(len(self._plugins) - self._plugins.index(subtitle.plugin) - 1)
|
||||
key += '{0:02d}'.format(len(self._plugins) - self._plugins.index(subtitle.plugin) - 1)
|
||||
elif sort_item == PLUGIN_CONFIDENCE:
|
||||
key += '{:04d}'.format(int(subtitle.confidence * 1000))
|
||||
key += '{0:04d}'.format(int(subtitle.confidence * 1000))
|
||||
elif sort_item == MATCHING_CONFIDENCE:
|
||||
confidence = 0
|
||||
if subtitle.release:
|
||||
confidence = matching_confidence(video, subtitle)
|
||||
key += '{:04d}'.format(int(confidence * 1000))
|
||||
key += '{0:04d}'.format(int(confidence * 1000))
|
||||
return int(key)
|
||||
|
||||
def groupByVideo(self, list_result):
|
||||
|
||||
Reference in New Issue
Block a user