ru title fix

pull/15/head
DiMartinoXBMC 2016-12-16 17:50:07 +03:00
parent 032fca5f95
commit 2abf1d6e96
3 changed files with 11 additions and 11 deletions

View File

@ -30,7 +30,7 @@ import xbmcgui
import xbmcvfs import xbmcvfs
import xbmcaddon import xbmcaddon
import Localization import Localization
from functions import file_encode, isSubtitle, DownloadDB, log, debug, is_writable, unquote, file_url from functions import localize_path, isSubtitle, DownloadDB, log, debug, is_writable, unquote, file_url
import os import os
@ -620,10 +620,10 @@ class AnteoPlayer(xbmc.Player):
def _get_status_lines(self, s, f): def _get_status_lines(self, s, f):
return [ return [
self.display_name, ensure_str(self.display_name),
"%.2f%% %s" % (f.progress * 100, self.localize(STATE_STRS[s.state]).decode('utf-8')), "%.2f%% %s" % (f.progress * 100, self.localize(STATE_STRS[s.state])),
"D:%.2f%s U:%.2f%s S:%d P:%d" % (s.download_rate, self.localize('kb/s').decode('utf-8'), "D:%.2f%s U:%.2f%s S:%d P:%d" % (s.download_rate, self.localize('kb/s'),
s.upload_rate, self.localize('kb/s').decode('utf-8'), s.upload_rate, self.localize('kb/s'),
s.num_seeds, s.num_peers) s.num_seeds, s.num_peers)
] ]

View File

@ -607,7 +607,7 @@ class InposPlayer(xbmc.Player):
def _get_status_lines(self, s, f): def _get_status_lines(self, s, f):
return [ return [
self.display_name.encode('utf-8'), ensure_str(self.display_name),
"%.2f%% %s" % (f.progress * 100, self.localize(STATE_STRS[s.state])), "%.2f%% %s" % (f.progress * 100, self.localize(STATE_STRS[s.state])),
"D:%.2f%s U:%.2f%s S:%d P:%d" % (s.download_rate, self.localize('kb/s'), "D:%.2f%s U:%.2f%s S:%d P:%d" % (s.download_rate, self.localize('kb/s'),
s.upload_rate, self.localize('kb/s'), s.upload_rate, self.localize('kb/s'),

View File

@ -30,7 +30,7 @@ import Downloader
import xbmcgui import xbmcgui
import xbmcvfs import xbmcvfs
import Localization import Localization
from functions import calculate, showMessage, clearStorage, WatchedHistoryDB, DownloadDB, get_ids_video, log, debug, foldername from functions import calculate, showMessage, clearStorage, WatchedHistoryDB, DownloadDB, get_ids_video, log, debug, foldername, ensure_str
ROOT = sys.modules["__main__"].__root__ ROOT = sys.modules["__main__"].__root__
RESOURCES_PATH = os.path.join(ROOT, 'resources') RESOURCES_PATH = os.path.join(ROOT, 'resources')
@ -465,10 +465,10 @@ class TorrentPlayer(xbmc.Player):
def _get_status_lines(self, s): def _get_status_lines(self, s):
return [ return [
self.display_name+'; '+self.torrent.get_debug_info('dht_state'), ensure_str(self.display_name),
"%.2f%% %s; %s" % (s.progress * 100, self.localize(STATE_STRS[s.state]).decode('utf-8'), self.torrent.get_debug_info('trackers_sum')), "%.2f%% %s" % (s.progress * 100, self.localize(STATE_STRS[s.state])),
"D:%.2f%s U:%.2f%s S:%d P:%d" % (s.download_rate / 1024, self.localize('kb/s').decode('utf-8'), "D:%.2f%s U:%.2f%s S:%d P:%d" % (s.download_rate / 1024, self.localize('kb/s'),
s.upload_rate / 1024, self.localize('kb/s').decode('utf-8'), s.upload_rate / 1024, self.localize('kb/s'),
s.num_seeds, s.num_peers) s.num_seeds, s.num_peers)
] ]