Merge pull request #46 from inpos/master

ошибка с юникодом
pull/7/head
DiMartinoXBMC 2016-03-19 21:18:25 +03:00
commit f90db90730
2 changed files with 10 additions and 10 deletions

View File

@ -29,7 +29,7 @@ import xbmcgui
import xbmcvfs import xbmcvfs
import xbmcaddon import xbmcaddon
import Localization import Localization
from functions import localize_path, isSubtitle, is_writable, file_url from functions import encode_msg, isSubtitle, is_writable, file_url
import os import os
@ -607,7 +607,7 @@ class InposPlayer(xbmc.Player):
def _get_status_lines(self, s, f): def _get_status_lines(self, s, f):
return [ return [
localize_path(self.display_name), encode_msg(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

@ -423,10 +423,10 @@ def cutFolder(contentList, tdir=None):
if len(contentList) > 1: if len(contentList) > 1:
common_folder = contentList[0][0] common_folder = contentList[0][0]
debug('[cutFolder]: common_folder '+common_folder) debug('[cutFolder]: common_folder '+common_folder)
if u'\\' in common_folder: if '\\' in common_folder:
common_folder = common_folder.split(u'\\')[0] common_folder = common_folder.split('\\')[0]
elif u'/' in common_folder: elif '/' in common_folder:
common_folder = common_folder.split(u'/')[0] common_folder = common_folder.split('/')[0]
common = True common = True
for item in contentList: for item in contentList:
@ -441,10 +441,10 @@ def cutFolder(contentList, tdir=None):
#debug('[cutFolder]: item[0] '+item[0]) #debug('[cutFolder]: item[0] '+item[0])
if u'\\' in item[0]: if '\\' in item[0]:
dir = item[0].split(u'\\')[0] dir = item[0].split('\\')[0]
elif u'/' in item[0]: elif '/' in item[0]:
dir = item[0].split(u'/')[0] dir = item[0].split('/')[0]
elif not tdir: elif not tdir:
contentListNew.append(item) contentListNew.append(item)